[Crash-utility] [PATCH] Fix for the "log -a" option

chenqiwu qiwuchen55 at gmail.com
Thu Feb 13 14:26:50 UTC 2020


On Thu, Feb 13, 2020 at 08:16:37AM -0500, Dave Anderson wrote:
> 
> What does this patch have to do with "log -a"?
> 
Sorry, I just use "log" command to dump the kernel message buffer.
The option fails with the following error message "invalid log_buf
entry encountered". The issue has only happened on one arm64's dump
once up to now.
The dump doesn't print all log filled with log_buf due to the failure. 
The symbol data values related with printk as followed:
crash_test> log_next_idx
log_next_idx = $1 = 1491656
crash_test> log_first_idx
log_first_idx = $2 = 1507956
crash_test> log_buf_len
log_buf_len = $3 = 2097152

We can see the log idx has exceed the value of log_buf_len.
crash_test> log > dmesg.txt

log: invalid log_buf entry encountered. idx=2115950

The original code just break loop simply with a error message. 
We need to take case of the issue.

Thanks!
Qiwu






More information about the Crash-utility mailing list