<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head></head><body><div style="font-size: 12pt; font-family: Calibri,sans-serif;"><div>Once more, set the EOF flag in the block callback.</div><div><br></div><div>-- </div><div>Rémi Denis-Courmont</div><div>Sent from my NVIDIA Tegra-powered device</div><br><div id="htc_header">----- Reply message -----<br>De : "Romain Vimont" <rom@rom1v.com><br>Pour : "Mailing list for VLC media player developers" <vlc-devel@videolan.org><br>Objet : [vlc-devel] [PATCH] Avoid deadlock on UDP stop<br>Date : mer., mai 21, 2014 17:58</div></div><br><pre style="word-wrap: break-word; white-space: pre-wrap;">The problem is not to set b_eof. The line:
p_access->info.b_eof = true;
is secondary. Indeed, while it is necessary to avoid BlockUDP() to be
called again and again indefinitely once block_FifoGet() does not
deadlock anymore (with the remaining of the patch), it does nothing to
prevent the deadlock itself.
The main point is the call to "return NULL" when we know that
ThreadRead() is complete (i.e. it will not feed the fifo queue anymore,
i.e. b_finishing is set), preventing to call block_FifoGet().
Anyway, when would you write b_eof? On what condition, apart from
b_finishing?
--
®om
Le mercredi 21 mai 2014 à 17:33 +0800, Rémi Denis-Courmont a écrit :
> Le 2014-05-21 16:53, Romain Vimont a écrit :
> >This is not a problem because I don't use b_eof for that. If I would
> >write it from TR, then it would be a problem…
> >
> >According to you, apart from using a (synchronized) flag like
> >b_finishing, how should we make TR wake up BU (blocked in
> >block_FifoGet() in BlockUDP()) from the end of ThreadRead(), in order to
> >prevent the deadlock in all cases?
>
> Write b_eof from BlockUDP() as normal, IIRC it was mentioned already.
>
> Or better yet fix the real problem, the multiple unsynchronized alive flags
> of the input objects.
>
> --
> Rémi Denis-Courmont
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a>
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
<a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a>
</pre></body></html>