master: opal/stacktrace improvements #2772
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The first commit fixes a bug that I saw with this test program:
If I run the program with Open MPI, it catches the first
SIGFPE
and prints a stack through the opal/stacktrace mechanism, but let's the program continue executing 😞 . When it hits the secondSIGFPE
then the system's default signal handler is invoked and kills the program.I would expect Open MPI to print the stack and kill the program on the first instance of this signal. And if I run Open MPI with
-mca opal_signal 6,7,11
(skipping8 = SIGFPE
) then it does exactly that (exits the program at the first encounter).So the first commit makes sure that we re-raise the signal after processing the stacktrace.
The second commit adds some more flexibility to the stacktrace mechanism in particular where the stacktrace output is directed. Default is still
stderr
, but now we have options fornone
,stdout
, and a set of per-process files.See the commit messages for some more detail.