Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ SDK crash on shutdown #5260

Open
emilk opened this issue Feb 23, 2024 · 1 comment · Fixed by #7063
Open

C++ SDK crash on shutdown #5260

emilk opened this issue Feb 23, 2024 · 1 comment · Fixed by #7063
Labels
🪳 bug Something isn't working 🌊 C++ API C/C++ API specific 💣 crash crash, deadlock/freeze, do-no-start 🐧 linux Linux-specific problems

Comments

@emilk
Copy link
Member

emilk commented Feb 23, 2024

A user reported that:

const auto rr = rerun::RecordingStream("...");
rr.connect().exit_on_failure();

on Pop OS (Ubuntu) results in:

thread '<unnamed>' panicked at library/std/src/thread/mod.rs:711:35:
use of std::thread::current() is not possible after the thread's local data has been destroyed
stack backtrace:
   0: rust_begin_unwind
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5
   1: core::panicking::panic_fmt
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14
   2: core::panicking::panic_display
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:168:5
   3: core::panicking::panic_str
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:152:5
   4: core::option::expect_failed
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/option.rs:1988:5
   5: core::option::Option<T>::expect
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/option.rs:898:21
   6: std::thread::current
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/thread/mod.rs:711:35
   7: crossbeam_channel::context::Context::new
   8: crossbeam_channel::flavors::zero::Channel<T>::recv
   9: crossbeam_channel::channel::Receiver<T>::recv
  10: re_log_types::data_table_batcher::DataTableBatcherInner::flush_blocking
  11: re_sdk::recording_stream::RecordingStream::set_sink
  12: rr_recording_stream_free
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Aborted (core dumped)

This sounds similar to:

@emilk emilk added 🪳 bug Something isn't working 💣 crash crash, deadlock/freeze, do-no-start 🐧 linux Linux-specific problems 🌊 C++ API C/C++ API specific labels Feb 23, 2024
@Wumpf Wumpf self-assigned this Aug 5, 2024
@Wumpf Wumpf closed this as completed in 99c20b3 Aug 6, 2024
@Wumpf Wumpf changed the title C++ SDK crash C++ SDK crash on shutdown Aug 6, 2024
@Wumpf
Copy link
Member

Wumpf commented Aug 6, 2024

still happens for @02alexander

Crash log:

[2024-08-06T15:03:46Z DEBUG re_chunk::batcher] creating new chunk batcher config=ChunkBatcherConfig { flush_tick: 8ms, flush_num_bytes: 1048576, flush_num_rows: 18446744073709551615, chunk_max_rows_if_unsorted: 256, max_commands_in_flight: None, max_chunks_in_flight: None, hooks: BatcherHooks { on_insert: None, on_release: None } }
[2024-08-06T15:03:46Z DEBUG re_sdk::recording_stream] setting recording info app_id=HelloWorld rec_id=30719026-ecff-488c-9b01-a1c0b53ff661
[2024-08-06T15:03:46Z DEBUG re_sdk_comms::buffered_client] Connecting to remote 127.0.0.1:9876…
[2024-08-06T15:03:46Z DEBUG re_sdk::recording_stream] setting recording info app_id=HelloWorld rec_id=30719026-ecff-488c-9b01-a1c0b53ff661
[2024-08-06T15:03:46Z DEBUG re_sdk_comms::buffered_client] Flushing message queue…
[2024-08-06T15:03:46Z DEBUG re_sdk_comms::tcp_client] Connecting to 127.0.0.1:9876…
[2024-08-06T15:03:46Z DEBUG re_sdk_comms::buffered_client] Failed to send message: Failed to connect to Rerun server at 127.0.0.1:9876: Connection refused (os error 111)
[2024-08-06T15:03:46Z DEBUG re_sdk_comms::tcp_client] Connecting to 127.0.0.1:9876…
[2024-08-06T15:03:46Z DEBUG re_sdk_comms::tcp_client] Connecting to 127.0.0.1:9876…
[2024-08-06T15:03:46Z WARN  re_sdk_comms::buffered_client] Failed to send message after 3 attempts: Failed to connect to Rerun server at 127.0.0.1:9876: Connection refused (os error 111)
[2024-08-06T15:03:47Z DEBUG re_sdk_comms::tcp_client] Connecting to 127.0.0.1:9876…
[2024-08-06T15:03:48Z DEBUG re_sdk_comms::tcp_client] Connecting to 127.0.0.1:9876…
[2024-08-06T15:03:49Z DEBUG re_sdk_comms::tcp_client] Connecting to 127.0.0.1:9876…
[2024-08-06T15:03:49Z WARN  re_sdk_comms::buffered_client] Dropping messages because tcp client has timed out.
[2024-08-06T15:03:49Z WARN  re_sdk_comms::buffered_client] Dropping messages because tcp client has timed out.
[2024-08-06T15:03:49Z WARN  re_sdk_comms::tcp_client] Tried to flush while TCP stream was still Pending. Data was possibly dropped.
[2024-08-06T15:03:49Z DEBUG re_sdk_comms::buffered_client] Flush complete.
thread '<unnamed>' panicked at library/std/src/thread/mod.rs:709:35:
use of std::thread::current() is not possible after the thread's local data has been destroyed
stack backtrace:
   0: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
   2: core::panicking::panic_display
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:196:5
   3: core::panicking::panic_str
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:171:5
   4: core::option::expect_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/option.rs:1980:5
   5: core::option::Option<T>::expect
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/option.rs:894:21
   6: std::thread::current
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/thread/mod.rs:709:35
   7: crossbeam_channel::context::Context::new
   8: crossbeam_channel::flavors::zero::Channel<T>::recv
   9: crossbeam_channel::channel::Receiver<T>::recv
  10: re_chunk::batcher::ChunkBatcherInner::flush_blocking
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[1]    152476 IOT instruction (core dumped)  RUST_BACKTRACE=1 RUST_LOG=debug ./global_crash

@Wumpf Wumpf reopened this Aug 6, 2024
@Wumpf Wumpf removed their assignment Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🌊 C++ API C/C++ API specific 💣 crash crash, deadlock/freeze, do-no-start 🐧 linux Linux-specific problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants