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 while publish data in condition connect VPN and not connect internet #4692

Open
anpht opened this issue Apr 26, 2023 · 4 comments
Open
Labels
bug Something isn't working follow up Requires follow up from maintainers iot Issues related to the IoT SDK

Comments

@anpht
Copy link

anpht commented Apr 26, 2023

Describe the bug
When the device connect VPN and not connect internet, I got a crash while publish data

To Reproduce
Steps to reproduce the behavior:

  1. Connect VPN with app Proton VPN
  2. Disconnect internet
  3. Publish data with qos messageDeliveryAttemptedAtMostOnce
  4. App stuck and crash within 1 minute

Observed Behavior

Expected Behavior
App not stuck and crash while publish data in condition connect VPN and not connect internet

Environment(please complete the following information):

  • SDK Version: 2.27.10
  • Dependency Manager: Cocoapods
  • Xcode Version: 14.2

Device Information (please complete the following information):

  • Device: iPhone mini 12
  • iOS Version: iOS 16.4

Logs

issue_151aaa52b8632676d7b838516a2ffe26_crash_session_6115ad9d736f4462978f2f7f341d1851_DNE_0_v2_stacktrace.txt

# Crashlytics - Stack trace
# Platform: apple
# Version: 1.0.0 (11)
# Issue: 151aaa52b8632676d7b838516a2ffe26
# Session: 6115ad9d736f4462978f2f7f341d1851_DNE_0_v2
# Date: Tue Apr 25 2023 14:21:45 GMT+0700 (Indochina Time)

com.apple.main-thread
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  CoreFoundation                 0x79114 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7a340 __CFRunLoopRun + 1208
6  CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
7  CFNetwork                      0x146d84 _CFNetworkErrorGetLocalizedDescription + 176748
8  CoreFoundation                 0x7b744 CFWriteStreamWrite + 444
9  AWSIoT                         0x78ed0 -[AWSMQTTEncoder encodeMessage:] + 636
10 AWSIoT                         0x7cdd0 -[AWSMQTTSession send:] + 224
11 AWSIoT                         0x7a5f0 -[AWSMQTTSession publishDataAtMostOnce:onTopic:retain:] + 52
12 AWSIoT                         0x5a040 -[AWSIoTMQTTClient publishData:qos:onTopic:retain:ackCallback:] + 600
13 AWSIoT                         0x90a8 -[AWSIoTDataManager publishData:onTopic:QoS:retain:ackCallback:] + 244
14 SDK                  0x63dfc $s13SDK20DataManagerC07publishD033_37A4FD63160A6C1BE543F864E9DA46E4LL4datay10Foundation0D0V_tF + 308
15 SDK                  0x64184 $s13SDK20DataManagerCAA0cdE4TypeA2aDP5start4datay10Foundation0D0V_tFTW + 32
16 iot                 0xb4ccc DataHelper.start(samplingFrequency:lastDataSync:) + 46 (DataHelper.swift:46)
17 iot                 0xb4698 DataHelper.excuteData(samplingFrequency:lastDataSync:) + 4371826328 (<compiler-generated>:4371826328)
18 iot                 0xb61d4 DataHelper.ecgDataDidUpdate(data:) + 86 (DataHelper.swift:86)
19 SDK                  0x354cc $s13SDK16IoTDeviceManagerC8showData33_DEF5E1C62576A1E62161A0B91C935B65LL11serviceType14characteristicyAA07ServiceR0O_So16CBCharacteristicCtFTf4nnd_n + 600
20 SDK                  0x2f854 $s13SDK16IoTDeviceManagerC28characteristicDidValueUpdate6valuesySDys11AnyHashableVypG_tF + 1044
21 SDK                  0x4dfd4 $s13SDK15PeripheralProxyC10peripheral_17didUpdateValueFor5errorySo12CBPeripheralC_So16CBCharacteristicCs5Error_pSgtFTf4dnnn_n + 1164
22 SDK                  0x49940 $s13SDK15PeripheralProxyC10peripheral_11didReadRSSI5errorySo12CBPeripheralC_So8NSNumberCs5Error_pSgtFToTm + 108
23 CoreBluetooth                  0x39d98 -[CBPeripheral handleAttributeEvent:args:attributeSelector:delegateSelector:delegateFlag:] + 188
24 CoreBluetooth                  0x39ec8 -[CBPeripheral handleCharacteristicEvent:characteristicSelector:delegateSelector:delegateFlag:] + 100
25 CoreBluetooth                  0x36b40 -[CBPeripheral handleMsg:args:] + 616
26 CoreBluetooth                  0x2b9c -[CBCentralManager handleMsg:args:] + 152
27 CoreBluetooth                  0x271c -[CBManager xpcConnectionDidReceiveMsg:args:] + 228
28 CoreBluetooth                  0x25f4 __30-[CBXpcConnection _handleMsg:]_block_invoke + 48
29 libdispatch.dylib              0x2320 _dispatch_call_block_and_release + 32
30 libdispatch.dylib              0x3eac _dispatch_client_callout + 20
31 libdispatch.dylib              0xb534 _dispatch_lane_serial_drain + 668
32 libdispatch.dylib              0xc0d8 _dispatch_lane_invoke + 436
33 libdispatch.dylib              0x125f8 _dispatch_main_queue_drain + 756
34 libdispatch.dylib              0x122f4 _dispatch_main_queue_callback_4CF + 44
35 CoreFoundation                 0x98d18 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
36 CoreFoundation                 0x7a650 __CFRunLoopRun + 1992
37 CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
38 GraphicsServices               0x135c GSEventRunModal + 164
39 UIKitCore                      0x39d37c -[UIApplication _run] + 888
40 UIKitCore                      0x39cfe0 UIApplicationMain + 340
41 iot                 0x6bfc main + 12 (AppDelegate.swift:12)
42 ???                            0x1cd200dec (Missing)

