Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More diagnostic info when we get a signal #102

Merged
merged 4 commits into from Oct 22, 2015

Conversation

Projects
None yet
3 participants
@mvidner
Copy link
Member

commented Jul 23, 2015

This is prompted by receiving a mysterious SIGHUP in https://bugzilla.suse.com/show_bug.cgi?id=935686

mvidner added some commits Jul 22, 2015

Run a program before dying on a signal (bsc#935686).
It is /usr/lib/YaST2/bin/signal-postmortem
(but not included here)
@jreidinger

This comment has been minimized.

Copy link
Member

commented Jul 24, 2015

Where is signal postmortem program? otherwise it looks good

sigaction_or_error(SIGFPE);
sigaction_or_error(SIGSEGV);
sigaction_or_error(SIGTERM);

This comment has been minimized.

Copy link
@aschnell

aschnell Sep 11, 2015

Member

Make it DRY and avoid the define:

for (int signum : { SIGHUP, SIGINT, SIGQUIT, ... })
{
    if (sigaction(signum, &sa, NULL) == -1)
        fprintf(stderr, "sigaction failed for signum %d\n", signum);
}
@mvidner

This comment has been minimized.

Copy link
Member Author

commented Oct 6, 2015

@jreidinger the postmortem program is not included, I consider it a hook to be supplied by whoever debugs a particular problem. If we come up with a hook that is useful in general, we can include it.

@mvidner

This comment has been minimized.

Copy link
Member Author

commented Oct 15, 2015

@jreidinger so, do you think we should merge this in this state? Or what improvement should be made?

@jreidinger

This comment has been minimized.

Copy link
Member

commented Oct 15, 2015

Well, to be honest it is better then before, but still it do not help with useless or confusing logs from bug reports from customers where it points to wrong location as source of exception.

@jreidinger

This comment has been minimized.

Copy link
Member

commented Oct 15, 2015

so feel free to merge

@mvidner

This comment has been minimized.

Copy link
Member Author

commented Oct 22, 2015

where it points to wrong location as source of exception.

Do you mean the problem with showing the back-trace of a different thread than the one which caused a crash? It is a different problem, concerning internally generated signals. This PR tries to address externally generated signals.

@jreidinger

This comment has been minimized.

Copy link
Member

commented Oct 22, 2015

ok, LGTM

mvidner added a commit that referenced this pull request Oct 22, 2015

Merge pull request #102 from yast/siginfo-caller-pid
More diagnostic info when we get a signal

@mvidner mvidner merged commit 9a5a152 into master Oct 22, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@mvidner mvidner deleted the siginfo-caller-pid branch Oct 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.