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

Rustc hangs due to possible mutex poisoning #85638

Closed
0xdeafbeef opened this issue May 24, 2021 · 1 comment
Closed

Rustc hangs due to possible mutex poisoning #85638

0xdeafbeef opened this issue May 24, 2021 · 1 comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@0xdeafbeef
Copy link

Rustc stucks on macro expansion.
It reproduces on all rustc versions from 1.46 to 1.51.
Looks, like panic makes mutex poisoned.

I couldn't create mre for now.

cargo +nightly -Z time-passes																																											   gdb where					
																																									          │#0  0x00007f67a0cfe9ba in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
time:   0.000; rss:  174MB ->  174MB (   +0MB)finish_ongoing_codegen                                                                                                          │#1  0x00007f67a0cf37a3 in __pthread_clockjoin_ex () from /usr/lib/libpthread.so.0
time:   0.000; rss:  174MB ->  174MB (   +0MB)llvm_dump_timing_file                                                                                                           │#2  0x00007f67a0ddac1d in std::sys::unix::thread::Thread::join () at library/std/src/sys/unix/thread.rs:177
time:   0.000; rss:  174MB ->  174MB (   +0MB)serialize_work_products                                                                                                         │#3  0x00007f67a3099682 in std::thread::JoinHandle<T>::join ()
time:   0.000; rss:  174MB ->  174MB (   +0MB)link_binary_check_files_are_writeable                                                                                           │   from /home/vladimir/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-e924046ea34a2c7b.so
time:   0.000; rss:  174MB ->  174MB (   +0MB)link_binary_remove_temps                                                                                                        │#4  0x00007f67a309f1a4 in rustc_interface::interface::run_compiler ()
time:   0.000; rss:  174MB ->  174MB (   +0MB)link_binary                                                                                                                     │   from /home/vladimir/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-e924046ea34a2c7b.so
time:   0.000; rss:  174MB ->  174MB (   +0MB)link_crate                                                                                                                      │#5  0x00007f67a3091467 in rustc_driver::RunCompiler::run ()
time:   0.000; rss:  174MB ->  174MB (   +0MB)link                                                                                                                            │   from /home/vladimir/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-e924046ea34a2c7b.so
time:   0.206; rss:   45MB ->  139MB (  +94MB)total                                                                                                                           │#6  0x00007f67a30c30ff in <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once ()
    Checking trading-executor v0.1.0 (/home/vladimir/dev/work/traging-excecutor)                                                                                              │   from /home/vladimir/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-e924046ea34a2c7b.so
time:   0.000; rss:   56MB ->   56MB (   +0MB)  parse_crate                                                                                                                   │#7  0x00007f67a309543c in rustc_driver::main () from /home/vladimir/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-e924046ea34a2c7b.so
time:   0.000; rss:   56MB ->   56MB (   +0MB)  attributes_injection                                                                                                          │#8  0x00005589b1005ead in rustc_main::main ()
time:   0.003; rss:   56MB ->   58MB (   +2MB)  incr_comp_prepare_session_directory                                                                                           │#9  0x00005589b1005ee3 in std::sys_common::backtrace::__rust_begin_short_backtrace ()
time:   0.000; rss:   58MB ->   58MB (   +0MB)  incr_comp_garbage_collect_session_directories                                                                                 │#10 0x00005589b1005ef9 in std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h4547595ed69168a7 ()
time:   0.000; rss:   58MB ->   58MB (   +0MB)  recursion_limit                                                                                                               │#11 0x00007f67a0dcec19 in core::ops::function::impls::{{impl}}::call_once<(),Fn<()>> ()
time:   0.000; rss:   58MB ->   58MB (   +0MB)  plugin_loading                                                                                                                │    at /rustc/f64503eb555475d65ae5503ef22439ca5dd394fd/library/core/src/ops/function.rs:259
time:   0.000; rss:   58MB ->   58MB (   +0MB)  plugin_registration                                                                                                           │#12 std::panicking::try::do_call<&Fn<()>,i32> () at library/std/src/panicking.rs:401
time:   0.000; rss:   58MB ->   58MB (   +0MB)  crate_injection                                                                                                               │#13 std::panicking::try<i32,&Fn<()>> () at library/std/src/panicking.rs:365
^C  Building [=======================> ] 499/501: trading-executor                                                                                                            │#14 std::panic::catch_unwind<&Fn<()>,i32> () at library/std/src/panic.rs:433
                                                                                                                                                                              │#15 std::rt::lang_start_internal () at library/std/src/rt.rs:34
@0xdeafbeef 0xdeafbeef added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 24, 2021
@0xdeafbeef 0xdeafbeef changed the title Rustc possible mutex poisoning Rustc hangs due to possible mutex poisoning May 24, 2021
@0xdeafbeef
Copy link
Author

Not a rustc bug, fixed here

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. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant