简体   繁体   English

如何区分内核中的软锁定和用户空间中的softlockup?

[英]How to tell the difference between soft lockup in kernel and softlockup in userspace?

I have the below lockup. 我有以下锁定。 Is this indicating that slic_test pid 5207 is the offender, or is it only showing that because the current macro in the kernel is still pointing to the userspace process which made the system call into my driver? 这是否表明slic_test pid 5207是罪犯,或者它只显示,因为内核中的当前宏仍然指向使系统调用到我的驱动程序的用户空间进程? Furthermore - irq event stamp 0 ... what exactly does the irq event stamp represent? 此外 - irq事件标记0 ... irq事件标记到底代表什么? It can't be number of interrupts since boot... there were definitely more than 0 after 88798 seconds... 自开机以来它不能是中断数...在88798秒后肯定超过0 ...

The system is uniprocessor with CONFIG_SMP disabled. 系统是单处理器,禁用CONFIG_SMP。

[88798.449628] BUG: soft lockup - CPU#0 stuck for 61s! [slic_test:5207]
[88798.449628] Modules linked in: slic_xxxx leds_xxxx vortex86_spi dm_mirror dm_log dm_multipath dm_mod ohci_hcd ehci_hcd r6040 vortex86_wdt vortex86_gpio [last un]
[88798.449628] irq event stamp: 0
[88798.449628] hardirqs last  enabled at (0): [<00000000>] 0x0
[88798.449628] hardirqs last disabled at (0): [<c0115563>] copy_process+0x233/0x1090
[88798.449628] softirqs last  enabled at (0): [<c0115563>] copy_process+0x233/0x1090
[88798.449628] softirqs last disabled at (0): [<00000000>] 0x0
[88798.449628]
[88798.449628] Pid: 5207, comm: slic_test Not tainted (2.6.27.62 #11)
[88798.449628] EIP: 0060:[<c011b6b5>] EFLAGS: 00000246 CPU: 0
[88798.449628] EIP is at __do_softirq+0x45/0xb0
[88798.449628] EAX: 00000000 EBX: 00000082 ECX: 00000001 EDX: dfac5080
[88798.449628] ESI: c0696120 EDI: 0000000a EBP: df3bdf8c ESP: df3bdf80
[88798.449628]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[88798.449628] CR0: 8005003b CR2: b7622780 CR3: 1f3c8000 CR4: 00000000
[88798.449628] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[88798.449628] DR6: ffff0ff0 DR7: 00000400
[88798.449628]  [<c011b766>] do_softirq+0x46/0x50
[88798.449628]  [<c011bad5>] irq_exit+0x45/0x50
[88798.449628]  [<c01057ba>] do_IRQ+0x4a/0x90
[88798.449628]  [<c0103e68>] common_interrupt+0x28/0x30
[88798.449628]  =======================

The presence/absence of the call trace indicates the origin of the soft-lockup. 呼叫追踪的存在/不存在表示软锁定的起源。

[88798.449628]  [<c011b766>] do_softirq+0x46/0x50
[88798.449628]  [<c011bad5>] irq_exit+0x45/0x50
[88798.449628]  [<c01057ba>] do_IRQ+0x4a/0x90
[88798.449628]  [<c0103e68>] common_interrupt+0x28/0x30
  • the Linux kernel caused the above soft-lockup as described by the above call-trace . Linux内核导致上述软锁定,如上面的call-trace所述

  • If an user-space process had caused the soft-lockup, a line identifying the process by its pid would logged, followed by the contents of various CPU-registers without a call-trace of any sorts. 如果用户空间进程导致软锁定,则会记录通过其pid标识进程的行,然后记录各种CPU寄存器的内容,而不记录任何类型的调用跟踪。

[88798.449628] Pid: 5207, comm: slic_test Not tainted (2.6.27.62 #11) [88798.449628] Pid:5207,comm:slic_test 没有污染 (2.6.27.62#11)

Not tainted means issue happened at kernel. 没有污点意味着内核发生了问题。

"Tainted" flags are the kernel's way of saying it's not a kernel fault (the kernel source is open and "pure". "Taint" comes from the non-GPL modules, and others. “污点”标志是内核的方式,它说它不是内核错误(内核源是开放的和“纯粹的”。“污点”来自非GPL模块,以及其他。

http://www.opensourceforu.com/2011/01/understanding-a-kernel-oops/ http://www.opensourceforu.com/2011/01/understanding-a-kernel-oops/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM