[vlc-devel] Deadlock on stop
Romain Vimont | ®om
rom at rom1v.com
Tue May 6 12:09:57 CEST 2014
I just really understand your remark "impossible to fix in a portable
fashion": I wondered why you reimplemented a mechanism similar to
pthread_cancel() in src/android/thread.c, and I realized that Android
*does not provide* pthread_cancel(), and that src/posix/thread.c is far
more straightforward ;-)
This is of course the cause of the race condition and the deadlock I was
trying to fix. We cannot easily cancel a thread while blocking on any
function generically.
The issue is probably not *impossible* to fix, but ok, I got the point.
Thank you
Le mercredi 30 avril 2014 à 20:34 +0300, Rémi Denis-Courmont a écrit :
> Le mercredi 30 avril 2014, 17:11:50 Romain Vimont | ®om a écrit :
> > I think we need more than an atomic flag (currently "alive" in "struct
> > vlc_object_internals"): we need to be able to interrupt AReadBlock() on
> > stop (and other blocking functions which are currently called after a
> > test to vlc_object_alive()).
>
> I am afraid this is not news. Unfortunately, this is much easier said than
> done, and presumably impossible to fix in a portable fashion.
>
> > What do you think?
>
> This bug is deeply entangled into the architecture of the input thread.
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>
More information about the vlc-devel
mailing list