New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
infinite recursion in scope tree operation on group in alias #5648
Comments
Could you provide a stack trace of the exception? |
|
Hey @zchenb. I need to put some complicated stuff in aliases, like above (computeds are much more limited). Could you look at this? I am trying to extract all my queries into the schema itself, which will allow me to use the query-builder to dynamically construct a single EQL query from my GQL top resolver (cannot do that in a type-safe way with the |
Hi @avedetvedea, could you please try this workaround and see if the problem still occurs? You would likely want to put
at the beginning of this file: "/Users/ata/Library/Application Support/edgedb/portable/3.0-dev.7341/lib/python3.10/site-packages/edb/server/compiler_pool/worker.py". Our compiler uses a recursion-based method for traversing the input queries, and sometimes problems occur when the input query is complex than the default recursion limit. Please feel free to increase recursion limit as needed. Please let me know if the problem recurs after the adjustment. Thanks! |
Hey again @zchenb. Making 1500 didn't help, plus my computer gets really hot and it takes about 15 minutes to fail. |
Hi @avedetvedea, do you mind providing me with a schema and a query that reproduces the error (besides the alias declaration)? I want to reproduce this error on my side. |
@zchenb, are you on the discord channel? or is there any other medium I can privately send you my schema? |
You could send it to my work email: zhibo@edgedb.com |
I have a few debugging notes, but no solution yet. This is the minimal reproducible example, that I could reduce the schema down to:
This is the function call causing the recursion: edgedb/edb/edgeql/compiler/viewgen.py Lines 2400 to 2403 in b305b72
The problematic pointer indirection is stuck on:
... which is obviously incorrect, but I'm not sure for what reason. |
Hey all, I waited for the 4.0 launch to happen before writing again or creating new issues. Is there any possible workarounds or fixes in the horizon for what is happening? I need to use the power of EDB that I can out EQL inside the SDL as computeds/aliases, to be able to query with TS QB dynamically. |
This fell off my radar, I can spend a bit of time on it now. I don't know for specific workarounds as of now, but you can try changing the schema a bit. The bug is probably triggered by something very specific, such as "grouping on back links followed by a cast", so try to change up your expressions and see if you manage to avoid it. Or just wait for 4.1 |
@aljazerzen Was this fixed in 4.1? I cannot test because I cannot add any |
Update: this is still broken on latest master. I've spent an afternoon on it (again) and it is pushing my debugging abilities 😓 What I know:
What's worse is that the recursion does not happen in the normal compiler pass, it happens in the |
Update: I identified the root cause last week: When I fixed this, I bumped into another bug documented in #6561 |
Complicated computed expression have always been ISEs for me, but this time hit with an error trying to ad an alias
The text was updated successfully, but these errors were encountered: