You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Vinod Kone <vi...@gmail.com> on 2013/09/16 22:02:25 UTC

Review Request 14153: Preserved exit status when SIGTERM is received.

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

Review request for mesos, Benjamin Hindman and Ben Mahler.


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


Repository: mesos-git


Description
-------

See summary.


Diffs
-----

  src/logging/logging.cpp 0282b1f03e23f606d087d0d100999d413b066241 

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


Testing
-------

make check


Thanks,

Vinod Kone


Re: Review Request 14153: Preserved exit status when SIGTERM is received.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14153/#review26387
-----------------------------------------------------------

Ship it!


I don't see it in your testing comments but have you verified this still works as expected when manually sending kill signals to a running process?

E.g.
$ kill -s SIGTERM -> SIGTERM message, no stacktrace
$ kill -s SIGPIPE -> SIGPIPE escalation message, stacktrace
$ kill -s SIGFPE  -> stacktrace

- Ben Mahler


On Sept. 24, 2013, 6:41 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14153/
> -----------------------------------------------------------
> 
> (Updated Sept. 24, 2013, 6:41 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Bugs: MESOS-694
>     https://issues.apache.org/jira/browse/MESOS-694
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/logging/logging.cpp 0282b1f03e23f606d087d0d100999d413b066241 
> 
> Diff: https://reviews.apache.org/r/14153/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>


Re: Review Request 14153: Preserved exit status when SIGTERM is received.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14153/
-----------------------------------------------------------

(Updated Sept. 24, 2013, 6:41 p.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

Rebased and benm's comments.


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


Repository: mesos-git


Description
-------

See summary.


Diffs (updated)
-----

  src/logging/logging.cpp 0282b1f03e23f606d087d0d100999d413b066241 

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


Testing
-------

make check


Thanks,

Vinod Kone


Re: Review Request 14153: Preserved exit status when SIGTERM is received.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14153/#review26279
-----------------------------------------------------------


How about doing the same thing glog does to handle this? They invoke the default signal handler after having processed the signal, grep for InvokeDefaultSignalHandler in the glog source. I suggest this mostly because I'm not sure if we can assume that the highest bit of the exit status signifies that we exited due to a signal (128 + signal).


src/logging/logging.cpp
<https://reviews.apache.org/r/14153/#comment51357>

    



src/logging/logging.cpp
<https://reviews.apache.org/r/14153/#comment51354>

    Ah, maybe this wasn't safe, see the reference to the C standard here about calling raise from within a handler:
    
    https://www.securecoding.cert.org/confluence/display/seccode/SIG33-C.+Do+not+recursively+invoke+the+raise()+function
    
    I should have just called abort here, but we should manually test that it behaves the same when when SIGPIPE is raised.


- Ben Mahler


On Sept. 16, 2013, 8:02 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14153/
> -----------------------------------------------------------
> 
> (Updated Sept. 16, 2013, 8:02 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Bugs: MESOS-694
>     https://issues.apache.org/jira/browse/MESOS-694
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/logging/logging.cpp 0282b1f03e23f606d087d0d100999d413b066241 
> 
> Diff: https://reviews.apache.org/r/14153/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>