Question

I have a linux kernel dump generated on a 24-core system. Most of the tasks are stuck on a spinlock. Is there a way to get the owner of a spinlock?

Was it helpful?

Solution

Spinlock doesn't have the concept of "owner", mutex has.

So actually what you want to know is which process is holding a specific spinlock. This kind of information is usually available in lockdep backtrace. So if you have lockdep enabled, you can just read the kernel log, if not, you need to check the backtraces of all processes, similar to Sysrq-t. Give the fact that you already have the vmcore, you can use crash utility to get the backtrace of each process.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top