Closed aregng closed 2 years ago
This is expected. Your application (or one of your dependencies) is using the aligned_alloc
function, which is currently unimplemented in Bytehound.
Can you rerun your application with MEMORY_PROFILER_USE_SHADOW_STACK=0
set? This won't fix it, but should make the panic backtrace show us what exactly is using aligned_alloc
in your application.
Thanks for the hint. After running with MEMORY_PROFILER_USE_SHADOW_STACK=0 it turned out that "aligned_alloc" is used by rocksdb implementation:
12: 0x7f135f75353c - std::sys_common::backtrace::__rust_end_short_backtrace::h444863965d46291e
at /rustc/a37499ae66ec5fc52a93d71493b78fb141c32f6b/library/std/src/sys_common/backtrace.rs:138:18
13: 0x7f135f753511 - rust_begin_unwind
at /rustc/a37499ae66ec5fc52a93d71493b78fb141c32f6b/library/std/src/panicking.rs:584:5
14: 0x7f135f6b0ea2 - core::panicking::panic_fmt::h3fce1d62b588c5f8
at /rustc/a37499ae66ec5fc52a93d71493b78fb141c32f6b/library/core/src/panicking.rs:142:14
15: 0x7f135f6f2baf - aligned_alloc
at /workspace/supra/examples/bytehound/preload/src/api.rs:907:5
16: 0x7f135f546bf6 - _ZnwmSt11align_val_t
17: 0x5639119112c6 - _ZN7rocksdb6DBImpl4OpenERKNS_9DBOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorINS_22ColumnFamilyDescriptorESaISD_EEPSC_IPNS_18ColumnFamilyHandleESaISJ_EEPPNS_2DBEbb
at /home/areg/.cargo/registry/src/github.com-1ecc6299db9ec823/librocksdb-sys-0.8.0+7.4.4/rocksdb/db/db_impl/db_impl_open.cc:1752:77
18: 0x5639119105ad - _ZN7rocksdb2DB4OpenERKNS_9DBOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorINS_22ColumnFamilyDescriptorESaISD_EEPSC_IPNS_18ColumnFamilyHandleESaISJ_EEPPS0_
at /home/areg/.cargo/registry/src/github.com-1ecc6299db9ec823/librocksdb-sys-0.8.0+7.4.4/rocksdb/db/db_impl/db_impl_open.cc:1613:50
19: 0x56391182354c - rocksdb_open_column_families
at /home/areg/.cargo/registry/src/github.com-1ecc6299db9ec823/librocksdb-sys-0.8.0+7.4.4/rocksdb/db/c.cc:873:33
20: 0x56391174c002 - rocksdb::db::DBCommon<T,rocksdb::db::DBWithThreadModeInner>::open_cf_raw::h3610a311cf8d9c40
at /home/areg/.cargo/registry/src/github.com-1ecc6299db9ec823/rocksdb-0.19.0/src/db.rs:717:42
21: 0x56391174ccee - rocksdb::db::DBCommon<T,rocksdb::db::DBWithThreadModeInner>::open_cf_descriptors_internal::h037e47976a5d926e
at /home/areg/.cargo/registry/src/github.com-1ecc6299db9ec823/rocksdb-0.19.0/src/db.rs:626:18
22: 0x56391174d93e - rocksdb::db::DBCommon<T,rocksdb::db::DBWithThreadModeInner>::open_cf::hc28b03a86869aba8
at /home/areg/.cargo/registry/src/github.com-1ecc6299db9ec823/rocksdb-0.19.0/src/db.rs:436:9
23: 0x56391179ffa5 - storage::db::rocksdb::RocksDb::open::h594d1a948b126357
This is very interesting; I regularly profile programs using rocksdb and I've never seen it calling aligned_alloc
. From the stack trace is looks like it's called by C++'s new
, so it's probably either due to the newer version of rocksdb suddenly allocating aligned memory where it previously didn't, or due to the particular version of the C++'s standard library and/or the compiler you're using.
Thanks for the report; I'll fix this.
It might be the case. rocksdb version used by application is "0.19.0".
Fixed on master
.
Failed to profile rust application due to error
used command
Tried with local build from the latest master, and with pre-built versions Target OS: Ubuntu 20.04
Please let me know if any option is missing to run tool properly, or rust applications are not support for now. Thanks in advance.