-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
intermittent crash when running cargo test #31
Comments
Does an ASAN build helps diagnosing this? |
Another crash
|
One more crash
|
I never turn on ASAN in rust before, but it looks like sanitizer is possible to be turned on in rust: https://github.com/japaric/rust-san I'll try it to see if it helps! Thanks for the advice! |
It seems that it only works on Linux now. Need to find another way to diagnose the problem... |
Yet another crash
|
Get another crash and the reason is
|
The crash happens when I have a feeling that the
|
cargo test
after upgrading to OSX 10.15cargo test
after upgrading to OSX 10.15
It says that it works on OSX, doesn't it? You really need ASAN for this. |
It does work on OSX without using system APIs. The ASAN in Rust only works with x86_64-unknown-linux-gnu target for now (more detail here). However, I have no way to build the coreaudio-sys (system API crate) on x86_64-unknown-linux-gnu , even I use a fullback bindings. It shows an error:
I really hope I can use ASAN.. Do you have expereince on other tools that can help diagnosing the crash here? I've tried using Instruments but I don't know how to use them effectively. |
Narrow down the problematic test. Running The During the whole test in Another weird thing is that there are some error messages about [plugin] AddInstanceForFactory and HALC_ShellDriverPlugIn:
However, these error messages also appear when running So, the next thing I would do is to check whether running The things need to figure out is
Whole backtrace here
|
I've check that running I'll file a PR to fix this |
cargo test
after upgrading to OSX 10.15Calling audiounit_get_current_channel_layout by input-only (microphone-only) AudioUnit is prone to cause crash intermittently. The test_set_channel_layout_input is likely to cause intermittent crash since it calls audiounit_get_current_channel_layout by a input-only AudioUnit. Removing this test can avoid the random crashes when running `cargo test` (#31). The cubeb implementation has no need to get the channel-layout on input side, so the test_set_channel_layout_input is unnecessary anyway.
I had a go at this: rustup install nightly-2019-09-10 has sanitizers working, and it works when compiling this crate, you can activate it via: rustup default nightly-2019-09-11 This allows side-stepping rust-lang/rust#66140. Then we need to remove the Hopefully we can find the cause with this. We can disable the test (I'll review the patch that does that next), but it's best to understand the crash here anyways. |
Great thanks! After running
and remove I was misled by the document here. It says ASAN only works on I'll check what I could find. Thanks! |
I cannot reproduce it by |
Calling audiounit_get_current_channel_layout by input-only (microphone-only) AudioUnit is prone to cause crashes intermittently. The test_set_channel_layout_input is likely to cause intermittent crashes since it calls audiounit_get_current_channel_layout by a input-only AudioUnit. Removing this test can avoid the random crashes when running `cargo test` (#31). The cubeb implementation has no need to get the channel-layout on input side, so the test_set_channel_layout_input is unnecessary anyway.
Record the last commit that can lead to this crash: https://github.com/ChunMinChang/cubeb-coreaudio-rs/tree/9d0a0e8f635f2a630b17562b53f46efed0e3e91f |
The
cargo test
crashes randomly.Here is a log for the crash when running
rust-lldb target/debug/deps/cubeb_coreaudio-*
The text was updated successfully, but these errors were encountered: