Closed
Description
Backtraces are not available when running a Rust executable under valgrind.
RUST_BACKTRACE=1 valgrind /home/n/Documents/imazen/imageflow/target/debug/imageflow_server diagnose --call-panic
==25361== Memcheck, a memory error detector
==25361== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==25361== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==25361== Command: /home/n/Documents/imazen/imageflow/target/debug/imageflow_server diagnose --call-panic
==25361==
thread 'main' panicked at 'Panicking on command', src/main.rs:99
stack backtrace:
1: 0xd3123c - <unknown>
2: 0xd365de - <unknown>
3: 0xd361e4 - <unknown>
4: 0xd36a7b - <unknown>
5: 0x199693 - <unknown>
6: 0x1aeee9 - <unknown>
7: 0x1ada6c - <unknown>
8: 0xd3dafa - <unknown>
9: 0xd371e6 - <unknown>
10: 0x1b1812 - <unknown>
11: 0x5fd9f44 - __libc_start_main
12: 0x193666 - <unknown>
13: 0x0 - <unknown>
==25361==
==25361== HEAP SUMMARY:
==25361== in use at exit: 2,600 bytes in 2 blocks
==25361== total heap usage: 84 allocs, 82 frees, 22,584 bytes allocated
==25361==
==25361== LEAK SUMMARY:
==25361== definitely lost: 0 bytes in 0 blocks
==25361== indirectly lost: 0 bytes in 0 blocks
==25361== possibly lost: 0 bytes in 0 blocks
==25361== still reachable: 2,600 bytes in 2 blocks
==25361== suppressed: 0 bytes in 0 blocks
==25361== Rerun with --leak-check=full to see details of leaked memory
==25361==
==25361== For counts of detected and suppressed errors, rerun with: -v
==25361== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Without Valgrind
thread 'main' panicked at 'Panicking on command', src/main.rs:99
stack backtrace:
1: 0x563ee9fa223c - std::sys::imp::backtrace::tracing::imp::write::hf7294f5e24536b4a
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
2: 0x563ee9fa75de - std::panicking::default_hook::{{closure}}::h9a07d0b00c43fbee
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:351
3: 0x563ee9fa71e4 - std::panicking::default_hook::hf25feff2d08bf39b
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:367
4: 0x563ee9fa7a7b - std::panicking::rust_panic_with_hook::h4cb8c6fbb8386ccf
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:555
5: 0x563ee940a693 - std::panicking::begin_panic::h4f700bfae26a44e5
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:517
6: 0x563ee941fee9 - imageflow_server::main_with_exit_code::h5136f5c7061e1ac9
at /home/n/Documents/imazen/imageflow/imageflow_server/src/main.rs:99
7: 0x563ee941ea6c - imageflow_server::main::h21a73832ce5c2071
at /home/n/Documents/imazen/imageflow/imageflow_server/src/main.rs:17
8: 0x563ee9faeafa - __rust_maybe_catch_panic
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
9: 0x563ee9fa81e6 - std::rt::lang_start::h0637c2e100ff36fc
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:436
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panic.rs:361
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/rt.rs:57
10: 0x563ee9422812 - main
11: 0x7fe7b118af44 - __libc_start_main
12: 0x563ee9404666 - <unknown>
13: 0x0 - <unknown>
Meta
Host is Ubuntu 14.04, using a recently nightly.
uname -a
Linux nathanael-xeon 4.4.0-62-generic #83~14.04.1-Ubuntu SMP Wed Jan 18 18:10:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
rustc --version --verbose
rustc 1.17.0-nightly (ea7a6486a 2017-02-04)
binary: rustc
commit-hash: ea7a6486a26af085862cd7a5596bb69e83d85e12
commit-date: 2017-02-04
host: x86_64-unknown-linux-gnu
release: 1.17.0-nightly
LLVM version: 3.9