I created a kernel log in NOINIT RAM so that it could be saved across reboots. The initial goal was to save the kernel log in the state it was in right before a watchdog timeout occurred while interrupts were disabled. The interrupts, tragically, were disabled in library code we purchased. Since it's in NOINIT RAM we could dump it to the console and save it to a file on an SD card on the next boot. This all appears to be working well, however a couple of interesting anomalies in the log data are unsettling. Specifically, some of the log entries have either the sequence number or timestamp out of order. The majority of the log have all the timestamps and sequence numbers in order, but it's tough to feel certain that we can pinpoint the last log entry (to point to the active task that watchdogged) if this info can be out of sequence. Can anyone tell me if it's normal for this info to be out of sequence in the log?
Thanks!
Solved! Go to Solution.
I found a different way to solve our problem by using the MQX task watchdogs and expiry functions, so I'm abandoning the kernel logging facility effort. I heard that the kernel logging code has not changed in a very long time and should be good. Not sure why it wasn't working for me, but it was probably my fault somehow.
I found a different way to solve our problem by using the MQX task watchdogs and expiry functions, so I'm abandoning the kernel logging facility effort. I heard that the kernel logging code has not changed in a very long time and should be good. Not sure why it wasn't working for me, but it was probably my fault somehow.
The Linux Forum? This is a question about MQX, not Linux.
sorry for confusion, because I saw same issues happened on Linux . If you are using MQX, it maybe MQX v5. I would suggest you contact our MQX partner, Embedded Access for fast support. Embedded Access - MQX Design, Products, & Services
or contact with mqxsales@nxp.com.
Regards
Daniel
A related piece of confusion is that when I dump my saved kernel log to the console, in general (as long as none are out of order), the timestamps and sequence numbers do advance from the beginning of the log all the way to the end, even though I created it using the overwrite option. My expectation was that somewhere in the middle of the log the sequence numbers and timestamps would switch to an earlier value/time and advance from there. Not being an ARM ASM expert, I haven't figured out whether or not this is the expected behavior for the overwrite feature. I was expecting circular FIFO type behavior. Was my expectation incorrect?
memset(kloginfo, 0xEE, sizeof(kloginfo));
result = _klog_create_at(sizeof(kloginfo), LOG_OVERWRITE, static_cast<void*>(kloginfo));
Hi Sodacan
I would suggest you post this question on Linux Forum, Linux experts are there.
Regards
Daniel