Writing a kernel program, there are soft lockup errors are more common, similar to the Bug:soft lockup-cpu#2 stuck for 67s!.
Just start debugging the kernel, this error, often two eyes a smear, do not know how to do. But actually, this kind of problem solves many, can discover the reason basically on two kinds of situations, deadlock and dead loop .
Therefore, in the presence of soft lockup error, do not panic, as long as the analysis of the relevant code is not a dead loop, such as for the exit conditions of the loop to cause the loop can not exit, and so on, or to analyze whether the relevant code in the use of locks incorrectly caused the deadlock. For example, spinlock nested calls can lead to deadlocks if the order is not correct, and so on.
In short, in the presence of soft lockup error, basically from these two reasons to find it. Even if other call trace is likely to be given in the core dump file, the two aspects are carefully analyzed to dispel to find the real cause of the problem.
<span style= "FONT-FAMILY:ARIAL,HELVETICA,SANS-SERIF;" ><span style= "White-space:normal" > About lockup we can simply understand. Lockup are divided into soft lockup and hard lockup. </span></span>
<span style= "FONT-FAMILY:ARIAL,HELVETICA,SANS-SERIF;" ><span style= "White-space:normal" ><strong>soft lockup</strong> Refers to a bug in the kernel that causes the time in kernel mode to loop longer than 67s (depending on implementation and configuration), while other processes do not get the chance to run. </span></span>
<span style= "FONT-FAMILY:ARIAL,HELVETICA,SANS-SERIF;" ><span style= "White-space:normal" ><strong>hard lockup</strong> occurs because all interrupts to the CPU have been blocked for more than a certain amount of time (a few seconds) In this case, the interruption of external devices can not be processed, the kernel believes that the so-called hard lockup occurred at this time, this situation may be caused by spin_lock_irqsave. </span></span>