Skip to content
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

deadlock ice: missing thread name #122035

Closed
matthiaskrgr opened this issue Mar 5, 2024 · 6 comments · Fixed by #122215
Closed

deadlock ice: missing thread name #122035

matthiaskrgr opened this issue Mar 5, 2024 · 6 comments · Fixed by #122215
Labels
C-bug Category: This is a bug. WG-compiler-parallel Working group: Parallelizing the compiler

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Mar 5, 2024

I noticed that when parallel rustc panics due to deadlock, it would say thread 'unnamed' panicked instead of thread 'rustc' panicked.

Is this intended?

@matthiaskrgr matthiaskrgr added C-bug Category: This is a bug. WG-compiler-parallel Working group: Parallelizing the compiler labels Mar 5, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 5, 2024
@ChrisDenton
Copy link
Contributor

ChrisDenton commented Mar 5, 2024

Hm, I did recently land a related std change but I'm not sure if it would cause this issue. It should only affect threads that Rust doesn't create itself and in any case it switches the default name from None (which gets rendered as <unnamed>) to the OS thread name (if available). So if anything I'd have thought it would have the opposite effect.

Though maybe there's something about parallel's deadlocks I'm missing.

@matthiaskrgr
Copy link
Member Author

I think you're good since the problem is older than your pr :D
#120759

@ChrisDenton
Copy link
Contributor

Oh good! I mean bad, but I was dreading a very long debugging session 😆

@matthiaskrgr
Copy link
Member Author

well, if you feel bored or something.... 🙃

@Nilstrieb
Copy link
Member

Serial rustc creates a single thread called rustc. I assume parallel rustc just doesn't name its rayon threads, no debugging session ahead.

@Zoxc
Copy link
Contributor

Zoxc commented Mar 8, 2024

We create a new thread to look for query cycles, it's unnamed at the moment and that's where the panic happens.

jhpratt added a commit to jhpratt/rust that referenced this issue Mar 9, 2024
Some tweaks to the parallel query cycle handler

This renames `deadlock` to `break_query_cycles`. The abort logic is moved next to the thread spawning and gives the thread a name.

Fixes rust-lang#122035.

r? `@oli-obk`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 9, 2024
Some tweaks to the parallel query cycle handler

This renames `deadlock` to `break_query_cycles`. The abort logic is moved next to the thread spawning and gives the thread a name.

Fixes rust-lang#122035.

r? ``@oli-obk``
@bors bors closed this as completed in dc7a9f6 Mar 9, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 9, 2024
Rollup merge of rust-lang#122215 - Zoxc:cycle-detect-names, r=oli-obk

Some tweaks to the parallel query cycle handler

This renames `deadlock` to `break_query_cycles`. The abort logic is moved next to the thread spawning and gives the thread a name.

Fixes rust-lang#122035.

r? ```@oli-obk```
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 9, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Mar 10, 2024
Some tweaks to the parallel query cycle handler

This renames `deadlock` to `break_query_cycles`. The abort logic is moved next to the thread spawning and gives the thread a name.

Fixes rust-lang/rust#122035.

r? ```@oli-obk```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. WG-compiler-parallel Working group: Parallelizing the compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants