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
After the build/JNI fixes in #1159, a Perry-targeted Android app boots
cleanly through nativeMain, builds the NavStack tree, attaches the
root to the Activity, and starts the 8 ms timer pump. ~140 ms in,
within 1 ms of the first JS callback firing, an HWUI worker thread
aborts with a bionic FORTIFY check:
F libc : FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x...)
F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid N (hwuiTask1), pid M
The abort path skips debuggerd — no /data/tombstones/tombstone_*
file is written and the system data_app_native_crash dropbox tag
captures nothing. No Java exception, no JNI message in -b crash.
Timeline from logcat
… add_child:… (full NavStack tree built)
PerryApp: app_set_body: root_handle=1
PerryApp: app_run: called
PerryApp: attach_root_to_activity: setContentView called
PerryApp: start_timer_pump: setting up 8ms pump
PerryPump: nativePumpTick count=0..3
PerryCallback: invoke0: key=52 ptr=0x…
F libc : FORTIFY: pthread_mutex_lock called on a destroyed mutex
F libc : Fatal signal 6 (SIGABRT) in tid … (hwuiTask1)
The crash is consistent across launches (same callback key, same
thread).
The fortify check fires when pthread_mutex_lock is called on memory
that was already cleared by pthread_mutex_destroy. Most likely a
sync primitive in a Drawable / Widget state struct whose backing got
freed while HWUI still had a draw scheduled against it. The 1 ms gap
between the JS callback dispatch and the abort is suggestive of a
view-invalidation path that races a destruction.
Summary
After the build/JNI fixes in #1159, a Perry-targeted Android app boots
cleanly through
nativeMain, builds the NavStack tree, attaches theroot to the Activity, and starts the 8 ms timer pump. ~140 ms in,
within 1 ms of the first JS callback firing, an HWUI worker thread
aborts with a bionic FORTIFY check:
The abort path skips
debuggerd— no/data/tombstones/tombstone_*file is written and the system
data_app_native_crashdropbox tagcaptures nothing. No Java exception, no JNI message in
-b crash.Timeline from logcat
The crash is consistent across launches (same callback key, same
thread).
Environment
setContentView)Hypotheses
The fortify check fires when
pthread_mutex_lockis called on memorythat was already cleared by
pthread_mutex_destroy. Most likely async primitive in a Drawable / Widget state struct whose backing got
freed while HWUI still had a draw scheduled against it. The 1 ms gap
between the JS callback dispatch and the abort is suggestive of a
view-invalidation path that races a destruction.
Repro
--target android(e.g. aNavStackwith ≥1 reactive screen).assembleDebug, install, launch.adb logcat -b crash -d.Diagnostic notes
RUST_BACKTRACE=fullviadevicectl --environment-variablesis notavailable on
adbdirectly; triedsetprop— Android filters theapp's stderr.
__fortify_fatal→abort()without
libdebuggerd_client, so we lose backtrace.perry-ui-androidunder ASAN to identify the dangling mutex.