Skip to content

rustc segfault with jemalloc #9172

Closed
Closed
@jedisct1

Description

@jedisct1

rustc segfaults when using jemalloc (LD_PRELOAD=/usr/lib/libjemalloc.so). Not sure if this is a bug in jemalloc or if rustc is accessing unallocated memory.

x86_64-unknown-linux-gnu/stage1/bin/rustc -O --cfg stage1 --cfg rtopt -Z no-debug-borrows --target=x86_64-unknown-linux-gnu -D warnings --out-dir x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib /home/frank/src/rust/src/libstd/std.rs
+++ killed by SIGSEGV +++

Backtrace:

#0  0x00007ffff7bd0ae2 in ?? () from /usr/lib/libjemalloc.so
#1  0x00007ffff7bd1558 in ?? () from /usr/lib/libjemalloc.so
#2  0x00007ffff707c2ee in flate::deflate_bytes_internal::_6ace191abe458686::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/libextra-a7c050cfd46b2c9a-0.8-pre.so
#3  0x00007ffff707c462 in flate::deflate_bytes::_dd4c86de97c662c9::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/libextra-a7c050cfd46b2c9a-0.8-pre.so
#4  0x00007ffff5f4c7d8 in metadata::encoder::encode_metadata::_5e9470569ef0553a::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so
#5  0x00007ffff5f4abde in middle::trans::base::write_metadata::_3c7425b7f66f9212::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so
#6  0x00007ffff5f4df04 in middle::trans::base::trans_crate::_f3bb352d1de84a5::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so
#7  0x00007ffff645c918 in driver::driver::phase_4_translate_to_llvm::_ad5fa6cc5abb5f5a::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so
#8  0x00007ffff645d325 in driver::driver::compile_input::_1b306b4a530fa4d::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so
#9  0x00007ffff6489e09 in run_compiler::_686ff2cef217b1f::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so
#10 0x00007ffff649de4e in main_args::anon::expr_fn_96766 ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so
#11 0x00007ffff649bd9a in monitor::anon::expr_fn_96610 ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so
#12 0x00007ffff649927e in task::__extensions__::try_96079::anon::expr_fn_96279 ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so
#13 0x00007ffff753635c in task::spawn::spawn_raw::anon::expr_fn_22719 ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#14 0x00007ffff757ebde in rt::task::__extensions__::build_start_wrapper::anon::anon::expr_fn_30117 ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#15 0x00007ffff757da71 in rt::task::__extensions__::run::anon::expr_fn_30009 ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#16 0x00007ffff757eedd in rt::task::__extensions__::try_fn::_bdf5f0d7d89d6288::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#17 0x00007ffff5a98543 in rust_try (f=<optimized out>, fptr=<optimized out>, env=<optimized out>) at /home/frank/src/rust/src/rt/rust_builtin.cpp:523
#18 0x00007ffff757d924 in rt::task::__extensions__::meth_30007::try::_199ab8d6eb226980::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#19 0x00007ffff757d805 in rt::task::__extensions__::meth_30005::run::_199ab8d6eb226980::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#20 0x00007ffff757e8bc in rt::task::__extensions__::build_start_wrapper::anon::expr_fn_30101 ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
---Type <return> to continue, or q <return> to quit---
#21 0x00007ffff75c6f19 in rt::context::__extensions__::task_start_wrapper::_d625afdc49afb93::_0$x2e8$x2dpre ()
   from /home/frank/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#22 0x0000000000000000 in ?? ()

Host is running Ubuntu Precise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions