Preparser crash
Description
An assertion related to refcount fails from the preparser thread.
Expected behavior
The assertion should pass
Actual behavior
There is some refcount issue causing a segfault from the preparser thread:
07-27 09:14:36.175 19225 20032 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 20032 (vlc-preparse)
07-27 09:14:36.277 201 201 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-27 09:14:36.277 201 201 F DEBUG : Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/M4B30Z/3437181:user/release-keys'
07-27 09:14:36.277 201 201 F DEBUG : Revision: '11'
07-27 09:14:36.277 201 201 F DEBUG : ABI: 'arm'
07-27 09:14:36.277 201 201 F DEBUG : pid: 19225, tid: 20032, name: vlc-preparse >>> org.videolan.vlc.debug <<<
07-27 09:14:36.277 201 201 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
07-27 09:14:36.303 201 201 F DEBUG : Abort message: '../../include/vlc_atomic.h:59: void vlc_atomic_rc_inc(vlc_atomic_rc_t *): assertion "prev" failed'
07-27 09:14:36.304 201 201 F DEBUG : r0 00000000 r1 00004e40 r2 00000006 r3 95482978
07-27 09:14:36.304 201 201 F DEBUG : r4 95482980 r5 95482930 r6 00000002 r7 0000010c
07-27 09:14:36.304 201 201 F DEBUG : r8 88e4f190 r9 95482730 sl 95482568 fp 954825a8
07-27 09:14:36.304 201 201 F DEBUG : ip 00000006 sp 954824d8 lr b6c95b61 pc b6c97f50 cpsr 40010010
07-27 09:14:36.321 201 201 F DEBUG :
07-27 09:14:36.321 201 201 F DEBUG : backtrace:
07-27 09:14:36.321 201 201 F DEBUG : #00 pc 00041f50 /system/lib/libc.so (tgkill+12)
07-27 09:14:36.321 201 201 F DEBUG : #01 pc 0003fb5d /system/lib/libc.so (pthread_kill+32)
07-27 09:14:36.322 201 201 F DEBUG : #02 pc 0001c30f /system/lib/libc.so (raise+10)
07-27 09:14:36.322 201 201 F DEBUG : #03 pc 000194c1 /system/lib/libc.so (__libc_android_abort+34)
07-27 09:14:36.322 201 201 F DEBUG : #04 pc 000174ac /system/lib/libc.so (abort+4)
07-27 09:14:36.322 201 201 F DEBUG : #05 pc 0001af23 /system/lib/libc.so (__libc_fatal+16)
07-27 09:14:36.322 201 201 F DEBUG : #06 pc 00019549 /system/lib/libc.so (__assert2+20)
07-27 09:14:36.322 201 201 F DEBUG : #07 pc 00a7cdb0 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
07-27 09:14:36.323 201 201 F DEBUG : #08 pc 00ab11ec /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
07-27 09:14:36.323 201 201 F DEBUG : #09 pc 00aab504 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
07-27 09:14:36.323 201 201 F DEBUG : #10 pc 00ac6774 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
07-27 09:14:36.323 201 201 F DEBUG : #11 pc 00ac90c8 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
07-27 09:14:36.323 201 201 F DEBUG : #12 pc 00ac9064 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so (demux_Demux+116)
07-27 09:14:36.323 201 201 F DEBUG : #13 pc 00ac1178 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
07-27 09:14:36.323 201 201 F DEBUG : #14 pc 00abe3e4 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
07-27 09:14:36.323 201 201 F DEBUG : #15 pc 00b16714 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
07-27 09:14:36.323 201 201 F DEBUG : #16 pc 0003f45f /system/lib/libc.so (_ZL15__pthread_startPv+30)
07-27 09:14:36.324 201 201 F DEBUG : #17 pc 00019b43 /system/lib/libc.so (__start_thread+6)
07-27 09:14:36.984 201 201 F DEBUG :
07-27 09:14:36.984 201 201 F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
For some reason, ndk-stack
could not resolve the symbols:
#02 0x0001c30f /system/lib/libc.so (raise+10)
#03 0x000194c1 /system/lib/libc.so (__libc_android_abort+34)
#04 0x000174ac /system/lib/libc.so (abort+4)
#05 0x0001af23 /system/lib/libc.so (__libc_fatal+16)
#06 0x00019549 /system/lib/libc.so (__assert2+20)
#07 0x00a7cdb0 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
#08 0x00ab11ec /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
#09 0x00aab504 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
#10 0x00ac6774 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
#11 0x00ac90c8 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
#12 0x00ac9064 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so (demux_Demux+116)
#13 0x00ac1178 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
#14 0x00abe3e4 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
#15 0x00b16714 /data/app/org.videolan.vlc.debug-1/lib/arm/libvlc.so
#16 0x0003f45f /system/lib/libc.so (_ZL15__pthread_startPv+30)
#17 0x00019b43 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
Steps to reproduce
I can reproduce 100%:
- Settings > Advanced > Clear media database
- Wait a bit
💥
Context
App version
- vlc4: current
master
4cca6109e2a003c5e7260a9d760b2feee22ed036 - vlc-android: current
master
94a9ea07 - medialibrary: 7c0193d8ad605f91d9721fb9138ef7d57c57903f
Android version
Android 6.0.1, but probably any
Device model
Nexus 5 (a test device)
App mode
Smartphone