tfiala added a comment.

The fix simply has the listener socket always send a byte, and the initiators 
of the socket always wait for that byte before continuing.  This ensures that 
both cases where the sender is creating a socket and sending test events will 
never exit the dosep.py main loop before the listener socket is added to the 
asyncore map.  This fixes the race.

The two initiators of sockets are:

1. the dotest.py inferior process that is running a test case.  This is the 
channel that normal test events (e.g. test start, test result, etc.) come over.

2. the dosep.py worker queues (either true threads via the threading module, or 
faux threads that are really processes, via the multiprocessing library).  They 
will spin up a socket if they need to report that a test inferior has generated 
an exceptional exit (i.e. seg fault or some other signal-generating exit) or if 
a timeout forced the process to be killed.

It is the second case above, during a rerun pass, that was most likely to race.


http://reviews.llvm.org/D19214



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to