You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception:java.util.concurrent.TimeoutException while calling uniffi_ldk_node_fn_free_node through JNA (Native.invokeVoid).
Call path: UniFFI pointer destroy / cleaner — Node$UniffiPointerDestroyer.destroy → UniffiCleanerAction.run on FinalizerDaemon (not app main thread). Suggests Node is being freed by GC/finalizer while native free_node blocks too long or deadlocks.
Priority: Medium — lower than #980–#982; separate from those clusters.
Expected behavior
Stopping or releasing the LDK Node must not crash the app.
Native node teardown (free_node) must complete within JNA timeout or be coordinated with explicit LightningService.stop() / LightningRepo.stop() so finalizer does not race active node use.
Steps to Reproduce
TBD — no deterministic repro. Suggested matrix:
Android 15 or 16 device, mainnet wallet, notifications on (LightningNodeService / node running).
Exception java.util.concurrent.TimeoutException:
at com.sun.jna.Native.invokeVoid
at com.sun.jna.Function.invoke (Function.java:418)
at com.sun.jna.Function.invoke (Function.java:364)
at com.sun.jna.Library$Handler.invoke (Library.java:270)
at java.lang.reflect.Proxy.invoke (Proxy.java:1006)
at $Proxy4.uniffi_ldk_node_fn_free_node (Unknown Source)
at org.lightningdevkit.ldknode.Node$UniffiPointerDestroyer$destroy$lambda$1$$inlined$uniffiRustCall$1.invoke (ldk_node.android.kt:14367)
at org.lightningdevkit.ldknode.Node$UniffiPointerDestroyer$destroy$lambda$1$$inlined$uniffiRustCall$1.invoke (ldk_node.android.kt:313)
at org.lightningdevkit.ldknode.UniffiRustCallStatusHelper.withReference (ldk_node.android.kt:413)
at org.lightningdevkit.ldknode.Node$UniffiPointerDestroyer.destroy (ldk_node.android.kt:14368)
at org.lightningdevkit.ldknode.UniffiCleanerAction.run (ldk_node.android.kt:4595)
at jdk.internal.ref.CleanerImpl$PhantomCleanableRef.performCleanup (CleanerImpl.java:212)
at jdk.internal.ref.PhantomCleanable.clean (PhantomCleanable.java:133)
at java.lang.Daemons$FinalizerDaemon.doClean (Daemons.java:407)
at java.lang.Daemons$FinalizerDaemon.processReference (Daemons.java:377)
at java.lang.Daemons$FinalizerDaemon.runInternal (Daemons.java:341)
at java.lang.Daemons$Daemon.run (Daemons.java:135)
at java.lang.Thread.run (Thread.java:1564)
Bitkit Version
2.2.0 (181) mostly, some 2.1.2 (180), mainnet to.bitkit. Native dep at v2.2.0 tag: ldk-node-android 0.7.0-rc.36.
What happened?
Google Play Console reports a production crash during LDK Node native teardown via UniFFI/JNA.
Play cluster label:
Unknown Source - $Proxy4.uniffi_ldk_node_fn_free_nodePlay report: https://play.google.com/console/u/1/developers/5690237613698939049/app/4973032799696771282/vitals/crashes/5d6157871f2b5f277ad8f0eeefefc2cf/details?days=60&isUserPerceived=true
Exception:
java.util.concurrent.TimeoutExceptionwhile callinguniffi_ldk_node_fn_free_nodethrough JNA (Native.invokeVoid).Call path: UniFFI pointer destroy / cleaner —
Node$UniffiPointerDestroyer.destroy→UniffiCleanerAction.runon FinalizerDaemon (not app main thread). SuggestsNodeis being freed by GC/finalizer while nativefree_nodeblocks too long or deadlocks.Play Vitals (60-day window):
Priority: Medium — lower than #980–#982; separate from those clusters.
Expected behavior
Nodemust not crash the app.free_node) must complete within JNA timeout or be coordinated with explicitLightningService.stop()/LightningRepo.stop()so finalizer does not race active node use.Steps to Reproduce
TBD — no deterministic repro. Suggested matrix:
LightningNodeService/ node running).onTimeout([Bug]: ForegroundServiceDidNotStopInTimeException on LightningNodeService (Android 15+, 2.2.0) #980), rapid wallet ops, memory pressure.TimeoutExceptiononuniffi_ldk_node_fn_free_nodeor FinalizerDaemon.Nodereferences can be GC'd while node still running or during asynclightningRepo.stop().Logs / Screenshots / Recordings
Play Console: https://play.google.com/console/u/1/developers/5690237613698939049/app/4973032799696771282/vitals/crashes/5d6157871f2b5f277ad8f0eeefefc2cf/details?days=60&isUserPerceived=true
Full stack trace (most recent Play report):
Bitkit Version
2.2.0 (181) mostly, some 2.1.2 (180), mainnet
to.bitkit. Native dep atv2.2.0tag:ldk-node-android0.7.0-rc.36.Device / OS
Android 15 (SDK 35), Android 16 Beta (SDK 36). Pixel 9 / 9 Pro, Motorola lamu, Samsung r0s.
Reproducibility
Rarely (once or twice)
Additional context
Nodedestruction.lightningRepo.stop()inLightningNodeService([Bug]: ForegroundServiceDidNotStopInTimeException on LightningNodeService (Android 15+, 2.2.0) #980, [Bug]: ForegroundServiceStartNotAllowedException in LightningNodeService.onCreate (dataSync quota, Android 15+) #981).Nodelifecycle; awaitLightningService.stop(); investigatefree_nodein ldk-node bindings.