koute / not-perf

A sampling CPU profiler for Linux
Apache License 2.0
871 stars 41 forks source link

Crashes due to lru on 1.48.0-nightly #18

Closed zvolin closed 4 years ago

zvolin commented 4 years ago

We have an app which requires nightly channel and uses this crate as a dep. Lru in version "0.2.0" on 1.48.0-nightly is probably outdated, so we encounter many panics.

running 47 tests
test cmd_trace_events::test_emit_events_4 ... ok
test cmd_trace_events::test_emit_events_5 ... ok
test cmd_trace_events::test_emit_events_1 ... ok
test cmd_trace_events::test_emit_events_2 ... ok
test cmd_trace_events::test_emit_events_3 ... ok
test cmd_trace_events::test_emit_events_8 ... ok
test cmd_trace_events::test_emit_events_6 ... ok
test cmd_trace_events::test_emit_events_7 ... ok
test data_reader::test::collate_aarch64_hot_spot_usleep_in_a_loop_fp ... FAILED
test data_reader::test::collate_aarch64_perfect_unwinding_usleep_in_a_loop_no_fp ... FAILED
test data_reader::test::collate_aarch64_perfect_unwinding_usleep_in_a_loop_fp ... FAILED
test data_reader::test::collate_aarch64_hot_spot_usleep_in_a_loop_no_fp ... FAILED
test data_reader::test::collate_aarch64_noreturn ... FAILED
test data_reader::test::collate_aarch64_perfect_unwinding_floating_point ... FAILED
test data_reader::test::collate_amd64_hot_spot_usleep_in_a_loop_fp ... FAILED
test data_reader::test::collate_amd64_hot_spot_usleep_in_a_loop_no_fp ... FAILED
test data_reader::test::collate_amd64_hot_spot_usleep_in_a_loop_no_fp_online ... FAILED
test data_reader::test::collate_amd64_inline_functions ... FAILED
test data_reader::test::collate_amd64_perfect_unwinding_floating_point ... FAILED
test data_reader::test::collate_amd64_noreturn ... FAILED
test data_reader::test::collate_amd64_perfect_unwinding_pthread_cond_wait ... FAILED
test data_reader::test::collate_amd64_perfect_unwinding_usleep_in_a_loop_fp ... FAILED
test data_reader::test::collate_amd64_perfect_unwinding_usleep_in_a_loop_fp_only_eh_frame_hdr ... FAILED
test data_reader::test::collate_amd64_perfect_unwinding_usleep_in_a_loop_fp_only_loaded_eh_frame ... FAILED
test data_reader::test::collate_arm_hot_spot_usleep_in_a_loop_fp ... FAILED
test data_reader::test::collate_arm_hot_spot_usleep_in_a_loop_no_fp ... FAILED
test data_reader::test::collate_arm_inline_functions ... FAILED
test data_reader::test::collate_arm_perfect_unwinding_floating_point ... FAILED
test data_reader::test::collate_mips64_inline_functions ... ignored
test data_reader::test::collate_arm_noreturn ... FAILED
test data_reader::test::collate_amd64_pthread_cond_wait ... FAILED
test data_reader::test::collate_amd64_perfect_unwinding_usleep_in_a_loop_no_fp ... FAILED
test data_reader::test::collate_arm_perfect_unwinding_usleep_in_a_loop_fp ... FAILED
test data_reader::test::collate_arm_perfect_unwinding_usleep_in_a_loop_no_fp ... FAILED
test mount_info::test_parse_mountinfo ... ok
test mount_info::test_path_resolver ... ok
test profiler::tests::reload_which_clears_base_address_does_not_panic ... ok
test data_reader::test::collate_mips64_hot_spot_usleep_in_a_loop_fp ... FAILED
test profiler::tests::spurious_reload_with_no_base_address_does_not_panic ... ok
test profiler::tests::test_update_maps_basic ... ok
test data_reader::test::collate_mips64_perfect_unwinding_usleep_in_a_loop_fp ... FAILED
test data_reader::test::collate_mips64_perfect_unwinding_floating_point ... FAILED
test data_reader::test::collate_mips64_noreturn ... FAILED
test data_reader::test::collate_mips64_hot_spot_usleep_in_a_loop_no_fp ... FAILED
test data_reader::test::collate_mips64_perfect_unwinding_usleep_in_a_loop_no_fp ... FAILED
test data_reader::test::collate_mips64_pthread_cond_wait ... FAILED
test profiler::tests::reloading_never_panics ... ok

failures:

---- data_reader::test::collate_aarch64_hot_spot_usleep_in_a_loop_fp stdout ----
thread 'data_reader::test::collate_aarch64_hot_spot_usleep_in_a_loop_fp' panicked at 'attempted to leave type `lru::LruEntry<u64, nwind::frame_descriptions::CachedUnwindInfo>` uninitialized, which is invalid', /home/mzwolins/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:658:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
.
.
.
<more same panics>

It looks like any alignment but bumping is not needed. Minimal working lru version is 0.4. Would you mind updating it?