com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  CoreFoundation                 0x79114 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7a340 __CFRunLoopRun + 1208
6  CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
7  Foundation                     0x420c4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8  Foundation                     0x41fac -[NSRunLoop(NSRunLoop) runUntilDate:] + 64
9  UIKitCore                      0x4cfdac -[UIEventFetcher threadMain] + 416
10 Foundation                     0x5b634 __NSThread__start__ + 716
11 libsystem_pthread.dylib        0x16b8 _pthread_start + 148
12 libsystem_pthread.dylib        0xb88 thread_start + 8

com.google.firebase.crashlytics.MachExceptionServer
0  FirebaseCrashlytics            0x1e3dc FIRCLSProcessRecordAllThreads + 184
1  FirebaseCrashlytics            0x1e7bc FIRCLSProcessRecordAllThreads + 1176
2  FirebaseCrashlytics            0x1592c FIRCLSHandler + 48
3  FirebaseCrashlytics            0x18188 FIRCLSMachExceptionServer + 688
4  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
5  libsystem_pthread.dylib        0xb88 thread_start + 8

Realm notification listener
0  libsystem_kernel.dylib         0x25bc kevent + 8
1  Realm                          0x3a0cc4 realm::_impl::ExternalCommitHelper::listen() + 156
2  Realm                          0x3a0e14 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0>>(void*) + 52
3  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
4  libsystem_pthread.dylib        0xb88 thread_start + 8

com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  CoreFoundation                 0x79114 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7a340 __CFRunLoopRun + 1208
6  CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
7  CFNetwork                      0x2587e0 _CFURLStorageSessionDisableCache + 60900
8  Foundation                     0x5b634 __NSThread__start__ + 716
9  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
10 libsystem_pthread.dylib        0xb88 thread_start + 8

com.apple.CFSocket.private
0  libsystem_kernel.dylib         0x17e8 select$DARWIN_EXTSN + 8
1  libsystem_kernel.dylib         0x17e8 __select + 8
2  CoreFoundation                 0xc8a7c __CFSocketManager + 636
3  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
4  libsystem_pthread.dylib        0xb88 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x1558 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x8078 _pthread_cond_wait + 1232
2  libc++.1.dylib                 0x12ef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3  Realm                          0x18dd14 realm::DB::AsyncCommitHelper::main() + 84
4  Realm                          0x19367c void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, realm::DB::AsyncCommitHelper::start_thread()::'lambda'()>>(void*) + 44
5  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
6  libsystem_pthread.dylib        0xb88 thread_start + 8

Thread
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  CoreFoundation                 0x79114 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7a340 __CFRunLoopRun + 1208
6  CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
7  Foundation                     0x420c4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8  AWSIoT                         0x59940 -[AWSIoTMQTTClient openStreams:] + 472
9  Foundation                     0x5b634 __NSThread__start__ + 716
10 libsystem_pthread.dylib        0x16b8 _pthread_start + 148
11 libsystem_pthread.dylib        0xb88 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x118c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe28 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb7c start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x118c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe28 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb7c start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x118c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe28 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb7c start_wqthread + 8

Thread
0  libsystem_pthread.dylib        0xb74 start_wqthread + 254

Crashed: Thread
0  libdispatch.dylib              0x3a520 _dispatch_semaphore_dispose.cold.1 + 40
1  libdispatch.dylib              0x49f8 _dispatch_semaphore_signal_slow + 82
2  libdispatch.dylib              0x2d28 _dispatch_dispose + 208
3  AWSIoT                         0x7914c -[AWSMQTTEncoder .cxx_destruct] + 28
4  libobjc.A.dylib                0x20a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116
5  libobjc.A.dylib                0x6e00 objc_destructInstance + 80
6  libobjc.A.dylib                0x104fc _objc_rootDealloc + 80
7  AWSIoT                         0x7a2b4 -[AWSMQTTSession connectToInputStream:outputStream:] + 244
8  AWSIoT                         0x598c0 -[AWSIoTMQTTClient openStreams:] + 344
9  Foundation                     0x5b634 __NSThread__start__ + 716
10 libsystem_pthread.dylib        0x16b8 _pthread_start + 148
11 libsystem_pthread.dylib        0xb88 thread_start + 8%

@royjit
Copy link
Contributor

royjit commented Apr 26, 2023

Hi @anpht Could you please post the crash log in the GitHub issue?

@royjit royjit added bug Something isn't working pending-community-response Issue is pending response from the issue requestor labels Apr 26, 2023
@anpht
Copy link
Author

anpht commented Apr 27, 2023

@royjit I updated in Logs, please help me check again

@harsh62
Copy link
Member

harsh62 commented Oct 3, 2023

Apologies for the delay. Our team is actively prioritizing and working on issues. We will provide an update as soon as we have one on the issue.

@atierian atierian added iot Issues related to the IoT SDK follow up Requires follow up from maintainers and removed pending-community-response Issue is pending response from the issue requestor labels Oct 16, 2023
@lawmicha
Copy link
Member

lawmicha commented Feb 9, 2024

Hello, we released 2.33.9 which includes an IoT crash fix #5185. Please upgrade to this and let us know if you are still experiencing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working follow up Requires follow up from maintainers iot Issues related to the IoT SDK
Projects
None yet
Development

No branches or pull requests

5 participants