mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Peach" <jpe...@apache.org>
Subject Review Request 39348: Fix signal blocking race condition on OS X.
Date Thu, 15 Oct 2015 18:03:18 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39348/
-----------------------------------------------------------

Review request for mesos and Ben Mahler.


Bugs: MESOS-2079
    https://issues.apache.org/jira/browse/MESOS-2079


Repository: mesos


Description
-------

OS X will raise SIGPIPE against the process rathr than the triggerring
thread, causing the SUPPRESS macro to sometimes fail to squash the
signal. The right way to avoid this on OS X to block SIGPIPE in the
process (which we are loth to do in libprocess), or to request that
SIGPIPE not be raised on a particular file descriptor.

  - Add os::nonSigpipe() helper to check whether SIPIPE is suppressed
    on a file descriptor.
  - Add os::nosigpipe() to enable or disable SIGPIPE suppression.
  - Use os::nosigpipe() to suppress SIGPIPE when we create sockets.
  - Check and restore the SIGPIPE status in process::io::internal::write(),
    which makes repeated iterations of the IOTest.Write test reliable.


Diffs
-----

  3rdparty/libprocess/include/process/network.hpp 61bfa8243728dc19ab0e6fb43d33ca83fb3709c3

  3rdparty/libprocess/src/io.cpp 26686e1a96484e3f09d41a7292f38b7579ce9c48 

Diff: https://reviews.apache.org/r/39348/diff/


Testing
-------

OS X and CentOS 6
make && make check


Thanks,

James Peach


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message