-
Notifications
You must be signed in to change notification settings - Fork 334
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
Fix crash when using RecordingStream::set_thread_local
on macOS
#3929
Conversation
This adds an ugly workaround for the crash in #2889
…but disable it for Mac for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shudder
great detective work though :notbad:
re_log::warn!("Using thread-local RecordingStream on macOS can result in data loss because of https://github.com/rerun-io/rerun/issues/2889"); | ||
|
||
// Give the batchet and sink threads a chance to process the data. | ||
std::thread::sleep(std::time::Duration::from_millis(500)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh not sure if we already talked about this, but there's no way easy way right now to know whether the threads are still busy, right? Would be nice to be able to tell them to join instead 🤔
Adding 500ms to our shutdown time is pretty awful and error prone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's not great, but we would need to check if all the queues are empty and the threads non-busy all the way down, and it is not trivial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll open a new issue (and close the old one) as a future TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Andreas Reich <[email protected]>
What
cargo test -p re_sdk --lib fallbacks
crashes on aarch64 Mac #3558RecordingStream
on Mac and WIndows #3937Checklist