48cca8ab83
This patch fix a race condition, which caused the main thread to sometimes write to a closed pipe. The following are details: Currently, during shut down, the main thread will do the following: 1. set listen_thread_action to false. 2. write to stop_thread pipe to tell the listener thread to exit. The listener thread do the following: 1. call select() to listen to a set of file descriptors with a maximum wait time. 2. check listen_thread_action. If it is false, close the stop_thread pipe. The main thread will write to closed pipe, when 1. listener's call to select() finished because maximum wait time reached. 2. main thread set listen_thread_action to false 3. listener thread check listen_thread_action and closed the pipe 4. main thread write to the closed pipe. This patch address the issue by having the main thread close the pipe after the listener thread has been joined. This way, main thread will both write and close the thread, so there is no conflict. Note This patch was opened directly against v4.1.x branch because the orte/mca/oob/tcp directory has been removed from master branch. Signed-off-by: Wei Zhang <wzam@amazon.com> |
||
---|---|---|
.. | ||
bindings | ||
etc | ||
include | ||
mca | ||
orted | ||
runtime | ||
test | ||
tools | ||
util | ||
common_sym_whitelist.txt | ||
Doxyfile | ||
Makefile.am |