Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reasons for Soft Lock up?

When we enable CONFIG_DETECT_SOFTLOCKUP to detect soft lockups, it creates a new task called khungtaskd which will run every 1s. If khungtaskd fails to get scheduled for 'n' seconds, then Kernel will declare a soft lockup.

My question is what are the reasons that prevent khungtaskd from running? One that I found is- trying to acquire an already acquired spinlock in interrupt context. What are the other reasons which will lead to soft lockup?

like image 943
Pavan Manjunath Avatar asked Nov 04 '22 15:11

Pavan Manjunath


2 Answers

Too many interrupt (and computer too slow)? Check /proc/interrupts and see.

Some realtime tasks running?

Interrupts almost always have higher priority than other tasks.

like image 51
J-16 SDiZ Avatar answered Nov 09 '22 16:11

J-16 SDiZ


For instance, on preemption disabled, uniprocessor(non-SMP) systems, any endless loop in a kernel thread will cause a soft-lockup.

like image 37
paul xiong Avatar answered Nov 09 '22 14:11

paul xiong