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

Andreas Luik andreas.luik at innovative-navigation.de
Tue Dec 13 10:53:53 CET 2016


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. 

It definitely does not make sense to repeat calling waitpid for a pid which does not exist anymore. Proposed patch is attached. 

BTW: the second parameter of waitpid() might be simplified to (int *)NULL. 

Kind regards, 
-- 
i. A. Andreas Luik 
Senior System Integrator 
in-innovative navigation GmbH 
phone: +49 7154 807171 
fax: +49 7154 807154 
email: Andreas.Luik at innovative-navigation.de 

in-innovative navigation GmbH, Leibnizstrasse 11, D-70806 Kornwestheim 
Geschäftsführer/Managing Directors: 
Dr. Thomas Gern, Dr. Martin Sandler, Dr. Reinhard Zimmermann, Uwe Vögele 
Handelsregister: Stuttgart HRB 205770 

in-innovative navigation GmbH is ISO 9001:2008 certified. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20161213/e095f9e3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netconf.c.patch
Type: text/x-patch
Size: 616 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20161213/e095f9e3/attachment.bin>


More information about the vlc-devel mailing list