Re: [PATCH 0/7] powerpc: Modernize unhandled signals message
From: Michael Ellerman
Date: Wed Jul 25 2018 - 22:21:05 EST
Murilo Opsfelder Araujo <muriloo@xxxxxxxxxxxxx> writes:
> On Wed, Jul 25, 2018 at 05:00:21PM +1000, Michael Neuling wrote:
>> On Tue, 2018-07-24 at 16:27 -0300, Murilo Opsfelder Araujo wrote:
>> > This series was inspired by the need to modernize and display more
>> > informative messages about unhandled signals.
>> Nice.. the instruction dump would have been very handy when debugging the PCR
>> init issue I had a month or so back.
These things may be related :)
>> What happens if we get a sudden flood of these from different processes that
>> overlap their output? Are we going to be able to match up the process with
>> instruction dump?
> As to the flood of messages, ___ratelimit() makes me think that we'll
> likely see some warn messages informing how many show_signal_msg()
> callbacks were suppressed, instead of interleaved messages and
> instruction dumps.
> As to matching process with instruction dump, I believe we'd need more
> information to glue them together.
> What if we modify show_instructions() to accept a string prefix to be
> printed along with each line?
>> Should we prefix every line with the PID to avoid this?
> That's possible. An alternative would be prefixing each line with the
> process name and its PID, as in the first line. For example:
> pandafault: segfault (11) at 00000000100007d0 nip 000000001000061c lr 00007fffabc85100 code 2 in pandafault[10000000+10000]
> pandafault: Instruction dump:
> pandafault: 4bfffeec 4bfffee8 3c401002 38427f00 fbe1fff8 f821ffc1 7c3f0b78 3d22fffe
> pandafault: 392988d0 f93f0020 e93f0020 39400048 <99490000> 39200000 7d234b78 383f0040
> The above can be interleaved with other messages and we'll still be able
> to match process and its corresponding instruction dump.
Yeah prefixing with the comm and pid is nice.
Also the "Instruction dump:" line is a waste of space.
I prefer the x86 format, where it's prefixed with "code:", eg:
pandafault: segfault (11) at 00000000100007d0 nip 000000001000061c lr 00007fffabc85100 code 2 in pandafault[10000000+10000]
pandafault: code: 4bfffeec 4bfffee8 3c401002 38427f00 fbe1fff8 f821ffc1 7c3f0b78 3d22fffe
pandafault: code: 392988d0 f93f0020 e93f0020 39400048 <99490000> 39200000 7d234b78 383f0040