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
Breadcrumb API is not thread-safe #616
Comments
Thanks for the report @dtorres. I can reproduce this so we'll take a look and try to determine the cause. Have you seen any evidence of this causing crashes or other issues or has it just been flagged by thread sanitizer so far? Until we can identify a fix, you may be able to work around this by using your own FIFO queue (e.g. |
We haven't seen this particular stack trace as a crash yet but a memory corruption issue (such as this) can cause other pieces of code to crash if they are unlucky enough to step on that same memory address later. This race condition is now more likely to happen in our app as we have backgrounded most calls to the breadcrumb API as it isn't suited for main thread use (See #563).
We are wrapping the calls inside of a lock to work around this. |
Understood. We'll need to investigate further on our side to determine the best way to fix. I'll update this issue when we know more. |
@rob-keepsafe Thanks for this, we will review and update this issue as necessary. |
Any luck on this? |
This has now been fixed in V6.1.1 |
Description
While running our app under the thread sanitiser, it frequently hits a race condition on the Breadcrumb API as seen here:
Issue
Environment
Library versions:
pod -v
):AppDelegate
where Bugsnag is configured?Example code snippet
import Bugsnag // (Insert code sample to reproduce the problem)
Error messages:
The text was updated successfully, but these errors were encountered: