Repository navigation
Conversation
used when deciding whether to release a jobserver tokenProxy weak reference as it seems that it is not dropped at all
387ff40 to
958a88e
Compare
|
@bors try jobs=test-x86_64-gnu-aux |
This comment has been minimized.
This comment has been minimized.
Make `Proxy` weak reference as it seems that it is not dropped at all try-job: test-x86_64-gnu-aux
|
💔 Test for 23ce799 failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
|
To sum up the current state:
If I understand correctly (I haven't debugged it yet) the cause of the missing token is not straight in the compiler but because we failed to write it back in |
assert_eq!(read.read(&mut buf).unwrap(), 1);
assert_eq!(write.write(&buf).unwrap(), 1);
|
|
(I think we can merge the |
This comment has been minimized.
This comment has been minimized.
958a88e to
f652be7
Compare
Proxy weak reference as it seems that it is not dropped at all|
@bors try jobs=test-x86_64-gnu-aux |
49d6cbd to
2100d63
Compare
|
@bors try jobs=test-x86_64-gnu-aux-sync |
This comment has been minimized.
This comment has been minimized.
Debugging CI failures when parallel frontend is on by default try-job: test-x86_64-gnu-aux-sync
|
@bors try jobs=test-x86_64-gnu-aux-sync |
This comment has been minimized.
This comment has been minimized.
Debugging CI failures when parallel frontend is on by default try-job: test-x86_64-gnu-aux-sync
|
@bors try jobs=test-x86_64-gnu-aux-sync |
Debugging CI failures when parallel frontend is on by default try-job: test-x86_64-gnu-aux-sync
This comment has been minimized.
This comment has been minimized.
…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
…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
…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
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
|
☔ The latest upstream changes (presumably #165876) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
View all comments
Trying to fix tests that fail when we enable two threads in frontend, this is a fix for a test failure when we did not return all tokens for job server. I tested it in top of #162848 with2and222threads and did not reproduce after 200 launches, while it was certainly reproducing after 20-30 launches without this fix.There is a second failure which is an infinite hang that I managed to get one or two times locally (with
222threads). I don't know the reason for it, but maybe this fix will also help as it did not reproduce with it.cc @Kobzol @petrochenkov