VLC from amd64 Ubuntu Focal "hangs" on futex on startup. VLC from a previous version (Bionic) doesn't exhibit this problem. Running under strace(1) shows the following: mmap(NULL, 16488, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x804f88000 mmap(0x804f89000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1000) = 0x804f89000 mmap(0x804f8a000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x804f8a000 mmap(0x804f8b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x804f8b000 close(4) = 0 mprotect(0x804f8b000, 4096, PROT_READ) = 0 futex(0x80224ede8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x10b75b0, FUTEX_WAIT_BITSET_PRIVATE, 0, {tv_sec=0, tv_nsec=0}, FUTEX_BITSET_MATCH_ANYstrace: detach: tkill(2718,0): Invalid argument strace: Process 2718 detached <detached ...> Note that there are other applications hanging on futex, notably glxinfo(1). The strange thing is, the same glxinfo works when run under strace(1) or FreeBSD's native ktrace(1). Race condition of some kind?
Hmm, maybe related to https://reviews.freebsd.org/D40481 ?
The panic fixed by D40481 happens on futex syscall with FUTEX_REQUEUE flag. Here we don't have it, neither we have a panic. Edward, are there any FUTEX_REQUEUE requests in the entire strace/ktrace history?
I don't think so; just in case I've put the full strace output at https://people.freebsd.org/~trasz/vlc.txt
Also, I've tested the patch at D40481, just in case, and predictably it doesn't change anything wrt VLC or glxinfo hanging on futex.
(In reply to Edward Tomasz Napierala from comment #4) Well, the trace is weird as I don’t see any wake call on 0x10b75b0 futex. strace -f? or ktrace -di to see any childs.
I'm not sure. I've redone the strace (https://people.freebsd.org/~trasz/vlc.txt) and also added ktrace (https://people.freebsd.org/~trasz/vlc-ktrace.txt), just in case.