TrueTime.swift
TrueTime.swift copied to clipboard
NTPConnection Crash
@msanders
Logs:
https://gist.github.com/otymartin/4ffb1be00f09fb4e2673a3824f1a14ab
Experiencing the exact same issue, hope it'll be fixed soon!
Same problem here, any solution for this crash
Any solution for this crash?
Still seeing this crash since updating to v5.0.0
@otymartin, @arm0nic, @clopex, @ramonilho and @andrew-muzmatch - thank you for reporting and our apologies for delay in resolving this issue. We will be looking into this issue shortly.
In the mean time using version 4.2.0 might help resolve the issue for the moment. Please do note that if you end up using that version, you will need to update your initialization logic.
If you have additional stack traces, it would be very helpful to us if you can provide them.
@00FA9A Hi, one more stack trace. Hope it will help you. app_issue_crash_a66f2b1c5d2e45a0a0470e85dc0c8f01_DNE_0_v2.txt
Today, we have rolled out 5.0.1 that we believe resolves this issue.
Please update and do not hesitate to reopen if you encounter it again.
@00FA9A Thank you!
@00FA9A Hello. As I see, this fix is not available in Cocoapods yet. Do you want to release it after it's been tested properly? Or you just forgot to update the pod?

@Ariandr I'm not sure why but they haven't been updating the pod.
For an immediate fix you can just point your podfile to the commit
pod 'TrueTime', :git => 'https://github.com/instacart/TrueTime.swift', :commit => 'aafdfbec3c79ff8c5d6ff09e57d64d16e4c6d6dd'
@Ariandr unfortunately, I'm not the owner of the pod at the moment therefore I've been unable to update it. Will try to sort this out asap for you. In the mean time, you should be able to use latest version by adding
github "instacart/TrueTime.swift" "5.0.1"
to your Cartfile (or use @miketsprague suggestion).
@00FA9A I see :) Thanks for your effort!
@Ariandr Podspec should now be updated
Hello, we're still experiencing crashes on 5.0.1 version
pod 'TrueTime', git: 'https://github.com/instacart/TrueTime.swift', tag: '5.0.1'
Crashed: com.instacart.ntp.client
0 libdispatch.dylib 0x190b03bf0 _dispatch_barrier_sync_f + 4
1 Citymobil 0x105183118 $S8TrueTime13NTPConnectionC5query9addresses6config6logger13callbackQueue8progressSayACGSayAA13SocketAddressOG_AA9NTPConfigVySScSgSo17OS_dispatch_queueCyAC_6ResultASOyAA013FrozenNetworkB0VSo7NSErrorCAXs5Error10Foundationg_GtctFZyycfU1_ (<compiler-generated>)
2 Citymobil 0x105187374 $S8TrueTime13NTPConnectionC5query9addresses6config6logger13callbackQueue8progressSayACGSayAA13SocketAddressOG_AA9NTPConfigVySScSgSo17OS_dispatch_queueCyAC_6ResultASOyAA013FrozenNetworkB0VSo7NSErrorCAXs5Error10Foundationg_GtctFZyycfU1_TA (<compiler-generated>)
3 Citymobil 0x1051872e0 $S8TrueTime13NTPConnectionC5query9addresses6config6logger13callbackQueue8progressSayACGSayAA13SocketAddressOG_AA9NTPConfigVySScSgSo17OS_dispatch_queueCyAC_6ResultASOyAA013FrozenNetworkB0VSo7NSErrorCAXs5Error10Foundationg_GtctFZyAC_A_tcfU0_TA (<compiler-generated>)
4 Citymobil 0x105187504 $S8TrueTime13NTPConnectionC8complete33_2A79C9048389EB5D5F57E571231D0EE3LLyy6ResultAFOyAA013FrozenNetworkB0VSo7NSErrorCAKs5Error10Foundationg_GFyycfU_TA (<compiler-generated>)
5 Citymobil 0x1049e4c04 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
6 libdispatch.dylib 0x190b5ca38 _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x190b5d7d4 _dispatch_client_callout + 16
8 libdispatch.dylib 0x190b06320 _dispatch_lane_serial_drain$VARIANT$mp + 592
9 libdispatch.dylib 0x190b06e3c _dispatch_lane_invoke$VARIANT$mp + 428
10 libdispatch.dylib 0x190b0f4a8 _dispatch_workloop_worker_thread + 596
11 libsystem_pthread.dylib 0x190d3d114 _pthread_wqthread + 304
12 libsystem_pthread.dylib 0x190d3fcd4 start_wqthread + 4
Will be glad to help in investigation
Thank you for reporting @mandarin6b0, looks like it might be the same issue again. If you have any additional stack traces, it might be useful. How often are you seeing this crash occur?
I'm also still seeing this in our crash reports (never been able to reproduce it). It's our top crash and affects about .1% of our sessions.
I've got two separate stack traces (although not sure how helpful they are). Here's the one that is more frequent:
Crashed: com.instacart.ntp.client
0 libdispatch.dylib 0x22916a748 _dispatch_barrier_sync_f + 4
1 TrueTime 0x10446173c $S8TrueTime13NTPConnectionC5query9addresses6config6logger13callbackQueue8progressSayACGSayAA13SocketAddressOG_AA9NTPConfigVySScSgSo17OS_dispatch_queueCyAC_6ResultASOyAA013FrozenNetworkB0VSo7NSErrorCAXs5Error10Foundationg_GtctFZyycfU1_ + 1016
2 TrueTime 0x104465a18 $S8TrueTime13NTPConnectionC5query9addresses6config6logger13callbackQueue8progressSayACGSayAA13SocketAddressOG_AA9NTPConfigVySScSgSo17OS_dispatch_queueCyAC_6ResultASOyAA013FrozenNetworkB0VSo7NSErrorCAXs5Error10Foundationg_GtctFZyycfU1_TA + 56
3 TrueTime 0x104465984 $S8TrueTime13NTPConnectionC5query9addresses6config6logger13callbackQueue8progressSayACGSayAA13SocketAddressOG_AA9NTPConfigVySScSgSo17OS_dispatch_queueCyAC_6ResultASOyAA013FrozenNetworkB0VSo7NSErrorCAXs5Error10Foundationg_GtctFZyAC_A_tcfU0_TA + 56
4 TrueTime 0x104465ba8 $S8TrueTime13NTPConnectionC8complete33_2A79C9048389EB5D5F57E571231D0EE3LLyy6ResultAFOyAA013FrozenNetworkB0VSo7NSErrorCAKs5Error10Foundationg_GFyycfU_TA + 32
5 TrueTime 0x10446fcd0 $SIeg_IeyB_TR + 36
6 libdispatch.dylib 0x229190a38 _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x2291917d4 _dispatch_client_callout + 16
8 libdispatch.dylib 0x22916cdec _dispatch_lane_serial_drain$VARIANT$armv81 + 548
9 libdispatch.dylib 0x22916d92c _dispatch_lane_invoke$VARIANT$armv81 + 408
10 libdispatch.dylib 0x229175e08 _dispatch_workloop_worker_thread + 584
11 libsystem_pthread.dylib 0x229371114 _pthread_wqthread + 304
Here's the less frequent one that Crashlytics seems to think is iOS 12 only:
Crashed: com.instacart.ntp.client
0 libdispatch.dylib 0x22916a7a8 _dispatch_barrier_sync_f + 100
1 TrueTime 0x1047b6548 $S8TrueTime9NTPClientC9stopQueue33_1287656FA7524B1873A8558648EF240CLLyyF + 336
2 TrueTime 0x1047b74b8 $S8TrueTime9NTPClientC6finish33_1287656FA7524B1873A8558648EF240CLLyy6ResultAFOyAA09ReferenceB0CSo7NSErrorCAKs5Error10Foundationg_GF + 1160
3 TrueTime 0x1047b8508 $S8TrueTime9NTPClientC5query33_1287656FA7524B1873A8558648EF240CLL9addresses4hostySayAA13SocketAddressOG_SStFyAA13NTPConnectionC_6ResultAMOyAA013FrozenNetworkB0VSo7NSErrorCARs5Error10Foundationg_GtcfU_ + 3328
4 TrueTime 0x1047c196c $S8TrueTime13NTPConnectionC5query9addresses6config6logger13callbackQueue8progressSayACGSayAA13SocketAddressOG_AA9NTPConfigVySScSgSo17OS_dispatch_queueCyAC_6ResultASOyAA013FrozenNetworkB0VSo7NSErrorCAXs5Error10Foundationg_GtctFZyAC_A_tcfU0_TA + 32
5 TrueTime 0x1047c1ba8 $S8TrueTime13NTPConnectionC8complete33_2A79C9048389EB5D5F57E571231D0EE3LLyy6ResultAFOyAA013FrozenNetworkB0VSo7NSErrorCAKs5Error10Foundationg_GFyycfU_TA + 32
6 TrueTime 0x1047cbcd0 $SIeg_IeyB_TR + 36
7 libdispatch.dylib 0x229190a38 _dispatch_call_block_and_release + 24
8 libdispatch.dylib 0x2291917d4 _dispatch_client_callout + 16
9 libdispatch.dylib 0x22916cdec _dispatch_lane_serial_drain$VARIANT$armv81 + 548
10 libdispatch.dylib 0x22916d92c _dispatch_lane_invoke$VARIANT$armv81 + 408
11 libdispatch.dylib 0x229175e08 _dispatch_workloop_worker_thread + 584
12 libsystem_pthread.dylib 0x229371114 _pthread_wqthread + 304
Hello, We're also experiencing this issue on version 5.0.2 in various macOS versions. Here is the crash logs, hope they helps!
Thread 11 Crashed:
0 libdispatch.dylib 0x00007fff5ebde54d _dispatch_barrier_sync_f + 6
1 TrueTime 0x000000010773ebc4 closure #3 () -> () in static TrueTime.NTPConnection.query(addresses: [TrueTime.SocketAddress], config: TrueTime.NTPConfig, logger: (Swift.String) -> ()?, callbackQueue: __C.OS_dispatch_queue, progress: (TrueTime.NTPConnection, Swift.Result<TrueTime.FrozenNetworkTime, __C.NSError>) -> ()) -> [TrueTime.NTPConnection] (NTPConnection.swift:66)
2 TrueTime 0x0000000107744371 partial apply forwarder for closure #3 () -> () in static TrueTime.NTPConnection.query(addresses: [TrueTime.SocketAddress], config: TrueTime.NTPConfig, logger: (Swift.String) -> ()?, callbackQueue: __C.OS_dispatch_queue, progress: (TrueTime.NTPConnection, Swift.Result<TrueTime.FrozenNetworkTime, __C.NSError>) -> ()) -> [TrueTime.NTPConnection] (<compiler-generated>:0)
3 TrueTime 0x00000001077442b9 partial apply forwarder for closure #2 (TrueTime.NTPConnection, Swift.Result<TrueTime.FrozenNetworkTime, __C.NSError>) -> () in static TrueTime.NTPConnection.query(addresses: [TrueTime.SocketAddress], config: TrueTime.NTPConfig, logger: (Swift.String) -> ()?, callbackQueue: __C.OS_dispatch_queue, progress: (TrueTime.NTPConnection, Swift.Result<TrueTime.FrozenNetworkTime, __C.NSError>) -> ()) -> [TrueTime.NTPConnection] (NTPConnection.swift:37)
4 TrueTime 0x000000010774485a partial apply forwarder for closure #1 () -> () in TrueTime.NTPConnection.(complete in _2A79C9048389EB5D5F57E571231D0EE3)(Swift.Result<TrueTime.FrozenNetworkTime, __C.NSError>) -> () (NTPConnection.swift:201)
5 TrueTime 0x0000000107749110 reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) () -> () (<compiler-generated>:0)
6 libdispatch.dylib 0x00007fff5ebd95f8 _dispatch_call_block_and_release + 12
7 libdispatch.dylib 0x00007fff5ebda63d _dispatch_client_callout + 8
8 libdispatch.dylib 0x00007fff5ebe08e0 _dispatch_lane_serial_drain + 602
9 libdispatch.dylib 0x00007fff5ebe1396 _dispatch_lane_invoke + 385
10 libdispatch.dylib 0x00007fff5ebe96ed _dispatch_workloop_worker_thread + 598
11 libsystem_pthread.dylib 0x00007fff5ee1a611 _pthread_wqthread + 421
12 libsystem_pthread.dylib 0x00007fff5ee1a3fd start_wqthread + 13
Hi! Probably the same crash as the guys above posted. Hope it helps.
Crashed: com.instacart.ntp.client
0 libdispatch.dylib 0x1b4bda748 _dispatch_barrier_sync_f + 4
1 TrueTime 0x104bc03c0 closure #3 in static NTPConnection.query(addresses:config:logger:callbackQueue:progress:) (NTPConnection.swift:67)
2 TrueTime 0x104bc4bfc partial apply for closure #3 in static NTPConnection.query(addresses:config:logger:callbackQueue:progress:) (<compiler-generated>)
3 TrueTime 0x104bc4b6c partial apply for closure #2 in static NTPConnection.query(addresses:config:logger:callbackQueue:progress:) (NTPConnection.swift:38)
4 TrueTime 0x104bc4fac partial apply for closure #1 in NTPConnection.complete(_:) (NTPConnection.swift:207)
5 TrueTime 0x104bb70f4 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
6 libdispatch.dylib 0x1b4c00a38 _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x1b4c017d4 _dispatch_client_callout + 16
8 libdispatch.dylib 0x1b4bdcdec _dispatch_lane_serial_drain$VARIANT$armv81 + 548
9 libdispatch.dylib 0x1b4bdd92c _dispatch_lane_invoke$VARIANT$armv81 + 408
10 libdispatch.dylib 0x1b4be5e08 _dispatch_workloop_worker_thread + 584
11 libsystem_pthread.dylib 0x1b4de1114 _pthread_wqthread + 304
12 libsystem_pthread.dylib 0x1b4de3cd4 start_wqthread + 4
I guess this issue should be reopened 😭
Same issue here on 5.0.2.
@00FA9A Hi, could you please consider reopening the issue? Thanks.
Just to cross reference, I think I have a fix for this: https://github.com/instacart/TrueTime.swift/pull/75
@Ariandr and all - sorry for late reply, issue should defiantly be reopened. We had limited time available to deal with it. We are looking into @miketsprague pr as possible solution.
Thanks to great work by @miketsprague, we hope this issue should be resolved in 5.0.3 that is available now via CocoaPods. Thank you all for patience and apologies for inconvenience this has caused to you and your users
Any solution? I have same problem
@RenanDelfanti this issue was resolved https://github.com/instacart/TrueTime.swift/pull/75 which should be in the latest version (5.0.3).
We should be able to close this ticket as well.
@mikesprague-fc I'm using version 5.0.3, but my app crash on second time to get true time. I'm using this library with flutter Implementation: https://github.com/RenanDelfanti/flutter_true_time/tree/dev
Dear all facing the same issue still, Please find the firebase logs as below Version: latest version (5.0.3)
Stack Trace: Crashed: com.instacart.ntp.connection 0 TrueTime 0x100aac028 $s8TrueTime21NTPTimevalConvertiblePAAE13timeSince1970xSo7timevalV_tcfCSo12ntp_time64_ta_Tg5Tf4nd_n + 88 1 TrueTime 0x100aa5f30 $s8TrueTime13NTPConnectionC07requestB033_2A79C9048389EB5D5F57E571231D0EE3LLyyFyycfU_ + 148 2 TrueTime 0x100a9cf44 $sIeg_IeyB_TR + 28 3 libdispatch.dylib 0x21be80a38 _dispatch_call_block_and_release + 24 4 libdispatch.dylib 0x21be817d4 _dispatch_client_callout + 16 5 libdispatch.dylib 0x21be2a324 _dispatch_lane_serial_drain$VARIANT$mp + 592 6 libdispatch.dylib 0x21be2ae40 _dispatch_lane_invoke$VARIANT$mp + 428 7 libdispatch.dylib 0x21be334ac _dispatch_workloop_worker_thread + 596 8 libsystem_pthread.dylib 0x21c062114 _pthread_wqthread + 304 9 libsystem_pthread.dylib 0x21c064cd4 start_wqthread + 4
Device Model: iPhone 6s Plus Orientation: Portrait RAM free: 66.88 MB Disk free: 1.13 GB Operating System Version: 12.4.0 (16G77) Orientation: Portrait Jailbroken: Yes Crash Date: May 27, 2020, 1:32:00 AM App version: 1.5 (1.0.0.4)