Skip to content

Thread Sanitizer: Swift access race in Segment.CountBasedFlushPolicy.count.modify : Swift.Int at 0x11a75f4c0 #227

Closed
@dmcgloin

Description

@dmcgloin

Describe the bug

When running our app with the Xcode Thread Sanitizer enabled, we sometimes see this runtime warning: Swift access race in Segment.CountBasedFlushPolicy.count.modify : Swift.Int at 0x11a75f4c0

It's flagged within the CountBasedFlushPolicy class at this line of code:

   public func updateState(event: RawEvent) {
        count += 1      <-----
    }

To Reproduce

  1. Edit the current main app target (iOS) scheme
  2. For the Run (Debug) section, select Diagnostics, enable "Thread Sanitizer" check box
  3. Run app

Expected behavior
No runtime warnings

Platform (please complete the following information):

  • Library Version in use: 1.4.5 (But I don't think this issue is new to this version)
  • Platform being tested: iOS 16.4 on simulator
  • Integrations in use: None except custom proxy

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions