launchdarkly / ios-client-sdk

LaunchDarkly Client-side SDK for iOS (Swift and Obj-C)
https://docs.launchdarkly.com/sdk/client-side/ios
Other
69 stars 84 forks source link

Xcode warning Data Race in LD.DiagnosticReporter.isOnline.getter #238

Closed provanandparanjape closed 3 years ago

provanandparanjape commented 3 years ago

Describe the bug Thread Sanitizer detected "Data Race". No impact on functionality as of now.

Data Race detected

To reproduce

Expected behavior No warning

Logs

WARNING: ThreadSanitizer: data race (pid=43449) Read of size 1 at 0x7b1c0002bb41 by thread T7:

0 $s12LaunchDarkly18DiagnosticReporterC8isOnlineSbvg (LaunchDarkly:x86_64+0x6aa84)

#1 $s12LaunchDarkly18DiagnosticReporterC19maybeStartReporting33_D8E86B731A260FDA4BC4F57B0B3451E0LLyyF DiagnosticReporter.swift:68 (LaunchDarkly:x86_64+0x6bf74)
#2 $s12LaunchDarkly18DiagnosticReporterC8isOnlineSbvWyycfU_ DiagnosticReporter.swift:50 (LaunchDarkly:x86_64+0x6aa18)
#3 $s12LaunchDarkly18DiagnosticReporterC8isOnlineSbvWyycfU_TA <compiler-generated> (LaunchDarkly:x86_64+0x70d1d)
#4 $sIeg_IeyB_TR <compiler-generated> (LaunchDarkly:x86_64+0x30d90)
#5 __tsan::invoke_and_release_block(void*) <null>:4279024 (libclang_rt.tsan_iossim_dynamic.dylib:x86_64+0x6a89b)
#6 _dispatch_client_callout <null>:4279024 (libdispatch.dylib:x86_64+0x2d47)

SDK version 5.3.1

Language version, developer tools Swift

OS/platform Xcode 11.3.1

torchhound commented 3 years ago

Hi @provanandparanjape thanks for reporting this.

Filed internally as 101407

gwhelanLD commented 3 years ago

Hi @provanandparanjape,

Thanks for reporting this issue. We believe it should be resolved in the 5.4.0 release, so I'm going to close this issue for now. Feel free to reopen if the release does not correct the issue.

Thanks, @gwhelanLD