Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9015 )
Change subject: KUDU-2208 Add RETRY_ON_EINTR() to Subprocess ...................................................................... KUDU-2208 Add RETRY_ON_EINTR() to Subprocess This patch submits a unit test that create a Subprocess thread and while it is starting and waiting, another thread sends kill signals to the Subprocess thread. Since the pthread_kill() signal is sent asynchronously, sometimes the pthread_kill() raises error signal 3. In that condition, the unit test logs the incident as an INFO. Prior to this bug fix patch, the Subprocess throws an exception because it cannot handle the kill signal in Wait() state. To fix the bug, we add RETRY_ON_EINTR() inside Subprocess::DoWait() function. Furthermore, this patch also moves the RETRY_ON_EINTR() function that occurs in many places across the code to os-util.h and it adds alarm reset in the end of TestReadFromStdoutAndStderr in Subprocess-test. Change-Id: I148b4619a8dda8e3e95dd6ea5c6e993a9e37a333 Reviewed-on: http://gerrit.cloudera.org:8080/9015 Tested-by: Kudu Jenkins Reviewed-by: Todd Lipcon <t...@apache.org> --- M src/kudu/consensus/log_index.cc M src/kudu/util/env_posix.cc M src/kudu/util/net/socket.cc M src/kudu/util/os-util.h M src/kudu/util/subprocess-test.cc M src/kudu/util/subprocess.cc 6 files changed, 77 insertions(+), 22 deletions(-) Approvals: Kudu Jenkins: Verified Todd Lipcon: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/9015 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I148b4619a8dda8e3e95dd6ea5c6e993a9e37a333 Gerrit-Change-Number: 9015 Gerrit-PatchSet: 13 Gerrit-Owner: Jeffrey F. Lukman <jeffreyfluk...@gmail.com> Gerrit-Reviewer: Jeffrey F. Lukman <jeffreyfluk...@gmail.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <t...@apache.org>