当前位置: 动力学知识库 > 问答 > 编程问答 >

How to find out the owner of a kernel-space semaphore in a crash dump using the crash utility?

问题描述:

I am analyzing a kernel crash dump. In it I see that the kernel was trying to hold a memory map semaphore for the purpose of serving a page fault, but was not able to. Seems like another thread was holding the lock. I would like to be able to figure which process/thread that is.

In essence, what I am trying to do is similar debugging a deadlock on a mutex as described here.

When I print the contents of the memory map struct (i.e. struct mm_struct), I get the output below. mmap_sem struct does not show which process who owns that semaphore. Is there any other way to find out?

Thanks.

$2 = {

mmap = 0xffff8801a574ca28,

mm_rb = {

rb_node = 0xffff8801a574c6f0

},

mmap_cache = 0xffff8801eef331e8,

get_unmapped_area = 0xffffffff81012a6d <arch_get_unmapped_area_topdown>,

unmap_area = 0xffffffff810f62c8 <arch_unmap_area_topdown>,

mmap_base = 140644237524992,

task_size = 140737488351232,

cached_hole_size = 0,

free_area_cache = 140644128301056,

pgd = 0xffff8801eec04000,

mm_users = {

counter = 5

},

mm_count = {

counter = 1

},

map_count = 253,

page_table_lock = {

{

rlock = {

raw_lock = {

slock = 15139047

}

}

}

},

mmap_sem = {

count = -4294967295,

wait_lock = {

{

rlock = {

raw_lock = {

slock = 262148

}

}

}

},

wait_list = {

next = 0xffff8801f0113e48,

prev = 0xffff8801f0113e48

}

},

mmlist = {

next = 0xffff8801f15fa5c0,

prev = 0xffff8801f15fa5c0

},

hiwater_rss = 1058,

hiwater_vm = 33946,

total_vm = 43994,

locked_vm = 0,

shared_vm = 33298,

exec_vm = 3055,

stack_vm = 34,

reserved_vm = 1343,

def_flags = 0,

nr_ptes = 105,

start_code = 4194304,

end_code = 4230900,

start_data = 6331336,

end_data = 6333240,

start_brk = 25427968,

brk = 25563136,

分享给朋友:
您可能感兴趣的文章:
随机阅读: