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

Crash in CarrierInfoProvider.swift #619

Closed
matcartmill opened this issue Oct 1, 2021 · 2 comments
Closed

Crash in CarrierInfoProvider.swift #619

matcartmill opened this issue Oct 1, 2021 · 2 comments
Assignees
Labels
crash SDK crashes

Comments

@matcartmill
Copy link

matcartmill commented Oct 1, 2021

As a note, I do know that we're on v1.6.0 and the current appears to be v.1.7.0. We will be updating but given the infrequency of this crash it may be quite some time before we understand if the upgrade fixed the issue or not.

Thanks.

The crash

Here is the stack trace (the crash happens on line 5 of the trace):

Crashed: com.datadoghq.ios-sdk-logging-read-write
0  libswiftCore.dylib             0x18ed94b70 swift_unknownObjectRetain + 20
1  libswiftFoundation.dylib       0x18e8b7f48 closure #2 in static Dictionary._forceBridgeFromObjectiveC(_:result:) + 736
2  libswiftFoundation.dylib       0x18e8b8000 partial apply for closure #2 in static Dictionary._forceBridgeFromObjectiveC(_:result:) + 36
3  libswiftFoundation.dylib       0x18e8bd32c _NativeDictionary.init(_unsafeUninitializedCapacity:allowingDuplicates:initializingWith:) + 340
4  libswiftFoundation.dylib       0x18e8b6ad0 static Dictionary._unconditionallyBridgeFromObjectiveC(_:) + 1368
5  Datadog                        0x103c948b8 iOSCarrierInfoProvider.current.getter + 132 (CarrierInfoProvider.swift:132)
6  Datadog                        0x103cd9298 LogBuilder.createLogWith(level:message:error:date:attributes:tags:) + 308728 (<compiler-generated>:308728)
7  Datadog                        0x103ce1120 Logger.log(level:message:error:messageAttributes:) + 284 (Logger.swift:284)
8  Datadog                        0x103cdcfb0 specialized Dictionary.filter(_:) + 324368 (<compiler-generated>:324368)
9  Datadog                        0x103cdbc80 Log.encode(to:) + 43 (LogSanitizer.swift:43)
10 Datadog                        0x103cdc04c protocol witness for Encodable.encode(to:) in conformance Log + 320428 (<compiler-generated>:320428)
11 libswiftCore.dylib             0x18ed1d010 dispatch thunk of Encodable.encode(to:) + 28
12 libswiftFoundation.dylib       0x18e9224fc __JSONEncoder.box_(_:) + 2200
13 libswiftFoundation.dylib       0x18e921824 JSONEncoder.encode<A>(_:) + 684
14 libswiftFoundation.dylib       0x18e9428bc dispatch thunk of JSONEncoder.encode<A>(_:) + 64
15 Datadog                        0x103cd4468 FileWriter.write<A>(value:) + 35 (FileWriter.swift:35)
16 Datadog                        0x103cd47cc protocol witness for Writer.write<A>(value:) in conformance FileWriter + 289580 (<compiler-generated>:289580)
17 Datadog                        0x103cb5e48 DataProcessor.write<A>(value:) + 37 (DataProcessor.swift:37)
18 Datadog                        0x103c96524 partial apply for closure #1 in ConsentAwareDataWriter.write<A>(value:) + 44 (ConsentAwareDataWriter.swift:44)
19 Datadog                        0x103ce000c thunk for @escaping @callee_guaranteed () -> () + 336748 (<compiler-generated>:336748)
20 libdispatch.dylib              0x18aa59a84 _dispatch_call_block_and_release + 32
21 libdispatch.dylib              0x18aa5b81c _dispatch_client_callout + 20
22 libdispatch.dylib              0x18aa63004 _dispatch_lane_serial_drain + 620
23 libdispatch.dylib              0x18aa63c00 _dispatch_lane_invoke + 404
24 libdispatch.dylib              0x18aa6e4bc _dispatch_workloop_worker_thread + 764
25 libsystem_pthread.dylib        0x1d6b327a4 _pthread_wqthread + 276
26 libsystem_pthread.dylib        0x1d6b3974c start_wqthread + 8

Datadog SDK versions:

1.6.0

Last stable Datadog SDK version:

Volume:

Affecting one user

OS version:

iOS 14.8

Deployment Target:

iOS 13

Device version:

iPhone 11 Pro

Environment:

User had over 1GB of memory available, and lots of disk space

@matcartmill matcartmill added the crash SDK crashes label Oct 1, 2021
@ncreated ncreated self-assigned this Oct 1, 2021
@ncreated
Copy link
Member

ncreated commented Oct 1, 2021

Hello @matcartmill 👋 , thank you for the stack trace - it's a good starter for us. However, as we suspect threading race condition (similar to one fixed in #613), would it be possible to see stack traces for other threads as well?

@ncreated
Copy link
Member

Fixed in 1.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash SDK crashes
Projects
None yet
Development

No branches or pull requests

2 participants