[vlc-devel] vlc bug/patch (Linux libvlccore): might hang in vlc_getProxyUrl() / waitpid()

Rémi Denis-Courmont remi at remlab.net
Wed Dec 14 21:33:49 CET 2016

Le tiistaina 13. joulukuuta 2016, 10.53.53 EET Andreas Luik a écrit :
> Hello,
> bug report for vlc-2.1.6 (also in latest 2.2.4): we use libvlccore in one
> thread of our multi-threaded application, and observe the function
> vlc_getProxyUrl() to (often) hang forever in this loop:
> while (waitpid(pid, &(int){ 0 }, 0) == -1);
> The reason for this is that another thread might have already handled the
> wait(), and the process "pid" does not exist anymore, resulting in
> waitpid(pid) returning -1 (with errno==ECHILD) forever.

This has already been discussed several years ago and the conclusion was that 
this cannot be fixed in safe race-free manner in LibVLC. You need to fix 
whatever brain-damaged code path is stealing PIDs from LibVLC.

Rémi Denis-Courmont

More information about the vlc-devel mailing list