5

Don't hold the active queries lock while calling `make_query` by Zoxc · Pull Req...

 1 year ago
source link: https://github.com/rust-lang/rust/pull/112333
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Contributor

This moves the call to make_query outside the parts that holds the active queries lock in try_collect_active_jobs. This should help removed the deadlock and borrow panic that has been observed when printing the query stack during an ICE.

cc @SparrowLii
r? @cjgillot

SparrowLii reacted with thumbs up emojijyn514 reacted with heart emoji

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

Jun 6, 2023

Contributor

I tried your change locally (making the compiler fail with #![deny(missing_debug_implementations)] when compiling the rayon crate), but the deadlock persists : (

However, I think this PR can be merged, since it cuts some of the possible causes of deadlocks.

Contributor

And I tried to execute the generic implementation of def_span in make_query, which does avoid deadlocks.

Contributor

This makes sense.
@bors r+

Contributor

pushpin Commit fd3d2d4 has been approved by cjgillot

It is now in the queue for this repository.

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

Jun 7, 2023

bors

merged commit 4f2e1df into

rust-lang:master

Jun 8, 2023

11 checks passed

rustbot

added this to the 1.72.0 milestone

Jun 8, 2023

rust-timer

added a commit to rust-lang-ci/rust that referenced this pull request

Jun 8, 2023

Zoxc

deleted the try_collect_active_jobs-deadlock branch

June 9, 2023 03:08

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

Reviewers

No reviews

Assignees

cjgillot

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

Milestone

1.72.0

Development

Successfully merging this pull request may close these issues.

None yet

5 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK