NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/54192: lang/rust build error



On Fri, Nov 15, 2019 at 12:31:41AM +0100, Joerg Sonnenberger wrote:
> On Thu, Nov 14, 2019 at 11:06:25PM +0100, Thomas Klausner wrote:
> > On Thu, Nov 14, 2019 at 09:36:32PM +0100, Joerg Sonnenberger wrote:
> > > On Thu, Nov 14, 2019 at 01:26:48PM +0000, Patrick Welche wrote:
> > > > On Sun, Oct 20, 2019 at 10:33:18PM +0100, Robert Swindells wrote:
> > > > > Has anyone else tried running firefox on a machine with the patch to
> > > > > kern_lwp.c ? 
> > > > 
> > > > I haven't, but the build problem has changed for me: rather than have
> > > > "deadlock detected", these days I get cargo in state parked and an
> > > > idle box. (tls changes in the meantime?)
> > > 
> > > Please make sure that you have the latest version of current.
> > 
> > I have a -current from Nov 11 after your lwp id changes.
> > 
> > The rust processes just hang for hours.
> 
> BTW, is that a rust version with the /dev/random fixes? And/or can you
> replace /dev/random with a symlink to /dev/urandom?

That is the rust version from pkgsrc without any other changes, so I guess no.

I didn't have that symlink in place, but now added it and restarted
the build.

# ls -l *random*
lrwxr-xr-x  1 root  wheel      7 Nov 15 08:39 random -> urandom
cr--r--r--  1 root  wheel  46, 0 Nov 14 13:29 random.old
crw-r--r--  1 root  wheel  46, 1 Nov 14 13:29 urandom


After a couple minutes I have two hanging cargos and one hanging bootstrap:

miau# ps -auxwww | grep pbulk | grep rust
pbulk    1399  0.0  0.0  27540   5568 ttyp1 S+    8:42AM  0:00.11 /scratch/lang/rust/work/rustc-1.39.0-src/build/bootstrap/debug/bootstrap -v install -j 24

pbulk    3820  0.0  0.0 584524  50324 ttyp1 Il+   8:43AM  0:02.26 /scratch/lang/rust/work/rust-bootstrap/bin/cargo build -Zconfig-profile --target x86_64-unknown-netbsd -Zbinary-dep-depinfo -j 24 --release --frozen --manifest-path /scratch/lang/rust/work/rustc-1.39.0-src/src/tools/rustbook/Cargo.toml --features linkcheck --message-format json-render-diagnostics
pbulk   19218  0.0  0.0 150636   1524 ttyp1 I+    8:43AM  0:00.00 /scratch/lang/rust/work/rust-bootstrap/bin/cargo build -Zconfig-profile --target x86_64-unknown-netbsd -Zbinary-dep-depinfo -j 24 --release --frozen --manifest-path /scratch/lang/rust/work/rustc-1.39.0-src/src/tools/rustbook/Cargo.toml --features linkcheck --message-format json-render-diagnostics


Cargos:

(gdb) thread apply all bt

Thread 3 (LWP 1 of process 3820):
#0  0x00007945084b035a in ___lwp_park60 () from /usr/lib/libc.so.12
#1  0x000079450900a805 in pthread_cond_timedwait (cond=0x7945093b1030, mutex=0x7945093b1000, abstime=0x0) at /usr/src/lib/libpthread/pthread_cond.c:169
#2  0x0000000084b73e94 in std::sys::unix::condvar::Condvar::wait () at src/libstd/sys/unix/condvar.rs:71
#3  std::sys_common::condvar::Condvar::wait () at src/libstd/sys_common/condvar.rs:41
#4  std::sync::condvar::Condvar::wait () at src/libstd/sync/condvar.rs:204
#5  std::thread::park () at src/libstd/thread/mod.rs:911
#6  0x0000000084b81f92 in std::sync::mpsc::blocking::WaitToken::wait () at src/libstd/sync/mpsc/blocking.rs:71
#7  0x00000000845e70d8 in std::sync::mpsc::shared::Packet<T>::recv ()
#8  0x000000008441984d in std::sync::mpsc::Receiver<T>::recv ()
#9  0x0000000084676764 in cargo::core::compiler::job_queue::JobQueue::drain_the_queue ()
#10 0x000000008465bbc5 in std::panicking::try::do_call ()
#11 0x0000000084b903ea in __rust_maybe_catch_panic () at src/libpanic_unwind/lib.rs:80
#12 0x00000000843c7c40 in crossbeam_utils::thread::scope ()
#13 0x0000000084674a0f in cargo::core::compiler::job_queue::JobQueue::execute ()
#14 0x000000008473ad69 in cargo::core::compiler::context::Context::compile ()
#15 0x0000000084488ec1 in cargo::ops::cargo_compile::compile_ws ()
#16 0x0000000084487a57 in cargo::ops::cargo_compile::compile ()
#17 0x0000000084352e84 in cargo::commands::build::exec ()
#18 0x0000000084366648 in cargo::cli::main ()
#19 0x00000000843b00e1 in cargo::main ()
#20 0x000000008438a4b3 in std::rt::lang_start::{{closure}} ()
#21 0x0000000084b859a3 in std::rt::lang_start_internal::{{closure}} () at src/libstd/rt.rs:49
#22 std::panicking::try::do_call () at src/libstd/panicking.rs:296
#23 0x0000000084b903ea in __rust_maybe_catch_panic () at src/libpanic_unwind/lib.rs:80
#24 0x0000000084b86528 in std::panicking::try () at src/libstd/panicking.rs:275
#25 std::panic::catch_unwind () at src/libstd/panic.rs:394
#26 std::rt::lang_start_internal () at src/libstd/rt.rs:48
#27 0x00000000843b2442 in main ()

