简体   繁体   English

Linux内核转储:如何获得螺旋锁的所有者

[英]Linux kernel dump: How to get the owner of a spinlock

I have a linux kernel dump generated on a 24-core system. 我在24核系统上生成了一个linux内核转储。 Most of the tasks are stuck on a spinlock. 大部分任务都停留在自旋锁上。 Is there a way to get the owner of a spinlock? 有没有办法让螺旋锁的主人?

Spinlock doesn't have the concept of "owner", mutex has. Spinlock没有“所有者”的概念,互斥体有。

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. 这种信息通常在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. 因此,如果你启用了lockdep,你可以只读内核日志,如果没有,你需要检查所有进程的回溯,类似于Sysrq-t。 Give the fact that you already have the vmcore, you can use crash utility to get the backtrace of each process. 假设您已经拥有vmcore,可以使用crash实用程序来获取每个进程的回溯。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM