LibRtmp-Client-for-Android: App crashes (SIGABRT) on fast RTMP stream restart
Issue description
App crashes if RTMP streams are changed quickly (release player/initialize player) using ExoPlayer. If I make a delay before initializing a player with RTMP stream (1000ms) it doesn’t crash. It has something to do with improper thread handling of RTMP extension. It doesn’t happen if non-RTMP streams are used. It also doesn’t happen if you switch between non-RTMP and RTMP streams.
Please suggest a workaround, I can modify the library of ExoPlayer. Thanks.
Reproduction steps
Quickly release/reinitilize player with RTMP streams inside the same activity.
Link to test content
rtmp://live-fs.wmncdn.net/mbctv1/live1.stream rtmp://studiosystem.co.in:1935/v4news/livestream
Version of ExoPlayer being used
ExoPlayer 2.5.0
Device(s) and version(s) of Android being used
Nexus Player and VM
A full bug report captured from the device
08-09 00:12:46.754 10110 26351 26351 I DefaultRenderersFactory: Loaded FfmpegAudioRenderer.
08-09 00:12:46.754 10110 26351 26351 I ExoPlayerImpl: Init 6f1b5c0 [ExoPlayerLib/2.5.0] [fugu, Nexus Player, Asus, 26]
08-09 00:12:46.764 10025 21289 21289 I Finsky : [2] com.google.android.finsky.services.e.a(5): Installation state replication succeeded.
08-09 00:12:46.780 10110 26351 26351 I System.out: initializePlayer
08-09 00:12:46.781 10110 26351 26351 D EventLogger: state [0.01, true, I]
08-09 00:12:46.782 1000 313 828 I chatty : uid=1000(system) Binder:313_8 expire 3 lines
08-09 00:12:46.788 10110 26351 26351 D EventLogger: state [0.01, true, B]
08-09 00:12:46.788 10110 26351 26351 D EventLogger: sourceInfo [periodCount=1, windowCount=1
08-09 00:12:46.788 10110 26351 26351 D EventLogger: period [?]
08-09 00:12:46.788 10110 26351 26351 D EventLogger: window [?, false, false]
08-09 00:12:46.788 10110 26351 26351 D EventLogger: ]
08-09 00:12:46.788 10110 26351 26351 I System.out: onLoadingChanged
08-09 00:12:46.788 10110 26351 26351 I System.out: player com.google.android.exoplayer2.SimpleExoPlayer@7d5223e
08-09 00:12:46.788 10110 26351 26351 D EventLogger: loading [true]
08-09 00:12:46.988 root 230 230 W netd : type=1400 audit(0.0:2909): avc: denied { read write } for path="socket:[3756942]" dev="sockfs" ino=3756942 scontext=u:r:netd:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=unix_stream_socket permissive=0
08-09 00:12:46.990 10110 26351 27063 F libc : Invalid address 0xd2068400 passed to free: value not allocated
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: Handler (com.google.android.exoplayer2.upstream.Loader$ReleaseTask) {22a89f} sending message to a Handler on a dead thread
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: java.lang.IllegalStateException: Handler (com.google.android.exoplayer2.upstream.Loader$ReleaseTask) {22a89f} sending message to a Handler on a dead thread
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: at android.os.MessageQueue.enqueueMessage(MessageQueue.java:545)
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: at android.os.Handler.enqueueMessage(Handler.java:661)
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: at android.os.Handler.sendMessageAtTime(Handler.java:630)
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: at android.os.Handler.sendMessageDelayed(Handler.java:600)
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: at android.os.Handler.sendEmptyMessageDelayed(Handler.java:564)
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: at android.os.Handler.sendEmptyMessage(Handler.java:549)
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: at com.google.android.exoplayer2.upstream.Loader$ReleaseTask.run(Loader.java:423)
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
08-09 00:12:46.992 10110 26351 26929 W MessageQueue: at java.lang.Thread.run(Thread.java:764)
08-09 00:12:46.993 10110 26351 27063 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 27063 (Loader:Extracto)
08-09 00:12:47.175 10110 27087 27087 I crash_dump32: obtaining output fd from tombstoned
08-09 00:12:47.179 1058 206 206 I /system/bin/tombstoned: received crash request for pid 26351
08-09 00:12:47.181 10110 27087 27087 I crash_dump32: performing dump of process 26351 (target tid = 27063)
08-09 00:12:47.182 10110 27087 27087 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-09 00:12:47.182 10110 27087 27087 F DEBUG : Build fingerprint: 'google/fugu/fugu:8.0.0/OPP4.170623.014/4187591:user/release-keys'
08-09 00:12:47.182 10110 27087 27087 F DEBUG : Revision: '0'
08-09 00:12:47.182 10110 27087 27087 F DEBUG : ABI: 'x86'
08-09 00:12:47.182 10110 27087 27087 F DEBUG : pid: 26351, tid: 27063, name: Loader:Extracto >>> app.name <<<
08-09 00:12:47.183 10110 27087 27087 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-09 00:12:47.189 10110 27087 27087 F DEBUG : Abort message: 'Invalid address 0xd2068400 passed to free: value not allocated'
08-09 00:12:47.190 10110 27087 27087 F DEBUG : eax 00000000 ebx 000066ef ecx 000069b7 edx 00000006
08-09 00:12:47.190 10110 27087 27087 F DEBUG : esi 000069b7 edi d33f9b78
08-09 00:12:47.190 10110 27087 27087 F DEBUG : xcs 00000023 xds 0000002b xes 0000002b xfs 0000006b xss 0000002b
08-09 00:12:47.190 10110 27087 27087 F DEBUG : eip ffffe430 ebp d33f9b98 esp d33f9b2c flags 00000296
08-09 00:12:47.235 10110 27087 27087 F DEBUG :
08-09 00:12:47.235 10110 27087 27087 F DEBUG : backtrace:
08-09 00:12:47.235 10110 27087 27087 F DEBUG : #00 pc ffffe430 [vdso:ffffe000] (__kernel_vsyscall+16)
08-09 00:12:47.235 10110 27087 27087 F DEBUG : #01 pc 0008523c /system/lib/libc.so (tgkill+28)
08-09 00:12:47.235 10110 27087 27087 F DEBUG : #02 pc 0002e3ef /system/lib/libc.so (abort+111)
08-09 00:12:47.235 10110 27087 27087 F DEBUG : #03 pc 0003646e /system/lib/libc.so (__libc_fatal+46)
08-09 00:12:47.235 10110 27087 27087 F DEBUG : #04 pc 000b021b /system/lib/libc.so (ifree+811)
08-09 00:12:47.235 10110 27087 27087 F DEBUG : #05 pc 000b04ca /system/lib/libc.so (je_free+122)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #06 pc 0001527a /system/lib/libc.so (free+42)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #07 pc 00007760 /data/app/app.name-n0Q6B-VO-xAqQTQ49v0Opg==/lib/x86/librtmp-jni.so (RTMP_Free+32)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #08 pc 000036eb /data/app/app.name-n0Q6B-VO-xAqQTQ49v0Opg==/lib/x86/librtmp-jni.so (Java_net_butterflytv_rtmp_1client_RtmpClient_nativeOpen+235)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #09 pc 006454b7 /system/lib/libart.so (art_quick_generic_jni_trampoline+71)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #10 pc 0063f522 /system/lib/libart.so (art_quick_invoke_stub+338)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #11 pc 00112b18 /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+232)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #12 pc 00324233 /system/lib/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+371)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #13 pc 0031cf09 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+809)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #14 pc 006261a6 /system/lib/libart.so (MterpInvokeDirect+534)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #15 pc 006303a1 /system/lib/libart.so (artMterpAsmInstructionStart+14369)
08-09 00:12:47.236 10110 27087 27087 F DEBUG : #16 pc 002f6f29 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
08-09 00:12:47.237 10110 27087 27087 F DEBUG : #17 pc 002feeea /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
08-09 00:12:47.237 10110 27087 27087 F DEBUG : #18 pc 0031cedd /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+765)
08-09 00:12:47.237 10110 27087 27087 F DEBUG : #19 pc 00624aed /system/lib/libart.so (MterpInvokeVirtual+893)
08-09 00:12:47.237 10110 27087 27087 F DEBUG : #20 pc 006302a1 /system/lib/libart.so (artMterpAsmInstructionStart+14113)
08-09 00:12:47.237 10110 27087 27087 F DEBUG : #21 pc 002f6f29 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
08-09 00:12:47.237 10110 27087 27087 F DEBUG : #22 pc 002feeea /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
08-09 00:12:47.237 10110 27087 27087 F DEBUG : #23 pc 0031cedd /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+765)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #24 pc 00625d65 /system/lib/libart.so (MterpInvokeInterface+1653)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #25 pc 006304a1 /system/lib/libart.so (artMterpAsmInstructionStart+14625)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #26 pc 002f6f29 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #27 pc 002feeea /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #28 pc 0031cedd /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+765)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #29 pc 00625d65 /system/lib/libart.so (MterpInvokeInterface+1653)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #30 pc 006304a1 /system/lib/libart.so (artMterpAsmInstructionStart+14625)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #31 pc 002f6f29 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #32 pc 002feeea /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #33 pc 0031cedd /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+765)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #34 pc 00625d65 /system/lib/libart.so (MterpInvokeInterface+1653)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #35 pc 006304a1 /system/lib/libart.so (artMterpAsmInstructionStart+14625)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #36 pc 002f6f29 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
08-09 00:12:47.238 10110 27087 27087 F DEBUG : #37 pc 002feeea /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #38 pc 0031cedd /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+765)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #39 pc 00625d65 /system/lib/libart.so (MterpInvokeInterface+1653)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #40 pc 006304a1 /system/lib/libart.so (artMterpAsmInstructionStart+14625)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #41 pc 002f6f29 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #42 pc 002feeea /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #43 pc 0031cedd /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+765)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #44 pc 00624aed /system/lib/libart.so (MterpInvokeVirtual+893)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #45 pc 006302a1 /system/lib/libart.so (artMterpAsmInstructionStart+14113)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #46 pc 002f6f29 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #47 pc 002feeea /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+234)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #48 pc 0031cedd /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+765)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #49 pc 00625d65 /system/lib/libart.so (MterpInvokeInterface+1653)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #50 pc 006304a1 /system/lib/libart.so (artMterpAsmInstructionStart+14625)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #51 pc 002f6f29 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+537)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #52 pc 002fedcd /system/lib/libart.so (_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameE+141)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #53 pc 00614ead /system/lib/libart.so (artQuickToInterpreterBridge+1341)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #54 pc 0064557d /system/lib/libart.so (art_quick_to_interpreter_bridge+77)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #55 pc 0063f522 /system/lib/libart.so (art_quick_invoke_stub+338)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #56 pc 00112b18 /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+232)
08-09 00:12:47.239 10110 27087 27087 F DEBUG : #57 pc 00537f9d /system/lib/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+109)
08-09 00:12:47.240 10110 27087 27087 F DEBUG : #58 pc 00539676 /system/lib/libart.so (_ZN3art35InvokeVirtualOrInterfaceWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDP6jvalue+470)
08-09 00:12:47.240 10110 27087 27087 F DEBUG : #59 pc 0056bfb7 /system/lib/libart.so (_ZN3art6Thread14CreateCallbackEPv+1719)
08-09 00:12:47.240 10110 27087 27087 F DEBUG : #60 pc 00080087 /system/lib/libc.so (_ZL15__pthread_startPv+55)
08-09 00:12:47.240 10110 27087 27087 F DEBUG : #61 pc 0002f8db /system/lib/libc.so (__start_thread+75)
08-09 00:12:47.240 10110 27087 27087 F DEBUG : #62 pc 0001ec26 /system/lib/libc.so (__bionic_clone+70)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 18 (8 by maintainers)
Thanks for the update. We’ll update our dependency once there’s a full (e.g. non-RC) release containing the fix.
Sorry, I fixed it by putting the compilation address to rtmp-extension gradle file, not the app.gradle file. Thanks for info!
@mekya, thank you! Looking forward to it.