Thread 2 (LWP 2 of process 3820):
#0  0x00007945084b035a in ___lwp_park60 () from /usr/lib/libc.so.12
#1  0x000079450900a805 in pthread_cond_timedwait (cond=0x794508b07140, mutex=0x794508b07110, abstime=0x0) at /usr/src/lib/libpthread/pthread_cond.c:169
#2  0x0000000084b73e94 in std::sys::unix::condvar::Condvar::wait () at src/libstd/sys/unix/condvar.rs:71
#3  std::sys_common::condvar::Condvar::wait () at src/libstd/sys_common/condvar.rs:41
#4  std::sync::condvar::Condvar::wait () at src/libstd/sync/condvar.rs:204
#5  std::thread::park () at src/libstd/thread/mod.rs:911
#6  0x0000000084b81f92 in std::sync::mpsc::blocking::WaitToken::wait () at src/libstd/sync/mpsc/blocking.rs:71
#7  0x0000000084b55c59 in std::sync::mpsc::stream::Packet<T>::recv ()
#8  0x0000000084b50a4c in std::sync::mpsc::Receiver<T>::recv ()
#9  0x0000000084b55135 in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#10 0x0000000084b53e4e in std::panicking::try::do_call ()
--Type <RET> for more, q to quit, c to continue without paging--
#11 0x0000000084b903ea in __rust_maybe_catch_panic () at src/libpanic_unwind/lib.rs:80
#12 0x0000000084b54484 in core::ops::function::FnOnce::call_once{{vtable-shim}} ()
#13 0x0000000084b7377f in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once () at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/liballoc/boxed.rs:787
#14 0x0000000084b8f590 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once () at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/liballoc/boxed.rs:787
#15 std::sys_common::thread::start_thread () at src/libstd/sys_common/thread.rs:13
#16 std::sys::unix::thread::Thread::new::thread_start () at src/libstd/sys/unix/thread.rs:79
#17 0x000079450900c170 in pthread__create_tramp (cookie=0x7945066e1400) at /usr/src/lib/libpthread/pthread.c:593
#18 0x000079450848fcd0 in ?? () from /usr/lib/libc.so.12
#19 0x0000000000000000 in ?? ()

Thread 1 (LWP 5 of process 3820):
#0  0x0000794508442b7a in read () from /usr/lib/libc.so.12
#1  0x0000794509007f05 in read (d=<optimized out>, buf=<optimized out>, nbytes=<optimized out>) at /usr/src/lib/libpthread/pthread_cancelstub.c:485
#2  0x0000000084b8e1c5 in std::sys::unix::fd::FileDesc::read () at src/libstd/sys/unix/fd.rs:49
#3  std::sys::unix::pipe::AnonPipe::read () at src/libstd/sys/unix/pipe.rs:61
#4  std::sys::unix::process::process_inner::<impl std::sys::unix::process::process_common::Command>::spawn () at src/libstd/sys/unix/process/process_unix.rs:76
#5  0x0000000084b80cda in std::process::Command::spawn () at src/libstd/process.rs:768
#6  0x00000000845d2ee4 in cargo::util::process_builder::ProcessBuilder::exec_with_streaming ()
#7  0x000000008467c13a in <cargo::core::compiler::DefaultExecutor as cargo::core::compiler::Executor>::exec ()
#8  0x0000000084671ec8 in <F as cargo::core::compiler::job::FnBox<A,R>>::call_box ()
#9  0x000000008466fcff in <F as cargo::core::compiler::job::FnBox<A,R>>::call_box ()
#10 0x000000008466fcff in <F as cargo::core::compiler::job::FnBox<A,R>>::call_box ()
#11 0x00000000843c73a9 in crossbeam_utils::thread::ScopedThreadBuilder::spawn::{{closure}} ()
#12 0x0000000084417adb in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#13 0x0000000084b903ea in __rust_maybe_catch_panic () at src/libpanic_unwind/lib.rs:80
#14 0x00000000844de289 in core::ops::function::FnOnce::call_once{{vtable-shim}} ()
#15 0x0000000084b7377f in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once () at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/liballoc/boxed.rs:787
#16 0x0000000084b8f590 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once () at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/liballoc/boxed.rs:787
#17 std::sys_common::thread::start_thread () at src/libstd/sys_common/thread.rs:13
#18 std::sys::unix::thread::Thread::new::thread_start () at src/libstd/sys/unix/thread.rs:79
#19 0x000079450900c170 in pthread__create_tramp (cookie=0x7945058d9800) at /usr/src/lib/libpthread/pthread.c:593
#20 0x000079450848fcd0 in ?? () from /usr/lib/libc.so.12
#21 0x0000000000200000 in ?? ()
#22 0x0000000000000000 in ?? ()
(gdb)



The second:

(gdb) thread apply all bt

Thread 1 (LWP 5 of process 19218):
#0  0x00007f7edc609c8a in ___lwp_park60 () from /usr/libexec/ld.elf_so
#1  0x00007f7edc6010d4 in _rtld_shared_enter () at /usr/src/libexec/ld.elf_so/rtld.c:1687
#2  0x00007f7edc600b85 in _rtld_bind (obj=0x7945093de400, reloff=<optimized out>) at /usr/src/libexec/ld.elf_so/arch/x86_64/mdreloc.c:359
#3  0x00007f7edc6007fd in _rtld_bind_start () from /usr/libexec/ld.elf_so
#4  0x0000000000000206 in ?? ()
#5  0x000079450848ff3a in dup2 () from /usr/lib/libc.so.12
#6  0x00007945085194b9 in je_jemalloc_prefork () at /usr/src/external/bsd/jemalloc/lib/../dist/src/jemalloc.c:3276
#7  0x00007945093de400 in ?? ()
#8  0x000000000000009c in ?? ()
#9  0x000079450900a093 in pthread_sigmask (how=<optimized out>, set=<optimized out>, oset=<optimized out>) at /usr/src/lib/libpthread/pthread_misc.c:146
#10 0x0000000084b8ebf6 in std::sys::unix::process::process_inner::<impl std::sys::unix::process::process_common::Command>::do_exec () at src/libstd/sys/unix/process/process_unix.rs:225
#11 0x0000000084b8e4e0 in std::sys::unix::process::process_inner::<impl std::sys::unix::process::process_common::Command>::spawn () at src/libstd/sys/unix/process/process_unix.rs:50
#12 0x0000000084b80cda in std::process::Command::spawn () at src/libstd/process.rs:768
#13 0x00000000845d2ee4 in cargo::util::process_builder::ProcessBuilder::exec_with_streaming ()
#14 0x000000008467c13a in <cargo::core::compiler::DefaultExecutor as cargo::core::compiler::Executor>::exec ()
#15 0x0000000084671ec8 in <F as cargo::core::compiler::job::FnBox<A,R>>::call_box ()
#16 0x000000008466fcff in <F as cargo::core::compiler::job::FnBox<A,R>>::call_box ()
#17 0x000000008466fcff in <F as cargo::core::compiler::job::FnBox<A,R>>::call_box ()
#18 0x00000000843c73a9 in crossbeam_utils::thread::ScopedThreadBuilder::spawn::{{closure}} ()
#19 0x0000000084417adb in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#20 0x0000000084b903ea in __rust_maybe_catch_panic () at src/libpanic_unwind/lib.rs:80
#21 0x00000000844de289 in core::ops::function::FnOnce::call_once{{vtable-shim}} ()
#22 0x0000000084b7377f in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once () at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/liballoc/boxed.rs:787
#23 0x0000000084b8f590 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once () at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/liballoc/boxed.rs:787
#24 std::sys_common::thread::start_thread () at src/libstd/sys_common/thread.rs:13
#25 std::sys::unix::thread::Thread::new::thread_start () at src/libstd/sys/unix/thread.rs:79
#26 0x000079450900c170 in pthread__create_tramp (cookie=0x7945058d9800) at /usr/src/lib/libpthread/pthread.c:593
#27 0x000079450848fcd0 in ?? () from /usr/lib/libc.so.12
#28 0x0000000000200000 in ?? ()
#29 0x0000000000000000 in ?? ()


