Skip to content

[red-knot] Panic leads to hang #17537

@sharkdp

Description

@sharkdp

With a 5%-10% chance, Red Knot hangs when running on hydpy (with dependencies installed). In all other cases, Red Knot panics with

thread '<unnamed>' panicked at /home/shark/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/87bf6b6/src/function/fetch.rs:167:25:
dependency graph cycle querying try_metaclass_(Id(9673)); set cycle_fn/cycle_initial to fixpoint iterate
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

but then sometimes, it seems as if that panic does not properly lead to a crash.

When the hang occurs, the Red Knot is in the following state (all threads waiting):

  • Thread 1: The main thread waits for a new message in this recv() call.
  • Threads 2-5: All rayon worker threads seem to be idle.
  • (Thread 6: the ctrl-c thread, implicitly started here).
Full thread backtraces with RAYON_NUM_THREADS=4
Thread 6 (Thread 0x77abf3e5c6c0 (LWP 83184) "ctrl-c"):
#0  0x000077abf3f1ebe2 in ?? () from /usr/lib/libc.so.6
#1  0x000077abf3f12e33 in ?? () from /usr/lib/libc.so.6
#2  0x000077abf3f12e74 in ?? () from /usr/lib/libc.so.6
#3  0x000077abf3f8da3e in read () from /usr/lib/libc.so.6
#4  0x00005b20271e2285 in nix::unistd::read (fd=3, buf=...) at src/unistd.rs:1097
#5  0x00005b2027182395 in ctrlc::platform::unix::block_ctrl_c () at /home/shark/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ctrlc-3.4.6/src/platform/unix/mod.rs:180
#6  0x00005b202717da12 in ctrlc::set_handler_inner::{closure#0}<red_knot::run_check::{closure_env#4}> () at /home/shark/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ctrlc-3.4.6/src/lib.rs:141
#7  0x00005b20271a4156 in std::sys::backtrace::__rust_begin_short_backtrace<ctrlc::set_handler_inner::{closure_env#0}<red_knot::run_check::{closure_env#4}>, ()> (f=<error reading variable: Cannot access memory at address 0xb>) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:152
#8  0x00005b202716e6aa in std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure#0}<ctrlc::set_handler_inner::{closure_env#0}<red_knot::run_check::{closure_env#4}>, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559
#9  0x00005b20271d33d0 in core::panic::unwind_safe::{impl#23}::call_once<(), std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ctrlc::set_handler_inner::{closure_env#0}<red_knot::run_check::{closure_env#4}>, ()>> (self=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272
#10 0x00005b20271d382b in std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ctrlc::set_handler_inner::{closure_env#0}<red_knot::run_check::{closure_env#4}>, ()>>, ()> (data=0x77abf3e5ba78) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:587
#11 0x00005b202716e98b in __rust_try ()
#12 0x00005b202716e093 in std::panicking::try<(), core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ctrlc::set_handler_inner::{closure_env#0}<red_knot::run_check::{closure_env#4}>, ()>>> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:550
#13 std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<ctrlc::set_handler_inner::{closure_env#0}<red_knot::run_check::{closure_env#4}>, ()>>, ()> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:358
#14 std::thread::{impl#0}::spawn_unchecked_::{closure#1}<ctrlc::set_handler_inner::{closure_env#0}<red_knot::run_check:--Type <RET> for more, q to quit, c to continue without paging--
:{closure_env#4}>, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:557
#15 0x00005b20271a542e in core::ops::function::FnOnce::call_once<std::thread::{impl#0}::spawn_unchecked_::{closure_env#1}<ctrlc::set_handler_inner::{closure_env#0}<red_knot::run_check::{closure_env#4}>, ()>, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
#16 0x00005b2028881f3b in alloc::boxed::{impl#28}::call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1976
#17 alloc::boxed::{impl#28}::call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1976
#18 std::sys::pal::unix::thread::{impl#2}::new::thread_start () at library/std/src/sys/pal/unix/thread.rs:106
#19 0x000077abf3f1670a in ?? () from /usr/lib/libc.so.6
#20 0x000077abf3f9aaac in ?? () from /usr/lib/libc.so.6

Thread 5 (Thread 0x77abf3c5b6c0 (LWP 83185) "red_knot"):
#0  0x000077abf3f9888d in syscall () from /usr/lib/libc.so.6
#1  0x00005b2028884885 in std::sys::pal::unix::futex::futex_wait () at library/std/src/sys/pal/unix/futex.rs:72
#2  std::sys::sync::condvar::futex::Condvar::wait_optional_timeout () at library/std/src/sys/sync/condvar/futex.rs:49
#3  std::sys::sync::condvar::futex::Condvar::wait () at library/std/src/sys/sync/condvar/futex.rs:33
#4  0x00005b20285bbd52 in std::sync::poison::condvar::Condvar::wait<bool> (self=0x5b205af39a08, guard=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/poison/condvar.rs:191
#5  0x00005b20285aa1bf in rayon_core::sleep::Sleep::sleep<rayon_core::registry::{impl#10}::wait_until_cold::{closure_env#0}> (self=0x5b205af3a458, idle_state=0x77abf3c59fa0, latch=0x5b205ae0c570, has_injected_jobs=...) at src/sleep/mod.rs:188
#6  0x00005b20285a9b86 in rayon_core::sleep::Sleep::no_work_found<rayon_core::registry::{impl#10}::wait_until_cold::{closure_env#0}> (self=0x5b205af3a458, idle_state=0x77abf3c59fa0, latch=0x5b205ae0c570, has_injected_jobs=...) at src/sleep/mod.rs:107
#7  0x00005b20285a4ef6 in rayon_core::registry::WorkerThread::wait_until_cold (self=0x77abf3c5a180, latch=0x5b205ae0c570) at src/registry.rs:798
#8  0x00005b20285a4c6b in rayon_core::registry::WorkerThread::wait_until<rayon_core::latch::OnceLatch> (self=0x77abf3c5a180, latch=0x5b205ae0c570) at src/registry.rs:769
#9  0x00005b20285a5045 in rayon_core::registry::WorkerThread::wait_until_out_of_work (self=0x77abf3c5a180) at src/registry.rs:818
#10 0x00005b20285a554f in rayon_core::registry::main_loop (thread=...) at src/registry.rs:923
#11 0x00005b20285a1ff6 in rayon_core::registry::ThreadBuilder::run (self=...) at src/registry.rs:53
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00005b20285a247d in rayon_core::registry::{impl#2}::spawn::{closure#0} () at src/registry.rs:98
#13 0x00005b20285aaa16 in std::sys::backtrace::__rust_begin_short_backtrace<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:152
#14 0x00005b20285abe3b in std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559
#15 0x00005b20285aa8b4 in core::panic::unwind_safe::{impl#23}::call_once<(), std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>> (self=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272
#16 0x00005b20285b2978 in std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>, ()> (data=0x77abf3c5a9d8) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:587
#17 0x00005b20285ae03b in __rust_try ()
#18 0x00005b20285abbb8 in std::panicking::try<(), core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:550
#19 std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>, ()> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:358
#20 std::thread::{impl#0}::spawn_unchecked_::{closure#1}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:557
#21 0x00005b20285b5dcf in core::ops::function::FnOnce::call_once<std::thread::{impl#0}::spawn_unchecked_::{closure_env#1}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
#22 0x00005b2028881f3b in alloc::boxed::{impl#28}::call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1976
#23 alloc::boxed::{impl#28}::call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1976
#24 std::sys::pal::unix::thread::{impl#2}::new::thread_start () at library/std/src/sys/pal/unix/thread.rs:106
#25 0x000077abf3f1670a in ?? () from /usr/lib/libc.so.6
#26 0x000077abf3f9aaac in ?? () from /usr/lib/libc.so.6
--Type <RET> for more, q to quit, c to continue without paging--

Thread 4 (Thread 0x77abeb9ff6c0 (LWP 83186) "red_knot"):
#0  0x000077abf3f9888d in syscall () from /usr/lib/libc.so.6
#1  0x00005b2028884885 in std::sys::pal::unix::futex::futex_wait () at library/std/src/sys/pal/unix/futex.rs:72
#2  std::sys::sync::condvar::futex::Condvar::wait_optional_timeout () at library/std/src/sys/sync/condvar/futex.rs:49
#3  std::sys::sync::condvar::futex::Condvar::wait () at library/std/src/sys/sync/condvar/futex.rs:33
#4  0x00005b20285bbd52 in std::sync::poison::condvar::Condvar::wait<bool> (self=0x5b205af39a88, guard=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/poison/condvar.rs:191
#5  0x00005b20285aa1bf in rayon_core::sleep::Sleep::sleep<rayon_core::registry::{impl#10}::wait_until_cold::{closure_env#0}> (self=0x5b205af3a458, idle_state=0x77abeb9fdfa0, latch=0x5b205ae0c5a0, has_injected_jobs=...) at src/sleep/mod.rs:188
#6  0x00005b20285a9b86 in rayon_core::sleep::Sleep::no_work_found<rayon_core::registry::{impl#10}::wait_until_cold::{closure_env#0}> (self=0x5b205af3a458, idle_state=0x77abeb9fdfa0, latch=0x5b205ae0c5a0, has_injected_jobs=...) at src/sleep/mod.rs:107
#7  0x00005b20285a4ef6 in rayon_core::registry::WorkerThread::wait_until_cold (self=0x77abeb9fe180, latch=0x5b205ae0c5a0) at src/registry.rs:798
#8  0x00005b20285a4c6b in rayon_core::registry::WorkerThread::wait_until<rayon_core::latch::OnceLatch> (self=0x77abeb9fe180, latch=0x5b205ae0c5a0) at src/registry.rs:769
#9  0x00005b20285a5045 in rayon_core::registry::WorkerThread::wait_until_out_of_work (self=0x77abeb9fe180) at src/registry.rs:818
#10 0x00005b20285a554f in rayon_core::registry::main_loop (thread=...) at src/registry.rs:923
#11 0x00005b20285a1ff6 in rayon_core::registry::ThreadBuilder::run (self=...) at src/registry.rs:53
#12 0x00005b20285a247d in rayon_core::registry::{impl#2}::spawn::{closure#0} () at src/registry.rs:98
#13 0x00005b20285aaa16 in std::sys::backtrace::__rust_begin_short_backtrace<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:152
#14 0x00005b20285abe3b in std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559
#15 0x00005b20285aa8b4 in core::panic::unwind_safe::{impl#23}::call_once<(), std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>> (self=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272
#16 0x00005b20285b2978 in std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>, ()> (dat--Type <RET> for more, q to quit, c to continue without paging--
a=0x77abeb9fe9d8) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:587
#17 0x00005b20285ae03b in __rust_try ()
#18 0x00005b20285abbb8 in std::panicking::try<(), core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:550
#19 std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>, ()> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:358
#20 std::thread::{impl#0}::spawn_unchecked_::{closure#1}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:557
#21 0x00005b20285b5dcf in core::ops::function::FnOnce::call_once<std::thread::{impl#0}::spawn_unchecked_::{closure_env#1}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
#22 0x00005b2028881f3b in alloc::boxed::{impl#28}::call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1976
#23 alloc::boxed::{impl#28}::call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1976
#24 std::sys::pal::unix::thread::{impl#2}::new::thread_start () at library/std/src/sys/pal/unix/thread.rs:106
#25 0x000077abf3f1670a in ?? () from /usr/lib/libc.so.6
#26 0x000077abf3f9aaac in ?? () from /usr/lib/libc.so.6

Thread 3 (Thread 0x77abf3a5a6c0 (LWP 83187) "red_knot"):
#0  0x000077abf3f9888d in syscall () from /usr/lib/libc.so.6
#1  0x00005b2028884885 in std::sys::pal::unix::futex::futex_wait () at library/std/src/sys/pal/unix/futex.rs:72
#2  std::sys::sync::condvar::futex::Condvar::wait_optional_timeout () at library/std/src/sys/sync/condvar/futex.rs:49
#3  std::sys::sync::condvar::futex::Condvar::wait () at library/std/src/sys/sync/condvar/futex.rs:33
#4  0x00005b20285bbd52 in std::sync::poison::condvar::Condvar::wait<bool> (self=0x5b205af39b08, guard=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/poison/condvar.rs:191
#5  0x00005b20285aa1bf in rayon_core::sleep::Sleep::sleep<rayon_core::registry::{impl#10}::wait_until_cold::{closure_env#0}> (self=0x5b205af3a458, idle_state=0x77abf3a58fa0, latch=0x5b205ae0c5d0, has_injected_jobs=...) at src/sleep/mod.rs:188
#6  0x00005b20285a9b86 in rayon_core::sleep::Sleep::no_work_found<rayon_core::registry::{impl#10}::wait_until_cold::{cl--Type <RET> for more, q to quit, c to continue without paging--
osure_env#0}> (self=0x5b205af3a458, idle_state=0x77abf3a58fa0, latch=0x5b205ae0c5d0, has_injected_jobs=...) at src/sleep/mod.rs:107
#7  0x00005b20285a4ef6 in rayon_core::registry::WorkerThread::wait_until_cold (self=0x77abf3a59180, latch=0x5b205ae0c5d0) at src/registry.rs:798
#8  0x00005b20285a4c6b in rayon_core::registry::WorkerThread::wait_until<rayon_core::latch::OnceLatch> (self=0x77abf3a59180, latch=0x5b205ae0c5d0) at src/registry.rs:769
#9  0x00005b20285a5045 in rayon_core::registry::WorkerThread::wait_until_out_of_work (self=0x77abf3a59180) at src/registry.rs:818
#10 0x00005b20285a554f in rayon_core::registry::main_loop (thread=...) at src/registry.rs:923
#11 0x00005b20285a1ff6 in rayon_core::registry::ThreadBuilder::run (self=...) at src/registry.rs:53
#12 0x00005b20285a247d in rayon_core::registry::{impl#2}::spawn::{closure#0} () at src/registry.rs:98
#13 0x00005b20285aaa16 in std::sys::backtrace::__rust_begin_short_backtrace<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:152
#14 0x00005b20285abe3b in std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559
#15 0x00005b20285aa8b4 in core::panic::unwind_safe::{impl#23}::call_once<(), std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>> (self=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272
#16 0x00005b20285b2978 in std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>, ()> (data=0x77abf3a599d8) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:587
#17 0x00005b20285ae03b in __rust_try ()
#18 0x00005b20285abbb8 in std::panicking::try<(), core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:550
#19 std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>, ()> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:358
#20 std::thread::{impl#0}::spawn_unchecked_::{closure#1}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:557
--Type <RET> for more, q to quit, c to continue without paging--
#21 0x00005b20285b5dcf in core::ops::function::FnOnce::call_once<std::thread::{impl#0}::spawn_unchecked_::{closure_env#1}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
#22 0x00005b2028881f3b in alloc::boxed::{impl#28}::call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1976
#23 alloc::boxed::{impl#28}::call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1976
#24 std::sys::pal::unix::thread::{impl#2}::new::thread_start () at library/std/src/sys/pal/unix/thread.rs:106
#25 0x000077abf3f1670a in ?? () from /usr/lib/libc.so.6
#26 0x000077abf3f9aaac in ?? () from /usr/lib/libc.so.6

Thread 2 (Thread 0x77abf38596c0 (LWP 83188) "red_knot"):
#0  0x000077abf3f9888d in syscall () from /usr/lib/libc.so.6
#1  0x00005b2028884885 in std::sys::pal::unix::futex::futex_wait () at library/std/src/sys/pal/unix/futex.rs:72
#2  std::sys::sync::condvar::futex::Condvar::wait_optional_timeout () at library/std/src/sys/sync/condvar/futex.rs:49
#3  std::sys::sync::condvar::futex::Condvar::wait () at library/std/src/sys/sync/condvar/futex.rs:33
#4  0x00005b20285bbd52 in std::sync::poison::condvar::Condvar::wait<bool> (self=0x5b205af39b88, guard=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/poison/condvar.rs:191
#5  0x00005b20285aa1bf in rayon_core::sleep::Sleep::sleep<rayon_core::registry::{impl#10}::wait_until_cold::{closure_env#0}> (self=0x5b205af3a458, idle_state=0x77abf3857fa0, latch=0x5b205ae0c600, has_injected_jobs=...) at src/sleep/mod.rs:188
#6  0x00005b20285a9b86 in rayon_core::sleep::Sleep::no_work_found<rayon_core::registry::{impl#10}::wait_until_cold::{closure_env#0}> (self=0x5b205af3a458, idle_state=0x77abf3857fa0, latch=0x5b205ae0c600, has_injected_jobs=...) at src/sleep/mod.rs:107
#7  0x00005b20285a4ef6 in rayon_core::registry::WorkerThread::wait_until_cold (self=0x77abf3858180, latch=0x5b205ae0c600) at src/registry.rs:798
#8  0x00005b20285a4c6b in rayon_core::registry::WorkerThread::wait_until<rayon_core::latch::OnceLatch> (self=0x77abf3858180, latch=0x5b205ae0c600) at src/registry.rs:769
#9  0x00005b20285a5045 in rayon_core::registry::WorkerThread::wait_until_out_of_work (self=0x77abf3858180) at src/registry.rs:818
#10 0x00005b20285a554f in rayon_core::registry::main_loop (thread=...) at src/registry.rs:923
#11 0x00005b20285a1ff6 in rayon_core::registry::ThreadBuilder::run (self=...) at src/registry.rs:53
#12 0x00005b20285a247d in rayon_core::registry::{impl#2}::spawn::{closure#0} () at src/registry.rs:98
#13 0x00005b20285aaa16 in std::sys::backtrace::__rust_begin_short_backtrace<rayon_core::registry::{impl#2}::spawn::{clo--Type <RET> for more, q to quit, c to continue without paging--
sure_env#0}, ()> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:152
#14 0x00005b20285abe3b in std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559
#15 0x00005b20285aa8b4 in core::panic::unwind_safe::{impl#23}::call_once<(), std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>> (self=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272
#16 0x00005b20285b2978 in std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>, ()> (data=0x77abf38589d8) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:587
#17 0x00005b20285ae03b in __rust_try ()
#18 0x00005b20285abbb8 in std::panicking::try<(), core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:550
#19 std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>>, ()> (f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:358
#20 std::thread::{impl#0}::spawn_unchecked_::{closure#1}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:557
#21 0x00005b20285b5dcf in core::ops::function::FnOnce::call_once<std::thread::{impl#0}::spawn_unchecked_::{closure_env#1}<rayon_core::registry::{impl#2}::spawn::{closure_env#0}, ()>, ()> () at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
#22 0x00005b2028881f3b in alloc::boxed::{impl#28}::call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1976
#23 alloc::boxed::{impl#28}::call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1976
#24 std::sys::pal::unix::thread::{impl#2}::new::thread_start () at library/std/src/sys/pal/unix/thread.rs:106
#25 0x000077abf3f1670a in ?? () from /usr/lib/libc.so.6
#26 0x000077abf3f9aaac in ?? () from /usr/lib/libc.so.6

Thread 1 (Thread 0x77abf3e7fe00 (LWP 83183) "red_knot"):
--Type <RET> for more, q to quit, c to continue without paging--
#0  0x000077abf3f9888d in syscall () from /usr/lib/libc.so.6
#1  0x00005b202886ff16 in std::sys::pal::unix::futex::futex_wait () at library/std/src/sys/pal/unix/futex.rs:72
#2  std::sys::sync::thread_parking::futex::Parker::park () at library/std/src/sys/sync/thread_parking/futex.rs:55
#3  std::thread::Thread::park () at library/std/src/thread/mod.rs:1446
#4  std::thread::park () at library/std/src/thread/mod.rs:1083
#5  0x00005b20271a0ed5 in crossbeam_channel::context::Context::wait_until (self=0x7fffcd482100, deadline=...) at /home/shark/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-channel-0.5.14/src/context.rs:162
#6  0x00005b2027197825 in crossbeam_channel::flavors::array::{impl#1}::recv::{closure#1}<red_knot::MainLoopMessage> (cx=0x7fffcd482100) at /home/shark/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-channel-0.5.14/src/flavors/array.rs:432
#7  0x00005b20271d94dd in crossbeam_channel::context::{impl#0}::with::{closure#0}<crossbeam_channel::flavors::array::{impl#1}::recv::{closure_env#1}<red_knot::MainLoopMessage>, ()> (cx=0x7fffcd482100) at /home/shark/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-channel-0.5.14/src/context.rs:52
#8  0x00005b20271d9a07 in crossbeam_channel::context::{impl#0}::with::{closure#1}<crossbeam_channel::flavors::array::{impl#1}::recv::{closure_env#1}<red_knot::MainLoopMessage>, ()> (cell=0x77abf3e7fd60) at /home/shark/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-channel-0.5.14/src/context.rs:60
#9  0x00005b2027199088 in std::thread::local::LocalKey<core::cell::Cell<core::option::Option<crossbeam_channel::context::Context>>>::try_with<core::cell::Cell<core::option::Option<crossbeam_channel::context::Context>>, crossbeam_channel::context::{impl#0}::with::{closure_env#1}<crossbeam_channel::flavors::array::{impl#1}::recv::{closure_env#1}<red_knot::MainLoopMessage>, ()>, ()> (self=0x5b2028fe8678, f=...) at /home/shark/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:310
#10 0x00005b20271d8670 in crossbeam_channel::context::Context::with<crossbeam_channel::flavors::array::{impl#1}::recv::{closure_env#1}<red_knot::MainLoopMessage>, ()> (f=...) at /home/shark/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-channel-0.5.14/src/context.rs:55
#11 0x00005b202719745e in crossbeam_channel::flavors::array::Channel<red_knot::MainLoopMessage>::recv<red_knot::MainLoopMessage> (self=0x5b205ae40c00, deadline=...) at /home/shark/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-channel-0.5.14/src/flavors/array.rs:421
#12 0x00005b2027184e0f in crossbeam_channel::channel::Receiver<red_knot::MainLoopMessage>::recv<red_knot::MainLoopMessage> (self=0x7fffcd4864f8) at /home/shark/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-channel-0.5.14/src/channel.rs:814
#13 0x00005b20271b4407 in red_knot::MainLoop::main_loop (self=0x7fffcd486478, db=0x7fffcd485990) at crates/red_knot/src/main.rs:240
#14 0x00005b20271b31ba in red_knot::MainLoop::run (self=..., db=0x7fffcd485990) at crates/red_knot/src/main.rs:227
#15 0x00005b20271b0f0a in red_knot::run_check (args=...) at crates/red_knot/src/main.rs:150
--Type <RET> for more, q to quit, c to continue without paging--
#16 0x00005b20271af405 in red_knot::run () at crates/red_knot/src/main.rs:66
#17 0x00005b20271af20e in red_knot::main () at crates/red_knot/src/main.rs:29

I also still see a message about the panic before the hang occurs, e.g.

thread '<unnamed>' panicked at /home/shark/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/87bf6b6/src/function/fetch.rs:167:25:
dependency graph cycle querying try_metaclass_(Id(64829)); set cycle_fn/cycle_initial to fixpoint iterate
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread '<unnamed>' panicked at /home/shark/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/87bf6b6/src/function/fetch.rs:167:25:
dependency graph cycle querying try_metaclass_(Id(64829)); set cycle_fn/cycle_initial to fixpoint iterate

How to reproduce

git clone https://github.com/hydpy-dev/hydpy
cd hydpy
uv venv
uv pip install numpy pandas-stubs scipy-stubs types-docutils types-networkx

while true; do red_knot check --python .venv hydpy; done

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtyMulti-file analysis & type inference

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions