Skip to content

Conversation

@ywxt
Copy link
Contributor

@ywxt ywxt commented Nov 10, 2025

Locking shards avoids collect_active_jobs isn't able to be completed during emitting depth limit error.

fix #142159

Zulip: https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/panic.20while.20depth_limit_error/with/554616169

cc @Zoxc

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 10, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Zoxc
Copy link
Contributor

Zoxc commented Nov 12, 2025

This looks fine to me.

@petrochenkov
Copy link
Contributor

Could you add comments explaining why try_collect_active_jobs or collect_active_jobs is preferred in each specific case, and the general logic behind them - when we should choose one or another.

@petrochenkov
Copy link
Contributor

I also don't like the amount of copypaste here.
The methods are not hot, they are only called in exceptional circumstances, from what I see.
So perhaps they could use an additional runtime boolean parameter telling whether to use lock_shards or try_lock_shards in the end, instead of duplicating code?

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2025
@ywxt ywxt force-pushed the depth_limit_error branch from 401568a to 37cf215 Compare November 13, 2025 03:01
@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@ywxt
Copy link
Contributor Author

ywxt commented Nov 13, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 13, 2025
@petrochenkov
Copy link
Contributor

r=me after some parameter renaming #148777 (comment)
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@ywxt ywxt force-pushed the depth_limit_error branch from 37cf215 to a4d0507 Compare November 14, 2025 01:10
@ywxt
Copy link
Contributor Author

ywxt commented Nov 14, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 14, 2025
@ywxt
Copy link
Contributor Author

ywxt commented Nov 14, 2025

I don’t think I have permissions to interact with bors.

@petrochenkov
Copy link
Contributor

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Nov 14, 2025

📌 Commit a4d0507 has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 14, 2025
bors added a commit that referenced this pull request Nov 14, 2025
Rollup of 4 pull requests

Successful merges:

 - #148638 (Fix ICE for repr simd on non struct)
 - #148725 (Implement the alternative `try` block desugaring)
 - #148777 (Lock shards while emitting depth limit error.)
 - #148933 (Add note for option llvm.download-ci-llvm)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e5690e7 into rust-lang:main Nov 14, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 14, 2025
rust-timer added a commit that referenced this pull request Nov 14, 2025
Rollup merge of #148777 - ywxt:depth_limit_error, r=petrochenkov

Lock shards while emitting depth limit error.

Locking shards avoids collect_active_jobs isn't able to be completed during emitting depth limit error.

fix #142159

Zulip: https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/panic.20while.20depth_limit_error/with/554616169

cc `@Zoxc`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: queries overflow the depth limit , ice when trying to get query map

5 participants