Skip to content

Remove a flaky got_timeout assert from two channel tests#153534

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Zalathar:flaky-stress
Mar 23, 2026
Merged

Remove a flaky got_timeout assert from two channel tests#153534
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Zalathar:flaky-stress

Conversation

@Zalathar
Copy link
Member

@Zalathar Zalathar commented Mar 7, 2026

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in #153387 (comment).

Earlier failures:


In CI, the receiver thread can be descheduled for a surprisingly long time, so
there's no guarantee that a timeout actually occurs.
@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 Mar 7, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 7, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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

@Zalathar
Copy link
Member Author

Zalathar commented Mar 7, 2026

});

let mut recv_count = 0;
let mut got_timeout = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why not just make the sender thread have a while loop on a shared atomic value (like an Arc<AtomicBool>) that yields itself through thread::yield_now? Or I'm wondering if we could also use a shared Condvar that waits in the sender thread and the receiver thread is the one that sends a notification? That way we can guarantee that our receiver thread experiences a RecvTimeoutError::Timeout error after 10 ms and either set the atomic value to a state that the while loop from the sender thread will stop looping on or the sender thread just resumes its iteration in the for loop upon receiving a notification.

@Mark-Simulacrum
Copy link
Member

It's not very clear to me what the intent of the tests here was. They were added in #33748 with the original recv_timeout impl, but I don't see any comments there on why we thought this test was particularly useful.

I think I'd also be happy to r+ a full removal, but just removing the expectation of seeing a timeout seems OK for now. We do have a couple tests that verify recv_timeout does in fact timeout (though mostly with empty channels...), so I think we'll catch at least that kind of bug regardless.

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 21, 2026

📌 Commit 7cb6912 has been approved by Mark-Simulacrum

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 Mar 21, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 21, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
rust-bors bot pushed a commit that referenced this pull request Mar 22, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #122668 (Add APIs for dealing with titlecase)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #154094 (add neon load/store assembly test)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
Zalathar added a commit to Zalathar/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
rust-bors bot pushed a commit that referenced this pull request Mar 22, 2026
Rollup of 6 pull requests

Successful merges:

 - #122668 (Add APIs for dealing with titlecase)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
Zalathar added a commit to Zalathar/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
rust-bors bot pushed a commit that referenced this pull request Mar 22, 2026
Rollup of 7 pull requests

Successful merges:

 - #122668 (Add APIs for dealing with titlecase)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
Zalathar added a commit to Zalathar/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
rust-bors bot pushed a commit that referenced this pull request Mar 22, 2026
Rollup of 9 pull requests

Successful merges:

 - #122668 (Add APIs for dealing with titlecase)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #153582 (Simplify find_attr! for HirId usage)
 - #154174 (allow `incomplete_features` in most UI tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
rust-bors bot pushed a commit that referenced this pull request Mar 23, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #122668 (Add APIs for dealing with titlecase)
 - #152543 (privacy: Fix type privacy holes in RPITITs)
 - #153107 (Optimize BTreeMap::append() using CursorMut)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - #153931 (remove usages of to-be-deprecated numeric constants)
 - #150630 (Unknown -> Unsupported compression algorithm)
 - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - #153582 (Simplify find_attr! for HirId usage)
 - #153623 (std: move `sys::pal::os` to `sys::paths`)
 - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - #153936 (Skip stack_start_aligned for immediate-abort)
 - #154011 (implement `BinaryHeap::as_mut_slice`)
 - #154167 (ui/lto: move and rename two tests from issues/)
 - #154174 (allow `incomplete_features` in most UI tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
rust-bors bot pushed a commit that referenced this pull request Mar 23, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #122668 (Add APIs for dealing with titlecase)
 - #152543 (privacy: Fix type privacy holes in RPITITs)
 - #153107 (Optimize BTreeMap::append() using CursorMut)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - #153931 (remove usages of to-be-deprecated numeric constants)
 - #150630 (Unknown -> Unsupported compression algorithm)
 - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - #153582 (Simplify find_attr! for HirId usage)
 - #153623 (std: move `sys::pal::os` to `sys::paths`)
 - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - #153936 (Skip stack_start_aligned for immediate-abort)
 - #154011 (implement `BinaryHeap::as_mut_slice`)
 - #154167 (ui/lto: move and rename two tests from issues/)
 - #154174 (allow `incomplete_features` in most UI tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
rust-bors bot pushed a commit that referenced this pull request Mar 23, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #152543 (privacy: Fix type privacy holes in RPITITs)
 - #153107 (Optimize BTreeMap::append() using CursorMut)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - #153931 (remove usages of to-be-deprecated numeric constants)
 - #150630 (Unknown -> Unsupported compression algorithm)
 - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - #153582 (Simplify find_attr! for HirId usage)
 - #153623 (std: move `sys::pal::os` to `sys::paths`)
 - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - #153936 (Skip stack_start_aligned for immediate-abort)
 - #154011 (implement `BinaryHeap::as_mut_slice`)
 - #154167 (ui/lto: move and rename two tests from issues/)
 - #154174 (allow `incomplete_features` in most UI tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
@rust-bors rust-bors bot merged commit f2ab755 into rust-lang:main Mar 23, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 23, 2026
@Zalathar Zalathar deleted the flaky-stress branch March 23, 2026 23:08
github-actions bot pushed a commit to rust-lang/stdarch that referenced this pull request Mar 26, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - rust-lang/rust#152543 (privacy: Fix type privacy holes in RPITITs)
 - rust-lang/rust#153107 (Optimize BTreeMap::append() using CursorMut)
 - rust-lang/rust#153312 (Packages as namespaces part 1)
 - rust-lang/rust#153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - rust-lang/rust#153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - rust-lang/rust#153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - rust-lang/rust#153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - rust-lang/rust#153931 (remove usages of to-be-deprecated numeric constants)
 - rust-lang/rust#150630 (Unknown -> Unsupported compression algorithm)
 - rust-lang/rust#153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - rust-lang/rust#153582 (Simplify find_attr! for HirId usage)
 - rust-lang/rust#153623 (std: move `sys::pal::os` to `sys::paths`)
 - rust-lang/rust#153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - rust-lang/rust#153936 (Skip stack_start_aligned for immediate-abort)
 - rust-lang/rust#154011 (implement `BinaryHeap::as_mut_slice`)
 - rust-lang/rust#154167 (ui/lto: move and rename two tests from issues/)
 - rust-lang/rust#154174 (allow `incomplete_features` in most UI tests)
 - rust-lang/rust#154175 (Add new alias for Guillaume Gomez email address)
 - rust-lang/rust#154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - rust-lang/rust#154188 (Update the tracking issue for #[diagnostic::on_move])
 - rust-lang/rust#154201 (Use enums to clarify `DepNodeColorMap` color marking )
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.

4 participants