sequence number and timestamps out of order in kernel log

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

sequence number and timestamps out of order in kernel log

跳至解决方案
2,232 次查看
sodacan
Contributor II

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!

标记 (2)
0 项奖励
回复
1 解答
2,062 次查看
sodacan
Contributor II

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.

在原帖中查看解决方案

5 回复数
2,063 次查看
sodacan
Contributor II

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.

2,140 次查看
sodacan
Contributor II

The Linux Forum? This is a question about MQX, not Linux.

0 项奖励
回复
2,136 次查看
danielchen
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
2,204 次查看
sodacan
Contributor II

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));

0 项奖励
回复
2,178 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Sodacan

 

I would suggest you post this question on Linux Forum, Linux experts are there.

Forums - The Linux Forum

 

Regards

Daniel

0 项奖励
回复