Skip to content

tsan warning in FIRCLSSDKFileLog on initialization (called from multiple threads) #5903

@cltnschlosser

Description

@cltnschlosser

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.5
  • Firebase SDK version: 6.27.0
  • Firebase Component: Crashlytics
  • Component version: 4.2.0
  • Installation method: CocoaPods

[REQUIRED] Step 2: Describe the problem

tsan warning. May not actually happen in practice, but blocks unit tests.

Steps to reproduce:

App launched for tests.

Relevant Code:

image

Read of size 4 by thread 15
#0	0x00000001064fe15e in FIRCLSSDKFileLog at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Helpers/FIRCLSInternalLogging.c:34
#1	0x00000001064cd396 in FIRCLSBinaryImageStoreNode at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Components/FIRCLSBinaryImage.m:447
#2	0x00000001064ccd90 in FIRCLSBinaryImageChanged at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Components/FIRCLSBinaryImage.m:376
#3	0x00000001064cbaf5 in FIRCLSBinaryImageAddedCallback at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Components/FIRCLSBinaryImage.m:181
#4	0x00000001127adbe3 in dyld::registerAddCallback(void (*)(mach_header const*, long)) ()
#5	0x00000001064d7750 in __FIRCLSContextInitialize_block_invoke.26 at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Components/FIRCLSContext.m:186
#6	0x00000001128c02c8 in __wrap_dispatch_group_async_block_invoke ()
#7	0x00007fff519e38cb in _dispatch_client_callout ()
#8	0x00007fff513b03af in (anonymous namespace)::Remangler::mangleAnyNominalType(swift::Demangle::Node*, (anonymous namespace)::Remangler::EntityContext&) ()
#9	0x00007b9400060920 in 0x7b9400060920 ()
#10	0x00007b9400060920 in 0x7b9400060920 ()
#11	0x00007e8000723700 in 0x7e8000723700 ()
Write of size 4 by thread 1
#0	0x00000001064fe1dc in FIRCLSSDKFileLog at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Helpers/FIRCLSInternalLogging.c:35
#1	0x00000001064d6182 in FIRCLSContextInitialize at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Components/FIRCLSContext.m:224
#2	0x000000010653235f in -[FIRCLSReportManager startCrashReporterWithProfilingMark:report:] at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Controllers/FIRCLSReportManager.m:493
#3	0x000000010652fd0e in -[FIRCLSReportManager startWithProfilingMark:] at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Controllers/FIRCLSReportManager.m:343
#4	0x0000000106569840 in -[FIRCrashlytics initWithApp:appInfo:installations:analytics:] at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/FIRCrashlytics.m:137
#5	0x000000010656a666 in __38+[FIRCrashlytics componentsToRegister]_block_invoke at /<project_path>/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/FIRCrashlytics.m:173
#6	0x00000001064b14a4 in -[FIRComponentContainer instantiateInstanceForProtocol:withBlock:] at /<project_path>/Pods/FirebaseCore/FirebaseCore/Sources/FIRComponentContainer.m:148
#7	0x00000001064b1b4b in -[FIRComponentContainer instanceForProtocol:] at /<project_path>/Pods/FirebaseCore/FirebaseCore/Sources/FIRComponentContainer.m:182
#8	0x00000001064b11bc in -[FIRComponentContainer instantiateEagerComponents] at /<project_path>/Pods/FirebaseCore/FirebaseCore/Sources/FIRComponentContainer.m:125
#9	0x00000001064a3e97 in +[FIRApp configureWithName:options:] at /<project_path>/Pods/FirebaseCore/FirebaseCore/Sources/FIRApp.m:206
#10	0x00000001064a3007 in +[FIRApp configureWithOptions:] at /<project_path>/Pods/FirebaseCore/FirebaseCore/Sources/FIRApp.m:145
#11	0x00000001064a2e53 in +[FIRApp configure] at /<project_path>/Pods/FirebaseCore/FirebaseCore/Sources/FIRApp.m:131

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions