Skip to content

stream_send_recv_stress tests: wait for threads to finish#156365

Open
RalfJung wants to merge 1 commit intorust-lang:mainfrom
RalfJung:stream_send_recv_stress
Open

stream_send_recv_stress tests: wait for threads to finish#156365
RalfJung wants to merge 1 commit intorust-lang:mainfrom
RalfJung:stream_send_recv_stress

Conversation

@RalfJung
Copy link
Copy Markdown
Member

@RalfJung RalfJung commented May 9, 2026

These tests currently fail in Miri (when run with nextest) because all they do is spawn a lot of threads that will do stuff, but they don't wait for the threads to actually finish. Miri by default errors when there are background threads lingering when main is done (since that can indicate a leak, and since it makes it impossible to check for memory leaks). Miri gives background threads a bit of time to finish when main is done, but for these tests that's nowhere near enough since basically the entire test runs after main is done.

Outside Miri, this could also still mean that the test doesn't actually run to completion, it might get abort when main finishes.

So let's use thread::scope to ensure all threads are done before the test is considered done.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 9, 2026

r? @nia-e

rustbot has assigned @nia-e.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 8 candidates
  • Random selection from Mark-Simulacrum, nia-e

@nia-e
Copy link
Copy Markdown
Member

nia-e commented May 10, 2026

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 10, 2026

📌 Commit 773af23 has been approved by nia-e

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 May 10, 2026
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 10, 2026
…r=nia-e

stream_send_recv_stress tests: wait for threads to finish

These tests currently fail in Miri (when run with nextest) because all they do is spawn a lot of threads that will do stuff, but they don't wait for the threads to actually finish. Miri by default errors when there are background threads lingering when `main` is done (since that can indicate a leak, and since it makes it impossible to check for memory leaks). Miri gives background threads a bit of time to finish when `main` is done, but for these tests that's nowhere near enough since basically the entire test runs after `main` is done.

Outside Miri, this could also still mean that the test doesn't actually run to completion, it might get abort when `main` finishes.

So let's use `thread::scope` to ensure all threads are done before the test is considered done.
rust-bors Bot pushed a commit that referenced this pull request May 10, 2026
Rollup of 6 pull requests

Successful merges:

 - #153975 (remove forever-deprecated and hidden `f64` methods)
 - #155679 (rustdoc: Reify emission types)
 - #155982 (Fix closure HIR span context mismatch)
 - #156323 (Handle --print=backend-has-mnemonic in cg_clif)
 - #156129 (compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`)
 - #156365 (stream_send_recv_stress tests: wait for threads to finish)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 10, 2026
…r=nia-e

stream_send_recv_stress tests: wait for threads to finish

These tests currently fail in Miri (when run with nextest) because all they do is spawn a lot of threads that will do stuff, but they don't wait for the threads to actually finish. Miri by default errors when there are background threads lingering when `main` is done (since that can indicate a leak, and since it makes it impossible to check for memory leaks). Miri gives background threads a bit of time to finish when `main` is done, but for these tests that's nowhere near enough since basically the entire test runs after `main` is done.

Outside Miri, this could also still mean that the test doesn't actually run to completion, it might get abort when `main` finishes.

So let's use `thread::scope` to ensure all threads are done before the test is considered done.
rust-bors Bot pushed a commit that referenced this pull request May 10, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #155679 (rustdoc: Reify emission types)
 - #155982 (Fix closure HIR span context mismatch)
 - #156323 (Handle --print=backend-has-mnemonic in cg_clif)
 - #156129 (compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`)
 - #156365 (stream_send_recv_stress tests: wait for threads to finish)
 - #156368 (Fix invalid unreachable in is_known_valid_scrutinee for Reborrow)
rust-bors Bot pushed a commit that referenced this pull request May 10, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #155679 (rustdoc: Reify emission types)
 - #155982 (Fix closure HIR span context mismatch)
 - #156323 (Handle --print=backend-has-mnemonic in cg_clif)
 - #156129 (compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`)
 - #156365 (stream_send_recv_stress tests: wait for threads to finish)
 - #156368 (Fix invalid unreachable in is_known_valid_scrutinee for Reborrow)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 10, 2026
…r=nia-e

stream_send_recv_stress tests: wait for threads to finish

These tests currently fail in Miri (when run with nextest) because all they do is spawn a lot of threads that will do stuff, but they don't wait for the threads to actually finish. Miri by default errors when there are background threads lingering when `main` is done (since that can indicate a leak, and since it makes it impossible to check for memory leaks). Miri gives background threads a bit of time to finish when `main` is done, but for these tests that's nowhere near enough since basically the entire test runs after `main` is done.

Outside Miri, this could also still mean that the test doesn't actually run to completion, it might get abort when `main` finishes.

So let's use `thread::scope` to ensure all threads are done before the test is considered done.
rust-bors Bot pushed a commit that referenced this pull request May 10, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #156394 (miri subtree update)
 - #154972 (Implement `core::arch::return_address` and tests)
 - #155679 (rustdoc: Reify emission types)
 - #155982 (Fix closure HIR span context mismatch)
 - #156323 (Handle --print=backend-has-mnemonic in cg_clif)
 - #156387 (std fs tests: avoid matching on OS-provided error string)
 - #156129 (compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`)
 - #156192 (core: Replace `ptr::slice_from_raw_parts` with `slice::from_raw_parts`)
 - #156365 (stream_send_recv_stress tests: wait for threads to finish)
 - #156368 (Fix invalid unreachable in is_known_valid_scrutinee for Reborrow)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants