Repository navigation
Explicitly drop job server helper thread - #165854
Merged
rust-bors[bot] merged 1 commit intoNov 12, 2026
Merged
Conversation
aerooneqq
force-pushed
the
explicitly-drop-helper-thread
branch
from
November 12, 2026 11:06
01a2027 to
bb1742b
Compare
Contributor
|
@bors r+ |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 12, 2026
…hread, r=petrochenkov Explicitly drop job server helper thread An adaptation of an LLM patch that was generated in https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/with/639482582. The original patch consisted from two fixes: explicit drop of a helper thread and additional logic for job server token request counting. This PR implements only the explicit drop part as I don't see how additional requests counting logic should help the issue. This reworks rust-lang#165676, as the [rationale](https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/near/639152114) behind explicit drop of a helper thread seems reasonable for me: > From my rough understanding, while helper is handling a token, its upgrade() is often the last strong ref I guess. So, when run_in_thread_pool_with_globals returns and rustc exits, the token may still be in helper's hands. This fix didn't fail after several launches in rust-lang#165506 and locally. r? @petrochenkov
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 12, 2026
…uwer Rollup of 5 pull requests Successful merges: - #165854 (Explicitly drop job server helper thread) - #164077 (replace `TypingEnv::post_analysis()` with `mir::Body::typing_env()`) - #165305 (hexagon: pass small aggregates on the stack when registers run out) - #165417 (Mention width limit panic in fmt doc) - #165565 (view-types: lower view types from HIR)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 12, 2026
…hread, r=petrochenkov Explicitly drop job server helper thread An adaptation of an LLM patch that was generated in https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/with/639482582. The original patch consisted from two fixes: explicit drop of a helper thread and additional logic for job server token request counting. This PR implements only the explicit drop part as I don't see how additional requests counting logic should help the issue. This reworks rust-lang#165676, as the [rationale](https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/near/639152114) behind explicit drop of a helper thread seems reasonable for me: > From my rough understanding, while helper is handling a token, its upgrade() is often the last strong ref I guess. So, when run_in_thread_pool_with_globals returns and rustc exits, the token may still be in helper's hands. This fix didn't fail after several launches in rust-lang#165506 and locally. r? @petrochenkov
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 12, 2026
…uwer Rollup of 7 pull requests Successful merges: - #161922 (Tie extern "llvm-intrinsics" and llvm.* symbol names together) - #164864 (Avoid hoisting uninitialized reads in EarlyOtherwiseBranch) - #165854 (Explicitly drop job server helper thread) - #164077 (replace `TypingEnv::post_analysis()` with `mir::Body::typing_env()`) - #165305 (hexagon: pass small aggregates on the stack when registers run out) - #165417 (Mention width limit panic in fmt doc) - #165860 (Fix inverted wasm cfg in core benchmarks)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 12, 2026
…uwer Rollup of 7 pull requests Successful merges: - #161922 (Tie extern "llvm-intrinsics" and llvm.* symbol names together) - #165854 (Explicitly drop job server helper thread) - #164077 (replace `TypingEnv::post_analysis()` with `mir::Body::typing_env()`) - #165305 (hexagon: pass small aggregates on the stack when registers run out) - #165417 (Mention width limit panic in fmt doc) - #165860 (Fix inverted wasm cfg in core benchmarks) - #165871 (Cleanup: Remove `name` from `AttributeExt`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 12, 2026
Rollup merge of #165854 - aerooneqq:explicitly-drop-helper-thread, r=petrochenkov Explicitly drop job server helper thread An adaptation of an LLM patch that was generated in https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/with/639482582. The original patch consisted from two fixes: explicit drop of a helper thread and additional logic for job server token request counting. This PR implements only the explicit drop part as I don't see how additional requests counting logic should help the issue. This reworks #165676, as the [rationale](https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/near/639152114) behind explicit drop of a helper thread seems reasonable for me: > From my rough understanding, while helper is handling a token, its upgrade() is often the last strong ref I guess. So, when run_in_thread_pool_with_globals returns and rustc exits, the token may still be in helper's hands. This fix didn't fail after several launches in #165506 and locally. r? @petrochenkov
Member
|
Thanks. Just what to call out that the patch was from @rarick after his carefully review :) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An adaptation of an LLM patch that was generated in https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/with/639482582.
The original patch consisted from two fixes: explicit drop of a helper thread and additional logic for job server token request counting. This PR implements only the explicit drop part as I don't see how additional requests counting logic should help the issue.
This reworks #165676, as the rationale behind explicit drop of a helper thread seems reasonable for me:
This fix didn't fail after several launches in #165506 and locally.
r? @petrochenkov