[ 
https://issues.apache.org/jira/browse/MESOS-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14112515#comment-14112515
 ] 

Vinod Kone commented on MESOS-1705:
-----------------------------------

Did some digging along with [~jieyu].

AFAICT, the standard says that a pending signal during a fork() should be 
inherited and delivered to the execve() process 
(http://pubs.opengroup.org/onlinepubs/009695399/functions/exec.html).

But some distros/glibc do not follow the standard and actually clear the 
pending signals in the new execve() process :/ 
(http://unixhelp.ed.ac.uk/CGI/man-cgi?execve+2 , 
http://manpages.ubuntu.com/manpages/hardy/man2/execve.2.html).

We setup a handler to catch and re-raise SIGTERM (to print a helpful log 
message and suppress glog stack trace) in all our tests and this triggered the 
above issue in SubprocessTest.Status because this test issues a SIGTERM to 
subprocess which might be in the process of fork()/execve() when the signal is 
delivered. 

Fix: I'm going to partially roll back the signal handler setup changes in 
tests, so that we only handle signals we are interested in (e.g., SIGSEGV). 


> SubprocessTest.Status sometimes flakes out
> ------------------------------------------
>
>                 Key: MESOS-1705
>                 URL: https://issues.apache.org/jira/browse/MESOS-1705
>             Project: Mesos
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Timothy St. Clair
>            Assignee: Vinod Kone
>            Priority: Minor
>              Labels: build
>             Fix For: 0.20.0
>
>
> It's a pretty rare event, but happened more then once.  
> [ RUN      ] SubprocessTest.Status
> *** Aborted at 1408023909 (unix time) try "date -d @1408023909" if you are 
> using GNU date ***
> PC: @       0x35700094b1 (unknown)
> *** SIGTERM (@0x3e8000041d8) received by PID 16872 (TID 0x7fa9ea426780) from 
> PID 16856; stack trace: ***
>     @       0x3570435cb0 (unknown)
>     @       0x35700094b1 (unknown)
>     @       0x3570009d9f (unknown)
>     @       0x357000e726 (unknown)
>     @       0x3570015185 (unknown)
>     @           0x5ead42 process::childMain()
>     @           0x5ece8d std::_Function_handler<>::_M_invoke()
>     @           0x5eac9c process::defaultClone()
>     @           0x5ebbd4 process::subprocess()
>     @           0x55a229 process::subprocess()
>     @           0x55a846 process::subprocess()
>     @           0x54224c SubprocessTest_Status_Test::TestBody()
>     @     0x7fa9ea460323 (unknown)
>     @     0x7fa9ea455b67 (unknown)
>     @     0x7fa9ea455c0e (unknown)
>     @     0x7fa9ea455d15 (unknown)
>     @     0x7fa9ea4593a8 (unknown)
>     @     0x7fa9ea459647 (unknown)
>     @           0x422466 main
>     @       0x3570421d65 (unknown)
>     @           0x4260bd (unknown)
> [       OK ] SubprocessTest.Status (153 ms)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to