Skip to content
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

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

Closed
provanandparanjape opened this issue Feb 22, 2021 · 2 comments
Closed

Comments

@provanandparanjape
Copy link

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

To reproduce

  • Enable Thread sanitizer in XCode
  • Run your app which uses LD SDK

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 (LaunchDarkly:x86_64+0x70d1d)
#4 $sIeg_IeyB_TR (LaunchDarkly:x86_64+0x30d90)
#5 __tsan::invoke_and_release_block(void*) :4279024 (libclang_rt.tsan_iossim_dynamic.dylib:x86_64+0x6a89b)
#6 _dispatch_client_callout :4279024 (libdispatch.dylib:x86_64+0x2d47)

SDK version
5.3.1

Language version, developer tools
Swift

OS/platform
Xcode 11.3.1

@torchhound
Copy link
Contributor

Hi @provanandparanjape thanks for reporting this.

Filed internally as 101407

gwhelanLD added a commit that referenced this issue Feb 26, 2021
## [5.4.0] - 2021-02-26
### Added
- Added the `alias` method to `LDClient`. This can be used to associate two user objects for analytics purposes with an alias event.
- Added the `autoAliasingOptOut` configuration option. This can be used to control the new automatic aliasing behavior of the `identify` method; by setting `autoAliasingOptOut` to true, `identify` will not automatically generate alias events.
- Added the `isInitialized` property to `LDClient`. Unless the client has been set offline, this property's value is `false` until the client receives an initial set of flag values from the LaunchDarkly service. If the client is offline, the value will be `true` after initialization.

### Changed
- The `identify` method will now automatically generate an alias event when switching from an anonymous to a known user. This event associates the two users for analytics purposes as they most likely represent a single person.

### Fixed
- Some users reported synchronization issues with the internal `DiagnosticReporter` implementation, which has been reworked to address these issues. Thanks to @provanandparanjape for one such report ([#238](#238)).
@gwhelanLD
Copy link
Contributor

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

tanderson-ld pushed a commit that referenced this issue Aug 2, 2023
LDUser functionality has been replaced with the more flexible LDContext
concept which all LaunchDarkly SDKs will support.

We retained LDUser through the first major release to aide with the
adoption transition, but as we near the next release, we need to alert
customers that support will be ending.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants