bitkit
bitkit copied to clipboard
[Bug]: Crash loop
Describe the bug
The app crashes after opened for some time even if I don't tap anything.
Reproduce
Not sure if related, but I have no idea what are those pending ₿33 254.
Screenshots / Recording
https://github.com/synonymdev/bitkit/assets/93796166/2e5b8efa-0347-4b44-95a1-96c8f2d92cd4
Operating system
iOS 17.4
Bitkit version
104
Log output
iOS crash log shared with "Issue 1564" on the note.
@Jasonvdb @ovitrif seems a deja vu. Can you check why is it happening again ?
Looked into the TestFlight crash report. No sign of this being a LDK/Native crash. This usually means an issue on the JS side.
Thread 16 Crashed:
0 libsystem_kernel.dylib 0x00000001ddc67974 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001f170d0ec pthread_kill + 268 (pthread.c:1717)
2 libsystem_c.dylib 0x000000019d2cab80 abort + 180 (abort.c:118)
3 libsystem_malloc.dylib 0x00000001a553cc68 malloc_vreport + 896 (malloc_printf.c:251)
4 libsystem_malloc.dylib 0x00000001a553ce4c malloc_report + 64 (malloc_printf.c:290)
5 libsystem_malloc.dylib 0x00000001a5517390 find_zone_and_free + 528 (malloc.c:2793)
6 bitkit 0x0000000104737284 void std::__1::__libcpp_operator_delete[abi:v160006]<void*>(void*) + 8 (new:295)
7 bitkit 0x0000000104737284 void std::__1::__do_deallocate_handle_size[abi:v160006]<>(void*, unsigned long) + 8 (new:319)
8 bitkit 0x0000000104737284 std::__1::__libcpp_deallocate[abi:v160006](void*, unsigned long, unsigned long) + 8 (new:335)
9 bitkit 0x0000000104737284 std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, facebook::react::TurboModule::MethodMeta... + 8 (allocator.h:131)
10 bitkit 0x0000000104737284 std::__1::allocator_traits<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, facebook::rea... + 8 (allocator_traits.h:288)
11 bitkit 0x0000000104737284 std::__1::__hash_table<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allo... + 48 (__hash_table:1538)
12 bitkit 0x0000000104737234 std::__1::__hash_table<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allo... + 24 (__hash_table:1478)
13 libsystem_c.dylib 0x000000019d26dcfc __cxa_finalize_ranges + 476 (atexit.c:290)
14 libsystem_c.dylib 0x000000019d26dacc exit + 32 (exit.c:78)
15 bitkit 0x0000000104697270 -[RNExitApp exitApp] + 16 (RNExitApp.mm:15)
16 CoreFoundation 0x000000019533cc84 __invoking___ + 148
17 CoreFoundation 0x000000019533c710 -[NSInvocation invoke] + 428 (NSForwarding.m:3411)
18 CoreFoundation 0x000000019533c538 -[NSInvocation invokeWithTarget:] + 64 (NSForwarding.m:3508)
19 bitkit 0x0000000104769150 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 388 (RCTModuleMethod.mm:584)
20 bitkit 0x000000010476b1a0 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&, int, (anonymous namespace)::SchedulingContext) + 456 (RCTNativeModule.mm:197)
21 bitkit 0x000000010476adf0 facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const + 68 (RCTNativeModule.mm:114)
22 bitkit 0x000000010476adf0 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 112 (RCTNativeModule.mm:105)
23 libdispatch.dylib 0x000000019d21013c _dispatch_call_block_and_release + 32 (init.c:1530)
24 libdispatch.dylib 0x000000019d211dd4 _dispatch_client_callout + 20 (object.m:576)
25 libdispatch.dylib 0x000000019d219400 _dispatch_lane_serial_drain + 748 (queue.c:3900)
26 libdispatch.dylib 0x000000019d219f30 _dispatch_lane_invoke + 380 (queue.c:3991)
27 libdispatch.dylib 0x000000019d224cb4 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6998)
28 libdispatch.dylib 0x000000019d224528 _dispatch_workloop_worker_thread + 404 (queue.c:6592)
29 libsystem_pthread.dylib 0x00000001f1708f20 _pthread_wqthread + 288 (pthread.c:2665)
30 libsystem_pthread.dylib 0x00000001f1708fc0 start_wqthread + 8
Just an update. While I'm not getting any crashes anymore (may have been fixed in a previous update). I did find the stuck funds.
[{"amount_satoshis":10393,"claimable_height":830832,"type":"MaybeTimeoutClaimableHTLC"},{"claimable_height":830738,"type":"MaybeTimeoutClaimableHTLC","amount_satoshis":10396},{"claimable_height":830654,"type":"MaybeTimeoutClaimableHTLC","amount_satoshis":12465}]
It seems these 3 payments were outgoing when the channel was closed and they all need to be claimed individually but the fee is too high to do so.
2024-03-27 10:17:53 WARN (LDK): Can't 25% bump new claiming tx, amount 10396 is too small (lightning::chain::package 1157)
2024-03-27 10:17:53 WARN (LDK): Can't 25% bump new claiming tx, amount 10393 is too small (lightning::chain::package 1157)
2024-03-27 10:17:53 WARN (LDK): Can't 25% bump new claiming tx, amount 12465 is too small (lightning::chain::package 1157)
Oh, I forgot I had those payments pending. Btw, I think the same happened here: #1288
Yeah seems like it. It's a bit of a pain but unfortunately your wallet is not going to be able to sweep those until the mempool pretty much clears.
I haven't seen anything of this nature so I'm closing this issue. @mattcrv if you're able to reproduce the crash then I can reopen and try debugging it.