-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Description
I'm investigating a panic I saw in customer logs that I am unable to reproduce. I think that this function can return a null pointer (note the ?) which is uncaught until an assert/panic.
The MacOS docs are pretty unhelpful and I can't quite tell the condition that causes a null reference here, but I think we can figure out some way to catch it and degrade a little more gracefully than a panic.
thread 'tokio-runtime-worker' panicked at /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/system-configuration-0.6.1/src/dynamic_store.rs:154:1:
Attempted to create a NULL object.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/system-configuration-0.6.1/src/dynamic_store.rs:154:1:
Attempted to create a NULL object.
thread 'tokio-runtime-worker' panicked at /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/system-configuration-0.6.1/src/dynamic_store.rs:154:1:
Attempted to create a NULL object.
stack backtrace:
0: 0x10645bbe0 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h92dda645f072dcaf
1: 0x1064802cc - core::fmt::write::hbc92919d8e8f9a96
2: 0x106456d2c - std::io::Write::write_fmt::hcee3b5dc9ab531be
3: 0x10645ba94 - std::sys::backtrace::BacktraceLock::print::h0f497abce563e5d2
4: 0x10645cfe8 - std::panicking::default_hook::{{closure}}::h62595143a6c21f05
5: 0x10645ce38 - std::panicking::default_hook::hd800536ed1df5085
6: 0x10645dac8 - std::panicking::rust_panic_with_hook::h1882a30575fbb763
7: 0x10645d7f8 - std::panicking::begin_panic::{{closure}}::h90bc78a84f5b8bf9
8: 0x10645c09c - std::sys::backtrace::__rust_end_short_backtrace::h923b5c9b48a7f7ec
9: 0x106501140 - std::panicking::begin_panic::h74fddde4128cd9c3
10: 0x10635fb30 - system_configuration::dynamic_store::SCDynamicStore::create::ha77940e0bbdaa862
11: 0x105b0b5b0 - system_configuration::dynamic_store::SCDynamicStoreBuilder<T>::build::h660b6b08e3a5fce7
12: 0x105ac2534 - os_abstraction::macos::search_domains::SearchDomains::set_search_domains_sync::h7f97c4c147e9a964
....
Metadata
Metadata
Assignees
Labels
No labels