And one hanging "bootstrap":

(gdb) thread apply all bt

Thread 1 (LWP 1 of process 1399):
#0  0x000071f6dd842b7a in read () from /usr/lib/libc.so.12
#1  0x000071f6de407f05 in read (d=<optimized out>, buf=<optimized out>, nbytes=<optimized out>) at /usr/src/lib/libpthread/pthread_cancelstub.c:485
#2  0x000000010c6c0983 in std::sys::unix::fd::FileDesc::read () at src/libstd/sys/unix/fd.rs:49
#3  std::sys::unix::fs::File::read () at src/libstd/sys/unix/fs.rs:572
#4  <std::fs::File as std::io::Read>::read () at src/libstd/fs.rs:619
#5  0x000000010c4eaf11 in std::io::append_to_string ()
#6  0x000000010c4eb865 in <std::io::Lines<B> as core::iter::traits::iterator::Iterator>::next ()
#7  0x000000010c52e343 in bootstrap::compile::stream_cargo ()
#8  0x000000010c59fb58 in <bootstrap::tool::ToolBuild as bootstrap::builder::Step>::run ()
#9  0x000000010c5be9b5 in bootstrap::builder::Builder::ensure ()
#10 0x000000010c5a4a2c in <bootstrap::tool::Rustbook as bootstrap::builder::Step>::run ()
#11 0x000000010c64414e in bootstrap::builder::Builder::ensure ()
#12 0x000000010c4f8a41 in bootstrap::tool::<impl bootstrap::builder::Builder>::tool_exe ()
#13 0x000000010c50fece in <bootstrap::doc::RustbookSrc as bootstrap::builder::Step>::run ()
#14 0x000000010c5cf260 in bootstrap::builder::Builder::ensure ()
#15 0x000000010c50f659 in <bootstrap::doc::UnstableBook as bootstrap::builder::Step>::run ()
#16 0x000000010c5f1e39 in bootstrap::builder::Builder::ensure ()
#17 0x000000010c50f5a3 in <bootstrap::doc::UnstableBook as bootstrap::builder::Step>::make_run ()
#18 0x000000010c4ee7be in bootstrap::builder::StepDescription::maybe_run ()
#19 0x000000010c4f265d in bootstrap::builder::Builder::run_step_descriptions ()
#20 0x000000010c64ae4c in <bootstrap::dist::Docs as bootstrap::builder::Step>::run ()
#21 0x000000010c5f440d in bootstrap::builder::Builder::ensure ()
#22 0x000000010c5b5f46 in bootstrap::builder::Builder::ensure ()
#23 0x000000010c4e9421 in <bootstrap::install::Docs as bootstrap::builder::Step>::make_run ()
#24 0x000000010c4ee7be in bootstrap::builder::StepDescription::maybe_run ()
#25 0x000000010c4f265d in bootstrap::builder::Builder::run_step_descriptions ()
#26 0x000000010c4f1f6c in bootstrap::builder::Builder::execute_cli ()
#27 0x000000010c422840 in bootstrap::Build::build ()
#28 0x000000010c41ce19 in bootstrap::main ()
#29 0x000000010c41ab63 in std::rt::lang_start::{{closure}} ()
#30 0x000000010c6cb413 in std::rt::lang_start_internal::{{closure}} () at src/libstd/rt.rs:49
#31 std::panicking::try::do_call () at src/libstd/panicking.rs:296
#32 0x000000010c6d42ea in __rust_maybe_catch_panic () at src/libpanic_unwind/lib.rs:80
#33 0x000000010c6cbed8 in std::panicking::try () at src/libstd/panicking.rs:275
#34 std::panic::catch_unwind () at src/libstd/panic.rs:394
#35 std::rt::lang_start_internal () at src/libstd/rt.rs:48
#36 0x000000010c41cee2 in main ()


Thanks for looking at this!
 Thomas


Home | Main Index | Thread Index | Old Index