Thread Spinning Functionality in KMDB

kmdb provides the thread spin functionality to debug and reproduce the race or hang condition where the race window is very narrow. The thread spin functionality allows kmdb to instruct the threads to go into a spin state at a desired point. kmdb supports the following spin functions:

  • ::spin arm – Extend the continue state of the software event in a thread lifecycle. Multiple threads can be in the spin state simultaneously. Use ::spin resume to resume thread execution.

  • ::spin resume – Resume execution of the thread that was in the spin state. Invoke this command manually.

  • ::spin list – List all threads that are in the spin state. In contrast, ::events displays only software events and their states.