forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#98570 - SparrowLii:deadlock, r=cjgillot
get rid of `tcx` in deadlock handler when parallel compilation This is a very obscure and hard-to-trace problem that affects thread scheduling. If we copy `tcx` to the deadlock handler thread, it will perform unpredictable behavior and cause very weird problems when executing `try_collect_active_jobs`(For example, the deadlock handler thread suddenly preempts the content of the blocked worker thread and executes the unknown judgment branch, like rust-lang#94654). Fortunately we can avoid this behavior by precomputing `query_map`. This change fixes the following ui tests failure on my environment when set `parallel-compiler = true`: ``` [ui] src/test\ui\async-await\no-const-async.rs [ui] src/test\ui\infinite\infinite-struct.rs [ui] src/test\ui\infinite\infinite-tag-type-recursion.rs [ui] src/test\ui\issues\issue-3008-1.rs [ui] src/test\ui\issues\issue-3008-2.rs [ui] src/test\ui\issues\issue-32326.rs [ui] src/test\ui\issues\issue-57271.rs [ui] src/test\ui\issues\issue-72554.rs [ui] src/test\ui\parser\fn-header-semantic-fail.rs [ui] src/test\ui\union\union-nonrepresentable.rs ``` Updates rust-lang#75760 Fixes rust-lang#94654
- Loading branch information
Showing
4 changed files
with
9 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters