Open 9000h opened 6 years ago
Thank you for reporting.
This might be caused by threads. Can you try to disable them with the following patch and then try to reproduce the crash:
diff --git a/codec.c b/codec.c
index bcf3d31..d36c12a 100644
--- a/codec.c
+++ b/codec.c
@@ -277,10 +277,6 @@ void CodecVideoOpen(VideoDecoder * decoder)
// FIXME: for software decoder use all cpus, otherwise 1
decoder->VideoCtx->thread_count = 1;
// open codec
- if (video_codec->capabilities & (AV_CODEC_CAP_AUTO_THREADS)) {
- Debug4("codec: auto threads enabled");
- decoder->VideoCtx->thread_count = 0;
- }
decoder->VideoCtx->opaque = decoder; // our structure
@@ -293,16 +289,6 @@ void CodecVideoOpen(VideoDecoder * decoder)
if (video_codec->capabilities & AV_CODEC_CAP_DR1) {
Debug4("codec: can use own buffer management");
}
- if (video_codec->capabilities & AV_CODEC_CAP_FRAME_THREADS) {
- Debug4("codec: supports frame threads");
- decoder->VideoCtx->thread_count = 0;
- decoder->VideoCtx->thread_type |= FF_THREAD_FRAME;
- }
- if (video_codec->capabilities & AV_CODEC_CAP_SLICE_THREADS) {
- Debug4("codec: supports slice threads");
- decoder->VideoCtx->thread_count = 0;
- decoder->VideoCtx->thread_type |= FF_THREAD_SLICE;
- }
decoder->VideoCtx->thread_safe_callbacks = 0;
decoder->VideoCtx->get_format = Codec_get_format;
decoder->VideoCtx->get_buffer2 = Codec_get_buffer2;
Also note that the ffdemux branch is under heavy development and not yet stable. I'm hoping it may eventually help with the audio issues reported in https://github.com/pesintta/vdr-plugin-vaapidevice/issues/98
I know it's not stable with the patch it works and I cannot reproduce the crash(before when running in gdb it did crash immediately)
there is another crash on startup sometimes (witch the patch)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr -D- -l3 -w 60 -Pfemon -Psatip -d2 -s 192.168.178.129:554|DVBS2-4,DVBT2-2|m'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f3137a8b700 (LWP 7106))]
(gdb) bt
#0 0x00007f31a6a1de97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007f31a6a1f801 in __GI_abort () at abort.c:79
#2 0x00007f319de51ec8 in () at /usr/lib/x86_64-linux-gnu/libavcodec.so.58
#3 0x00007f319de52065 in () at /usr/lib/x86_64-linux-gnu/libavcodec.so.58
#4 0x00007f319de53518 in () at /usr/lib/x86_64-linux-gnu/libavcodec.so.58
#5 0x00007f319de5ff64 in () at /usr/lib/x86_64-linux-gnu/libavcodec.so.58
#6 0x00007f319dc917a7 in () at /usr/lib/x86_64-linux-gnu/libavcodec.so.58
#7 0x00007f319dc94588 in avcodec_send_packet () at /usr/lib/x86_64-linux-gnu/libavcodec.so.58
#8 0x00007f319f6d48b1 in CodecVideoDecode (decoder=0x560c04d0c000) at codec.c:397
#9 0x00007f319f6c132d in VideoDecodeInput (stream=0x7f319f8e3600 <MyVideoStream>) at vaapidev.c:623
#10 0x00007f319f6c6dba in VaapiDisplayHandlerThread () at video.c:3925
#11 0x00007f319f6cdc6c in VideoDisplayHandlerThread (dummy=<optimized out>) at video.c:4551
#12 0x00007f31a82246db in start_thread (arg=0x7f3137a8b700) at pthread_create.c:463
#13 0x00007f31a6b0088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)
I've not seen such before on my systems. Unfortunately the backtrace hides the actual source of the assert. You'll need to add debugging symbols to your ffmpeg to make the lines 2-6 of your backtrace to contain relevant information.
here it goes
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr -D- -l3 -w 60 -Pfemon -Psatip -d2 -s 192.168.178.129:554|DVBS2-4,DVBT2-2|m'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f3137a8b700 (LWP 7106))]
(gdb) bt
#0 0x00007f31a6a1de97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007f31a6a1f801 in __GI_abort () at abort.c:79
#2 0x00007f319de51ec8 in alloc_frame (s=s@entry=0x7f312c077180) at src/libavcodec/hevc_refs.c:117
#3 0x00007f319de52065 in generate_missing_ref (poc=-80, s=0x7f312c077180) at src/libavcodec/hevc_refs.c:402
#4 0x00007f319de52065 in add_candidate_ref (s=s@entry=0x7f312c077180, list=0x7f312c0776c8, poc=-80, ref_flag=ref_flag@entry=2) at src/libavcodec/hevc_refs.c:441
#5 0x00007f319de53518 in ff_hevc_frame_rps (s=s@entry=0x7f312c077180) at src/libavcodec/hevc_refs.c:491
#6 0x00007f319de5ff64 in hevc_frame_start (s=0x7f312c077180) at src/libavcodec/hevcdec.c:2789
#7 0x00007f319de5ff64 in decode_nal_unit (nal=<optimized out>, s=0x7f312c077180) at src/libavcodec/hevcdec.c:2934
#8 0x00007f319de5ff64 in decode_nal_units (length=<optimized out>, buf=<optimized out>, s=0x7f312c077180) at src/libavcodec/hevcdec.c:3045
#9 0x00007f319de5ff64 in hevc_decode_frame (avctx=<optimized out>, data=<optimized out>, got_output=<optimized out>, avpkt=<optimized out>) at src/libavcodec/hevcdec.c:3181
#10 0x00007f319dc917a7 in decode_simple_internal (frame=0x7f312c3407c0, avctx=0x7f312c33fd80) at src/libavcodec/decode.c:398
#11 0x00007f319dc917a7 in decode_simple_receive_frame (frame=<optimized out>, avctx=<optimized out>) at src/libavcodec/decode.c:594
#12 0x00007f319dc917a7 in decode_receive_frame_internal (avctx=avctx@entry=0x7f312c33fd80, frame=0x7f312c3407c0) at src/libavcodec/decode.c:612
#13 0x00007f319dc94588 in avcodec_send_packet (avctx=avctx@entry=0x7f312c33fd80, avpkt=0x7f3137a8acf0) at src/libavcodec/decode.c:674
#14 0x00007f319f6d48b1 in CodecVideoDecode (decoder=0x560c04d0c000) at codec.c:397
#15 0x00007f319f6c132d in VideoDecodeInput (stream=0x7f319f8e3600 <MyVideoStream>) at vaapidev.c:623
#16 0x00007f319f6c6dba in VaapiDisplayHandlerThread () at video.c:3925
#17 0x00007f319f6cdc6c in VideoDisplayHandlerThread (dummy=<optimized out>) at video.c:4551
#18 0x00007f31a82246db in start_thread (arg=0x7f3137a8b700) at pthread_create.c:463
#19 0x00007f31a6b0088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)
https://github.com/pesintta/vdr-plugin-vaapidevice/blob/b1f79f797bec0b21c2afab3cceb8c96db5e955dd/codec.c#L440