-
Notifications
You must be signed in to change notification settings - Fork 1.6k
ThreadSanitizer detects data race when initializing FirebaseApp instance #1293
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
Comments
@davidair I think this is the intentional race around the log level and analytics debug mode. Short of making these values atomics, one possible way to handle this would be to annotate things with @pot8os I believe you can work around this util we release a fix by adding the offending function to a blacklist. Create a file blacklist.txt:
Then add to your OTHER_CFLAGS |
I think adding the no_sanitize attribute is a reasonable approach |
@wilhuff Thanks for your explanations. Unfortunately, it didn't work the workaround you suggested. And I'm not sure how I find out what it's wrong. What I did:
Content is
(I also tried
Thanks. |
I saw a different thread sanitizer test case and fixed that one. I'm not able to reproduce one in FIRLogBasic. Let me know if it still occurs with the fix in #1390 and we can reopen. |
I'm using a current version 5.4.0 and I'm seeing a very similar pattern: Previous read of size 1 at 0x00010c4f5091 by main thread (mutexes: write M22653341146430552): Location is global 'sFIRAnalyticsDebugMode' at 0x00010c4f5091 (TunesGenie+0x000100812091) Mutex M22653341146430552 is already destroyed. Thread T6 (tid=435761, running) is a GCD worker thread SUMMARY: ThreadSanitizer: data race (TunesGenie:x86_64+0x100302071) in __FIRSetAnalyticsDebugMode_block_invoke |
@FrankB1708 The FIRSetAnalyticsDebugMode tsan issue is planned to be fixed in the next release. It's part of #1370 |
Analytics
has an issue, I guess.Hello,
After I upgraded Firebase components to 5.0.1 from 4.13.0, my app stops and the thread sanitizer shows the following stack trace while I'm running on the Xcode.
I'm sure it doesn't exist when I use 4.13.0.
Steps to reproduce:
In my
AppDelegate.swift
, it initializes FirebaseApp like this. I think it's very normal.I'm using the following components;
Thanks.
The text was updated successfully, but these errors were encountered: