Skip to contentSkip to conversation

Clean up syslog output of crashing userspace apps.

PATCH Randolph Chung 3 participants 3 messages Jul 15, 2007 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

In reference to a message from Helge Deller, dated Jul 15:

Quoted 5 lines

Clean up syslog output of crashing userspace apps.
With this patch the syslog will print:
portmap(1480): invalid access to 0x8232b578 at ip=0x41192af3 (segfault code 15)
which is consistent with outher output like:
hald-probe-stor(1672): unaligned access to 0xfafcbd26 at ip=0x00014013

The verbose dump we have now is actually quite useful for debugging. Whereas unaligned accesses are usually very straightforward to debug once you know where they are coming from (thus only need ip), segfaults are not always that way. The full register dump comes in handy...

Can we make this controllable by prctl, so that we can have both verbose and terse output options, with the verbose one being the default? My rationale is that you don't usually know if an app is going to crash, so it's better to have the debug info you need if it does crash, and you can turn it off if your app runs in a way that the verbose output is somehow adversely affecting it (slowing it down too much, etc).

Also, you might want to remove "segfault" from the output string, since the crash can be from SIGSEGV, SIGILL, SIGBUS, etc...

thanks,
randolph

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Re: [parisc-linux] [PATCH] [PARISC] Clean up syslog output of

Quoted 2 lines

Also, you might want to remove "segfault" from the output string, since the crash can be from SIGSEGV, SIGILL, SIGBUS, etc...

Why not print the actual name of the interruption from the arch instead of "code 15", etc?

Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
#4 lore raw
In reply to a message not in the archive

Hi Randolph,

Quoted 11 lines · Randolph Chung

In reference to a message from Helge Deller, dated Jul 15:

Quoted 5 lines

Clean up syslog output of crashing userspace apps.
With this patch the syslog will print:
portmap(1480): invalid access to 0x8232b578 at ip=0x41192af3 (segfault code 15)
which is consistent with outher output like:
hald-probe-stor(1672): unaligned access to 0xfafcbd26 at ip=0x00014013

The verbose dump we have now is actually quite useful for debugging. Whereas unaligned accesses are usually very straightforward to debug once you know where they are coming from (thus only need ip), segfaults are not always that way. The full register dump comes in handy...

I do not disagree, that dumps are useful in general. Nevertheless, is this specific dump really that useful ? Can you really fix bugs with the dump without use of gdb ? On i386 userspace crashes aren't even shown in the syslog.

Quoted 6 lines

Can we make this controllable by prctl, so that we can have both verbose and terse output options, with the verbose one being the default? My rationale is that you don't usually know if an app is going to crash, so it's better to have the debug info you need if it does crash, and you can turn it off if your app runs in a way that the verbose output is somehow adversely affecting it (slowing it down too much, etc).

Good idea.
But again, on i386 there isn't shown anything.
Do we really want the overhead to add a new prctl option ?

Quoted 2 lines

Also, you might want to remove "segfault" from the output string, since the crash can be from SIGSEGV, SIGILL, SIGBUS, etc...

Ok.

Helge

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux