Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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? Furthermore - irq event stamp 0 ... what exactly does the irq event stamp represent? It can't be number of interrupts since boot... there were definitely more than 0 after 88798 seconds...

The system is uniprocessor with CONFIG_SMP disabled.

[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]  =======================
like image 421
bodangly Avatar asked Nov 24 '22 16:11

bodangly


1 Answers

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.

  • 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.

like image 123
TheCodeArtist Avatar answered May 20 '23 15:05

TheCodeArtist