-
Notifications
You must be signed in to change notification settings - Fork 13.3k
panic "entered unreachable code" triggered when iterating over mpsc Receiver #40156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
My guess is that this is the same as #39364, but I wouldn't be certain. |
Does this typically happen near the end of the tests? E.g. is it likely when one end of the channel is being dropped? Or do you think it's just happening in the middle? I looked at the code and it's just doing a vanilla send/recv so I'm surprised it's generating an error... |
The #[derive(Clone)]
pub struct Reservation {
...
plunger: Arc<Sender<ResOrShutdown>>,
...
}
unsafe impl Send for Reservation {} |
@tmiasko // The send port can be sent from place to place, so long as it
// is not used to send non-sendable things.
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: Send> Send for Sender<T> {}
|
@spacejam |
Mmm right, good catch. I would not be surprised if it's related. |
I don't think this example could be used to demonstrate any issues in mpsc:
I was looking at this, because it was the first reproducer that used |
'internal error: entered unreachable code', /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/sync/mpsc/mod.rs:884
encountered while testing race conditions on a lock-free log store that I'm building:
https://github.com/spacejam/rsdb/tree/a709924150374c340aab0ec9bdfb79194a3191db
triggered by running
cargo test log -- --nocapture
while simultaneously running a shell script that shuffles thread niceness to trigger different thread interleavings for teasing out races:The text was updated successfully, but these errors were encountered: