Comment 22 for bug 1059276

Revision history for this message
In , Psychon-d (psychon-d) wrote :

Sorry for not using your patch, but there must always be a thread reading from the socket when there is one that writes.

commit 23911a707b8845bff52cd7853fc5d59fb0823cef
Author: Uli Schlachter <email address hidden>
Date: Mon Sep 24 22:07:51 2012 +0200

    Fix a multi-thread deadlock

    This fixes a deadlock which was seen in-the-wild with wine.

    It could happen that two threads tried to read from the socket at the same time
    and one of the thread got stuck inside of poll()/select().

    The fix works by making sure that the writing thread doesn't steal the reading
    thread's reply.

    Debugged-by: Erich Hoover <email address hidden>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54671
    Signed-off-by: Uli Schlachter <email address hidden>