Skip to content

assertion failed: task.unwinder.unwinding #8863

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

Closed
jorendorff opened this issue Aug 29, 2013 · 7 comments · Fixed by #10603
Closed

assertion failed: task.unwinder.unwinding #8863

jorendorff opened this issue Aug 29, 2013 · 7 comments · Fixed by #10603
Labels
A-concurrency Area: Concurrency A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@jorendorff
Copy link
Contributor

fatal runtime error: assertion failed: task.unwinder.unwinding
Abort trap: 6

Program here: https://gist.github.com/jorendorff/6380686

Compiled with rustc -o blocking_pipe blocking_pipe.rs

Output here, with a stack: https://gist.github.com/jorendorff/6383398

@jorendorff
Copy link
Contributor Author

@bblum noted that this doesn't reproduce readily on Linux. I'm on Mac. Maybe changing the 100 on line 100 to a larger number would make it more likely to reproduce, as it would create more tasks (but I'm not too hopeful).

@jorendorff
Copy link
Contributor Author

A shorter version that also crashes here: https://gist.github.com/jorendorff/6383761

@jorendorff
Copy link
Contributor Author

It is distinctly more likely with more RUST_THREADS. Try 16.

@bblum
Copy link
Contributor

bblum commented Sep 4, 2013

Changing number of threads or number of iterations does not help. Still haven't been able to reproduce here.

@jorendorff
Copy link
Contributor Author

OK, one more observation (and I'd be thrilled to gdb this for you, to answer your questions, play your hunches, whatever. I just don't know what to look for.)

There are two ways for the leftover tasks in this program to be killed:

task <unnamed> failed at 'killed by linked failure', /Users/jorendorff/dev/rust/rust/src/libstd/rt/kill.rs:627
task <unnamed> failed at 'receiving on closed channel', /Users/jorendorff/dev/rust/rust/src/libstd/rt/comm.rs:487

The assertion failure only seems to occur when many tasks are "killed by linked failure". When most tasks are killed the other way, it doesn't happen.

@bblum
Copy link
Contributor

bblum commented Sep 5, 2013

It's weird that you say that, because whenever I run the test, basically all the tasks are killed by linked failure. I think I only have one each time receiving on a closed channel.

You say you can gdb it? Can you get a backtrace?

@jorendorff
Copy link
Contributor Author

@bblum Yes, see the last link in the initial report.

bors added a commit that referenced this issue Nov 25, 2013
The reasons for doing this are:

* The model on which linked failure is based is inherently complex
* The implementation is also very complex, and there are few remaining who
  fully understand the implementation
* There are existing race conditions in the core context switching function of
  the scheduler, and possibly others.
* It's unclear whether this model of linked failure maps well to a 1:1 threading
  model

Linked failure is often a desired aspect of tasks, but we would like to take a
much more conservative approach in re-implementing linked failure if at all.

Closes #8674
Closes #8318
Closes #8863
flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 14, 2023
…r=llogiq

Add `needless_pass_by_ref_mut` lint

changelog: [`needless_pass_by_ref_mut`]: This PR add a new lint `needless_pass_by_ref_mut` which emits a warning in case a `&mut` function argument isn't used mutably. It doesn't warn on trait and trait impls functions.

Fixes rust-lang#8863.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-concurrency Area: Concurrency A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants