[Openais] Discussion about segv handler
Steven Dake
sdake at redhat.com
Mon Nov 27 10:37:21 PST 2006
Hans,
This patch looks good for comitting although I'd like feedback on the
other platforms.
Regards
-steve
On Wed, 2006-11-22 at 10:09 +0100, Hans Feldt wrote:
> After a discussion with Steven, here is a trunk patch that works on both
> "normal" Linux and UML. Other UNIXes are untested but the patch uses
> standard UNIX signal APIs...
>
> In addition to the segv handler is an abort handler working in exact the
> same way. Abort is used when the program asserts.
>
> I have tested (with core dump enabled on Linux and UML):
> - early exit (before log_setup) with segv and abort errors
> - normal exit (after log_setup) with segv and abort errors
>
> In all cases the log is flushed and a core dump is generated.
>
> If someone would like to test other UNIXes, paste the following code
> into main.c before and after log_setup() in main.c.
>
> {
> int i;
> for (i = 0; i < 100; i++)
> log_printf (LOG_LEVEL_INFO, "log msg %d\n", i);
> char *c = NULL; *c = 0;
> }
>
> Hans
>
> Hans Feldt (AS/EAB) wrote:
> > To start with, there is a bug in the segv handler that has bitten me
> > pretty bad. As far as I understand there should be a call to exit
> > instead of returning to the UNIX system. On my UML kernel the system
> > loops calling the segv handler.
> >
> > I did not attach a patch since I wanted to discuss the segv handler. If
> > I get to choose, I prefer a core dump instead of a flushed log when a
> > segv occurs.
> >
> > If we could get both the flushed log and core dump it would be nice.
> >
> > An abort signal handler working the same way would also be useful.
> >
> > At the moment I always run with a patched print.c since the buffered
> > logging is no good for AMF that normally exits on an abort (assert). We
> > need a better solution.
> >
> > What do you think?
> >
> > Hans
> >
> > _______________________________________________
> > Openais mailing list
> > Openais at lists.osdl.org
> > https://lists.osdl.org/mailman/listinfo/openais
> >
>
> _______________________________________________
> Openais mailing list
> Openais at lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/openais
More information about the Openais
mailing list