[Crash-utility] log -m reports wrong log level value

Bouchard Louis louis.bouchard at canonical.com
Wed Jan 30 15:49:00 UTC 2013


Hi Dave,

While finishing my work on the makedumpfile --dump-dmesg fix for kernels
higher than 3.5, I may have found a minor bug in your 'log -m' command.
I was trying to compare my output from makedumpfile --dump-dmesg with
your log -m output. Or else I misunderstood your 'dump_log_entry'
command and how the message log level should look.

When running in -d1 on an F18 kernel, I get the following :

> crash> log -m | tail
> log 45368dc -> msg: 45368ec ts_nsec: 83443019994 level: 21026 text_len: 54 dict_len: 0
> [   83.443019] <21026>RIP  [<ffffffff81393986>] sysrq_handle_crash+0x16/0x20
> 
> log 4536924 -> msg: 4536934 ts_nsec: 83443019994 level: 8322 text_len: 23 dict_len: 0
> [   83.443019] <8322> RSP <ffff8800363dde38>
> 
> log 453694c -> msg: 453695c ts_nsec: 83443019994 level: 17286 text_len: 21 dict_len: 0
> [   83.443019] <17286>CR2: 0000000000000000

The message log level in brackets that is displayed seems dubious to me.
Since I didn't have access to the log.level offset in the vmcoreinfo, I
had to hack and hard code the structure offset in makedumpfile. While
doing that, I used a 3 bit mask to get the level:3 element but it looks
like what you report is the full log.level value.

So I ported back what I had done in makedumpfile in your dump_log_entry
(patch attached) and tested on crash 6.1.2. I got :

> crash> log -m | tail
> log 458df8c -> msg: 458df9c ts_nsec: 83443019994 flags/level: 22 text_len: 54 dict_len: 0
> [   83.443019] <2>RIP  [<ffffffff81393986>] sysrq_handle_crash+0x16/0x20
> 
> log 458dfd4 -> msg: 458dfe4 ts_nsec: 83443019994 flags/level: 82 text_len: 23 dict_len: 0
> [   83.443019] <2> RSP <ffff8800363dde38>
> 
> log 458dffc -> msg: 458e00c ts_nsec: 83443019994 flags/level: 86 text_len: 21 dict_len: 0
> [   83.443019] <6>CR2: 0000000000000000

Does the message log level looks correct to you with that modification ?

Kind regards,

...Louis


-- 
Louis Bouchard
Backline Support Analyst
Canonical Ltd
Ubuntu support: http://landscape.canonical.com


More information about the Crash-utility mailing list