-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Don't use queries when printing the query stack #112603
Conversation
r? @eholk (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
932347a
to
30b2d25
Compare
This seems like a really heavy hammer to solve this issue. Is it possible to just use |
if !can_call_queries { | ||
// Return a minimal query frame if we can't call queries | ||
return QueryStackFrame::new(String::new(), None, None, None, kind, None, || Hash64::ZERO); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be moved below the description
formatting? It seems like that shouldn't use any queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That can and does use queries.
It would be nice to at least print query keys, but I think we need either a separate non-query printing path or a better way to statically prevent queries to run for the existing path. |
☔ The latest upstream changes (presumably #113303) made this pull request unmergeable. Please resolve the merge conflicts. |
@compiler-errors - is the root of your concern that we're losing a lot of really helpful query information in the common case to avoid recursion in pathological cases? I wonder if having a |
Pretty much, yeah. The query stack being able to print keys on ICEs, for example, is quite helpful in my experience debugging the compiler. |
A recursion limit doesn't help for the parallel compiler which has more interesting failure scenarios. A more reliable way to print def paths is probably the way to go to restore debugging information. |
30b2d25
to
bb619af
Compare
I've introduced cc @cjgillot |
☔ The latest upstream changes (presumably #115326) made this pull request unmergeable. Please resolve the merge conflicts. |
This PR is very complex, and makes the query description weird by changing the key type behind our back. Today, we manipulate TLS twice when setting up a query:
Can the outer one remove access to the tcx, and have the inner one put it back? |
ping from triage - can you post your status on this PR? This PR has not received an update in a few months. Thank you! FYI: when a PR is ready for review, send a message containing |
It doesn't seem like either approaches taken in this PR are very popular. We may instead make the existing printing code respect |
This adds a parameter to
try_collect_active_jobs
indicating if it can use queries to describe query frames. This is set to false when when printing the query stack during an ICE to work around the infinite recursion seen in #112522.