software video filter crashes VAAPI on AMD Radeon
When opening a certain MP4 file, vlc crashes out more often than not. Running the program under gdb gives the following output
$ gdb --args vlc Veronica_Mars.S01E01.2022-07-26.1605-1700.Pilot-short.mp4
<snip>
(No debugging symbols found in vlc)
(gdb) r
Starting program: /usr/bin/vlc Veronica_Mars.S01E01.2022-07-26.1605-1700.Pilot-short.mp4
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
[New Thread 0x7ffff3d8c640 (LWP 82949)]
[New Thread 0x7ffff47b0640 (LWP 82950)]
[New Thread 0x7ffff46af640 (LWP 82951)]
[New Thread 0x7ffff45ae640 (LWP 82952)]
[New Thread 0x7ffff44ad640 (LWP 82953)]
[000055555555a580] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[Thread 0x7ffff44ad640 (LWP 82953) exited]
[New Thread 0x7ffff44ad640 (LWP 82954)]
[New Thread 0x7ffff19d7640 (LWP 82955)]
[New Thread 0x7ffff18d6640 (LWP 82956)]
[New Thread 0x7ffff17d5640 (LWP 82957)]
[Thread 0x7ffff19d7640 (LWP 82955) exited]
[New Thread 0x7ffff19d7640 (LWP 82958)]
[Thread 0x7ffff19d7640 (LWP 82958) exited]
[New Thread 0x7ffff13a3640 (LWP 82959)]
[New Thread 0x7fffce4a6640 (LWP 82960)]
[New Thread 0x7fffccc11640 (LWP 82962)]
[New Thread 0x7fffc7fff640 (LWP 82963)]
[New Thread 0x7fffc77fe640 (LWP 82964)]
[New Thread 0x7fffc6ffd640 (LWP 82965)]
[New Thread 0x7ffff19d7640 (LWP 82966)]
[Thread 0x7ffff17d5640 (LWP 82957) exited]
[Thread 0x7ffff44ad640 (LWP 82954) exited]
[Thread 0x7ffff45ae640 (LWP 82952) exited]
[New Thread 0x7fffb7dde640 (LWP 82967)]
[New Thread 0x7fffb75dd640 (LWP 82968)]
[New Thread 0x7fffb6ddc640 (LWP 82969)]
[New Thread 0x7fffb65db640 (LWP 82970)]
[New Thread 0x7fffb5dda640 (LWP 82971)]
[New Thread 0x7fffb55d9640 (LWP 82972)]
[New Thread 0x7fffb4dd8640 (LWP 82973)]
[New Thread 0x7ffff17d5640 (LWP 82974)]
[New Thread 0x7ffff44ad640 (LWP 82975)]
[New Thread 0x7ffff45ae640 (LWP 82976)]
[New Thread 0x7fffb4319640 (LWP 82977)]
[New Thread 0x7fffb4218640 (LWP 82978)]
[Thread 0x7ffff45ae640 (LWP 82976) exited]
[Thread 0x7fffb4218640 (LWP 82978) exited]
[New Thread 0x7fff7ff28640 (LWP 82979)]
[New Thread 0x7fff7f727640 (LWP 82980)]
[New Thread 0x7fff7ef26640 (LWP 82981)]
[New Thread 0x7fff7e725640 (LWP 82982)]
[New Thread 0x7fff7df24640 (LWP 82983)]
[New Thread 0x7fff7d723640 (LWP 82984)]
[New Thread 0x7fffb4218640 (LWP 82985)]
[New Thread 0x7ffff45ae640 (LWP 82986)]
[New Thread 0x7fff7cbc7640 (LWP 82987)]
[Thread 0x7fffb4319640 (LWP 82977) exited]
[Thread 0x7ffff44ad640 (LWP 82975) exited]
[New Thread 0x7fff6ffff640 (LWP 82988)]
[New Thread 0x7fff6f7fe640 (LWP 82989)]
[New Thread 0x7fff6effd640 (LWP 82990)]
[New Thread 0x7fff6e7fc640 (LWP 82991)]
[New Thread 0x7fff6dffb640 (LWP 82992)]
[New Thread 0x7fff6d7fa640 (LWP 82993)]
[New Thread 0x7fff6cff9640 (LWP 82994)]
[New Thread 0x7fff57fff640 (LWP 82995)]
[00007fff74003e70] gl gl: Initialized libplacebo v4.192.1 (API v192)
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
[00007fff7481a200] vaapi_filters filter error: entrypoint(10) is not available
[00007fff7487fe00] vaapi_filters filter error: entrypoint(10) is not available
[00007fff8cc15ea0] avcodec decoder: Using Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 () for hardware decoding
malloc(): unaligned tcache chunk detected
Thread 39 "vlc" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff7cbc7640 (LWP 82987)]
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140735286113856) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140735286113856) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140735286113856) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140735286113856, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007ffff7d75476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff7d5b7f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007ffff7dbc6f6 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7f0eb8c "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#6 0x00007ffff7dd3d7c in malloc_printerr (str=str@entry=0x7ffff7f11d40 "malloc(): unaligned tcache chunk detected") at ./malloc/malloc.c:5664
#7 0x00007ffff7dd845c in tcache_get (tc_idx=<optimised out>) at ./malloc/malloc.c:3195
#8 __GI___libc_malloc (bytes=69) at ./malloc/malloc.c:3313
#9 0x00007ffff6e23b09 in () at /lib/x86_64-linux-gnu/libfreetype.so.6
#10 0x00007ffff6e2504e in () at /lib/x86_64-linux-gnu/libfreetype.so.6
#11 0x00007ffff6e25674 in FT_Outline_New () at /lib/x86_64-linux-gnu/libfreetype.so.6
#12 0x00007ffff6e311c7 in FT_Glyph_Stroke () at /lib/x86_64-linux-gnu/libfreetype.so.6
#13 0x00007fffa802ec4b in () at /usr/lib/x86_64-linux-gnu/vlc/plugins/text_renderer/libfreetype_plugin.so
#14 0x00007fffa802fcb4 in () at /usr/lib/x86_64-linux-gnu/vlc/plugins/text_renderer/libfreetype_plugin.so
#15 0x00007ffff7cacd03 in spu_Render () at /lib/x86_64-linux-gnu/libvlccore.so.9
#16 0x00007ffff7caf3a5 in () at /lib/x86_64-linux-gnu/libvlccore.so.9
#17 0x00007ffff7cb0a23 in () at /lib/x86_64-linux-gnu/libvlccore.so.9
#18 0x00007ffff7dc7b43 in start_thread (arg=<optimised out>) at ./nptl/pthread_create.c:442
#19 0x00007ffff7e59a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) info threads
Id Target Id Frame
1 Thread 0x7ffff7766140 (LWP 82946) "vlc" 0x00007ffff7d7621a in __GI___sigtimedwait (set=set@entry=0x7fffffffda00, info=info@entry=0x7fffffffd910,
timeout=timeout@entry=0x0) at ../sysdeps/unix/sysv/linux/sigtimedwait.c:61
2 Thread 0x7ffff3d8c640 (LWP 82949) "threaded-ml" 0x00007ffff7e4bd7f in __GI___poll (fds=0x7fffec000bc0, nfds=2, timeout=119)
at ../sysdeps/unix/sysv/linux/poll.c:29
3 Thread 0x7ffff47b0640 (LWP 82950) "vlc" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x5555555f98a8) at ./nptl/futex-internal.c:57
4 Thread 0x7ffff46af640 (LWP 82951) "vlc" 0x00007ffff7e4bd7f in __GI___poll (fds=0x7ffff46aed20, nfds=2, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:29
9 Thread 0x7ffff18d6640 (LWP 82956) "vlc" 0x00007ffff7e4bd7f in __GI___poll (fds=0x7fffd0334580, nfds=3, timeout=27753)
at ../sysdeps/unix/sysv/linux/poll.c:29
12 Thread 0x7ffff13a3640 (LWP 82959) "QXcbEventQueue" 0x00007ffff7e4bd7f in __GI___poll (fds=0x7ffff13a2c48, nfds=1, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:29
13 Thread 0x7fffce4a6640 (LWP 82960) "QDBusConnection" 0x00007ffff7e4bd7f in __GI___poll (fds=0x7fffc8011d20, nfds=5, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:29
14 Thread 0x7fffccc11640 (LWP 82962) "Thread (pooled)" __futex_abstimed_wait_common64 (private=544, cancel=true, abstime=0x7fffccc10cb0, op=137, expected=0,
futex_word=0x7fffd0124e74) at ./nptl/futex-internal.c:57
15 Thread 0x7fffc7fff640 (LWP 82963) "Thread (pooled)" __futex_abstimed_wait_common64 (private=544, cancel=true, abstime=0x7fffc7ffecb0, op=137, expected=0,
futex_word=0x7fffd01251a4) at ./nptl/futex-internal.c:57
16 Thread 0x7fffc77fe640 (LWP 82964) "Thread (pooled)" __futex_abstimed_wait_common64 (private=544, cancel=true, abstime=0x7fffc77fdcb0, op=137, expected=0,
futex_word=0x7fffd01cccf4) at ./nptl/futex-internal.c:57
17 Thread 0x7fffc6ffd640 (LWP 82965) "Thread (pooled)" __futex_abstimed_wait_common64 (private=544, cancel=true, abstime=0x7fffc6ffccb0, op=137, expected=0,
futex_word=0x7fffd01cd0c4) at ./nptl/futex-internal.c:57
18 Thread 0x7ffff19d7640 (LWP 82966) "vlc" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fffd0309000) at ./nptl/futex-internal.c:57
19 Thread 0x7fffb7dde640 (LWP 82967) "vlc:disk$0" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fffd01c09e8) at ./nptl/futex-internal.c:57
20 Thread 0x7fffb75dd640 (LWP 82968) "vlc:sh0" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fffd02eb270) at ./nptl/futex-internal.c:57
21 Thread 0x7fffb6ddc640 (LWP 82969) "vlc:sh1" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fffd02eb270) at ./nptl/futex-internal.c:57
22 Thread 0x7fffb65db640 (LWP 82970) "vlc:sh2" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fffd02eb270) at ./nptl/futex-internal.c:57
23 Thread 0x7fffb5dda640 (LWP 82971) "vlc:sh3" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fffd02eb270) at ./nptl/futex-internal.c:57
24 Thread 0x7fffb55d9640 (LWP 82972) "vlc:sh4" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fffd02eb270) at ./nptl/futex-internal.c:57
25 Thread 0x7fffb4dd8640 (LWP 82973) "vlc:sh5" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
--Type <RET> for more, q to quit, c to continue without paging--
futex_word=0x7fffd02eb270) at ./nptl/futex-internal.c:57
26 Thread 0x7ffff17d5640 (LWP 82974) "vlc" __futex_abstimed_wait_common64 (private=-1566971791, cancel=true, abstime=0x7ffff17d4c90, op=137,
expected=0, futex_word=0x7fff98000ea0) at ./nptl/futex-internal.c:57
31 Thread 0x7fff7ff28640 (LWP 82979) "vlc" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff8cc50440) at ./nptl/futex-internal.c:57
32 Thread 0x7fff7f727640 (LWP 82980) "vlc" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff8cc505a0) at ./nptl/futex-internal.c:57
33 Thread 0x7fff7ef26640 (LWP 82981) "vlc" __futex_abstimed_wait_common64 (private=<optimised out>, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff8cc4e4f0) at ./nptl/futex-internal.c:57
34 Thread 0x7fff7e725640 (LWP 82982) "vlc" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff8cc50864) at ./nptl/futex-internal.c:57
35 Thread 0x7fff7df24640 (LWP 82983) "vlc" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff8cc509c4) at ./nptl/futex-internal.c:57
36 Thread 0x7fff7d723640 (LWP 82984) "vlc" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff8cc50b24) at ./nptl/futex-internal.c:57
37 Thread 0x7fffb4218640 (LWP 82985) "vlc" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff7804f7f4) at ./nptl/futex-internal.c:57
38 Thread 0x7ffff45ae640 (LWP 82986) "vlc" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff8cc50174) at ./nptl/futex-internal.c:57
* 39 Thread 0x7fff7cbc7640 (LWP 82987) "vlc" __pthread_kill_implementation (no_tid=0, signo=6, threadid=140735286113856) at ./nptl/pthread_kill.c:44
40 Thread 0x7fff6ffff640 (LWP 82988) "vlc:disk$0" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff74028b38) at ./nptl/futex-internal.c:57
41 Thread 0x7fff6f7fe640 (LWP 82989) "vlc:sh0" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff74024920) at ./nptl/futex-internal.c:57
42 Thread 0x7fff6effd640 (LWP 82990) "vlc:sh1" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff74024920) at ./nptl/futex-internal.c:57
43 Thread 0x7fff6e7fc640 (LWP 82991) "vlc:sh2" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff74024920) at ./nptl/futex-internal.c:57
44 Thread 0x7fff6dffb640 (LWP 82992) "vlc:sh3" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff74024920) at ./nptl/futex-internal.c:57
45 Thread 0x7fff6d7fa640 (LWP 82993) "vlc:sh4" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff74024920) at ./nptl/futex-internal.c:57
46 Thread 0x7fff6cff9640 (LWP 82994) "vlc:sh5" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff74024920) at ./nptl/futex-internal.c:57
47 Thread 0x7fff57fff640 (LWP 82995) "vlc:gdrv0" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0,
futex_word=0x7fff74058ad0) at ./nptl/futex-internal.c:57
(gdb)
The mp4 file has encoded from MPEG2-TS using ffmpeg, I've attached a short section of the video (5s) which recreates the problem: Veronica_Mars.S01E01.2022-07-26.1605-1700.Pilot-short
A similar crash happens on other similarly encoded video files.
System: Ubuntu 22.0.4.1
Version info:
Installed: 3.0.16-1build7
Candidate: 3.0.16-1build7
Version table:
*** 3.0.16-1build7 500
500 http://gb.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
100 /var/lib/dpkg/status
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
VLC version 3.0.16 Vetinari (3.0.13-8-g41878ff4f2)
Compiled by buildd on lcy02-amd64-108.buildd (Mar 13 2022 08:00:10)
Compiler: gcc version 11.2.0 (Ubuntu 11.2.0-18ubuntu1)
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public Licence;
see the file named COPYING for details.
Written by the VideoLAN team; see the AUTHORS file.