ust-consumerd: fix exit race crashes
authorJason Wessel <jason.wessel@windriver.com>
Wed, 27 Apr 2011 20:22:14 +0000 (22:22 +0200)
committerNils Carlson <nils.carlson@ericsson.com>
Thu, 28 Apr 2011 13:14:47 +0000 (15:14 +0200)
commit5343b2860738c675311ce5949bdf9e31afc76fa4
treebf638c7b0e0fe09bea7489bea3faa566b8df28b2
parentfe566790e6be3f27f0befd85b715a3e84977bf6c
ust-consumerd: fix exit race crashes

The ust-consumerd gets shutdown by the SIGTERM signal and a number of
places in the ust-consumerd did not properly deal with the case where
a system call returns EINTR in errno as a result of a signal to the
process.  The failure to handle EINTR properly was leading to some
data corruption in the buffer code and causing some random "victim"
crashes in lowlevel.c

The way all the offending functions were tracked down was to
temporarily add an abort() in the SIGTERM signal handler.  Then it was
a matter of looking at what threads were blocked on system calls at
the time outside of the thread that received the signal.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Nils Carlson <nils.carlson@ericsson.com>
libustconsumer/libustconsumer.c
ust-consumerd/ust-consumerd.c
This page took 0.023589 seconds and 4 git commands to generate.