[Lldb-commits] [PATCH] D19214: fix a race is the LLDB test suite results collection

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Sun Apr 17 21:20:56 PDT 2016


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





More information about the lldb-commits mailing list