SIGABRT/SIGSEGV on threads
Tried out Ralloc with the following settings in my Parallel implementation:
ralloc = { git = "https://github.com/redox-os/ralloc/", default-features = false, features = ["allocator", "tls"] }
on a debug build, the application hangs indefinitely. On a standard release build, the application just immediately generates an unhelpful terminated by SIGSEGV
error. On the other hand, a release build with musl as the target, executing a basic parallel echo ::: 1 2 3 4
, the application aborts but allows for a backtrace to be generated. I'm guessing that ralloc is not ready for threaded software yet. It basically crashes as soon as it gets to spawning threads.
thread '<unnamed>' panicked at 'assertion failed: !__cxa_thread_atexit_impl.is_null()', /home/mmstick/.cargo/git/checkouts/ralloc-797ee1a3f928155b/35fd0db/shim/src/thread_destructor.rs:26
stack backtrace:
1: 0x45472a - std::sys::imp::backtrace::tracing::imp::write::h2c1d41f6fe3b8a24
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-musl-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
2: 0x4530c5 - std::panicking::default_hook::{{closure}}::hba86080b83c0cbab
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-musl-linux/build/src/libstd/panicking.rs:351
3: 0x451e99 - std::panicking::rust_panic_with_hook::hbc0d046689712bd9
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-musl-linux/build/src/libstd/panicking.rs:367
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-musl-linux/build/src/libstd/panicking.rs:555
4: 0x45193c - std::panicking::begin_panic::h9c4c355c6d7c9a6f
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-musl-linux/build/src/libstd/panicking.rs:517
5: 0x4517e9 - std::panicking::begin_panic_fmt::he0570e7f0303c73e
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-musl-linux/build/src/libstd/panicking.rs:501
6: 0x46b6a6 - core::panicking::panic_fmt::hb17950d89265c791
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-musl-linux/build/src/libstd/panicking.rs:477
7: 0x46bc6d - core::panicking::panic::h728193da40cbb534
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-musl-linux/build/src/libcore/panicking.rs:49
8: 0x469a71 - ralloc::allocator::LocalAllocator::init::hea32f538bd50dd2f
at /home/mmstick/.cargo/git/checkouts/ralloc-797ee1a3f928155b/35fd0db/shim/src/thread_destructor.rs:26
at /home/mmstick/.cargo/git/checkouts/ralloc-797ee1a3f928155b/35fd0db/src/allocator.rs:249
9: 0x44cfef - main
fatal runtime error: failed to initiate panic, error 5
fish: Job 2, “env RUST_BACKTRACE=1 target/x86…” terminated by signal SIGABRT (Abort)