Open owl0w1 opened 7 months ago
GDB backtrace of ao
thread:
(gdb) thread 28
[Switching to thread 28 (Thread 0x7fffba0006c0 (LWP 208523))]
#0 0x00007ffff3298d61 in __futex_abstimed_wait_common64 (private=4, cancel=true, abstime=0x7fffb9fff090, op=137, expected=0,
futex_word=0x555555ad9d34) at ./nptl/futex-internal.c:57
57 in ./nptl/futex-internal.c
(gdb) bt full
#0 0x00007ffff3298d61 in __futex_abstimed_wait_common64
(private=4, cancel=true, abstime=0x7fffb9fff090, op=137, expected=0, futex_word=0x555555ad9d34) at ./nptl/futex-internal.c:57
sc_cancel_oldtype = 0
sc_ret = <optimized out>
resultvar = <optimized out>
__arg6 = <optimized out>
__arg5 = <optimized out>
__arg4 = <optimized out>
__arg3 = <optimized out>
__arg2 = <optimized out>
__arg1 = <optimized out>
_a6 = <optimized out>
_a5 = <optimized out>
_a4 = <optimized out>
_a3 = <optimized out>
_a2 = <optimized out>
_a1 = <optimized out>
#1 __futex_abstimed_wait_common (cancel=true, private=4, abstime=0x7fffb9fff090, clockid=0, expected=0, futex_word=0x555555ad9d34)
at ./nptl/futex-internal.c:87
err = <optimized out>
clockbit = 256
op = 137
err = <optimized out>
clockbit = <optimized out>
op = <optimized out>
#2 __GI___futex_abstimed_wait_cancelable64
(futex_word=futex_word@entry=0x555555ad9d34, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x7fffb9fff090, private=private@entry=0) at ./nptl/futex-internal.c:139
#3 0x00007ffff329bc7e in __pthread_cond_wait_common (abstime=0x7fffb9fff090, clockid=1, mutex=0x555555ad9ce0, cond=0x555555ad9d08)
at ./nptl/pthread_cond_wait.c:503
spin = 0
buffer = {__routine = 0x7ffff329b4a0 <__condvar_cleanup_waiting>, __arg = 0x7fffb9fff010, __canceltype = 1536, __prev = 0x0}
cbuffer = {wseq = 45, cond = 0x555555ad9d08, mutex = 0x555555ad9ce0, private = 0}
err = <optimized out>
g = 1
--Type <RET> for more, q to quit, c to continue without paging--
flags = <optimized out>
g1_start = <optimized out>
maxspin = 0
signals = <optimized out>
result = 0
wseq = 45
seq = 22
private = 0
maxspin = <optimized out>
err = <optimized out>
result = <optimized out>
wseq = <optimized out>
g = <optimized out>
seq = <optimized out>
flags = <optimized out>
private = <optimized out>
signals = <optimized out>
done = <optimized out>
g1_start = <optimized out>
spin = <optimized out>
buffer = {__routine = <optimized out>, __arg = <optimized out>, __canceltype = <optimized out>, __prev = <optimized out>}
cbuffer = {wseq = <optimized out>, cond = <optimized out>, mutex = <optimized out>, private = <optimized out>}
s = <optimized out>
#4 ___pthread_cond_timedwait64 (cond=0x555555ad9d08, mutex=0x555555ad9ce0, abstime=0x7fffb9fff090) at ./nptl/pthread_cond_wait.c:652
flags = <optimized out>
clockid = 1
#5 0x00005555555b3588 in mp_cond_timedwait (cond=0x555555ad9d08, mutex=0x555555ad9ce0, timeout=48000000) at ../osdep/threads-posix.h:207
ts = {tv_sec = 9760, tv_nsec = 838368512}
#6 0x00005555555b3dac in playthread (arg=0x555555960cf0) at ../audio/out/buffer.c:718
retry = false
timeout = 48000000
ao = 0x555555960cf0
p = 0x555555ad9c80
#7 0x00007ffff329ca94 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
ret = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
pd = <optimized out>
out = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736313951936, 4155121100175296595, 140736313951936, -400, 0, 140737488342816, 4155121100196268115, 4154958836905003091}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
#8 0x00007ffff3329c2c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Version information
Reproduction steps
Play the sample file with:
./mpv --no-config --vo=null --untimed --ao=null --ao-null-untimed 'id:000000,src:000798,time:76678,execs:24161,op:havoc,rep:13'
Expected behavior
Don't hang. The program can terminate correctly if
--ao-null-untimed
is removed:Actual behavior
The program hangs:
It goes on forever with the line:
Log file
GDB backtrace:
Sample files
AFL++ found 4000+ "unique" hangs, though I suspect they all have the same underlying cause, but AFL++ couldn't recognize them as the same due to stability issues. I am still in the process of de-duplicating these hangs with some quick scripting.
This is the file used in the demo above:
https://wormhole.app/OkrOJ#v7XS9ycj2Gi4dc9fSTDXFQ