Archive for the ‘Q&A’ Category

How to interpret call traces

Monday, March 5th, 2012

I have the following call trace and info from kernel:

INFO: task raw_device_benc:9684 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
raw_device_be D c1e5c800  5984  9684   9683
       ed9e9d5c 00000046 c1e5c800 c1e5c800 ed9e9d14 587dc805 00001e62 e884be00
       e884c054 c1e5c800 00000000 ed9e8000 f6333b80 00000000 00000000 001eda69
       00000000 e884be00 00000000 e884be00 c044319a 00000000 ed9e9d58 c013e912
Call Trace:
 [<c044319a>] ? _spin_unlock_irqrestore+0x36/0x3c
 [<c013e912>] ? trace_hardirqs_on+0xe9/0x111
 [<c044126d>] io_schedule+0x1e/0x28
 [<c018ec95>] __blockdev_direct_IO+0x9a9/0xaf2
 [<c014e2da>] ? generic_file_buffered_write+0x116/0x4e1
 [<c017efa6>] ? mnt_drop_write+0x4f/0xbc
 [<c018db1a>] blkdev_direct_IO+0x30/0x35
 [<c018da31>] ? blkdev_get_blocks+0x0/0xb9
 [<c014e067>] generic_file_direct_IO+0xda/0x125
 [<c014eecf>] generic_file_aio_read+0x9c/0x49f
 [<c013f7d1>] ? __lock_acquire+0xaea/0xb32
 [<c016c2c3>] do_sync_read+0xab/0xe9
 [<c0132f0d>] ? autoremove_wake_function+0x0/0x33
 [<c044192d>] ? mutex_unlock+0x8/0xa
 [<c018cb2d>] ? block_llseek+0xbe/0xcc
 [<c016c218>] ? do_sync_read+0x0/0xe9
 [<c016c9bc>] vfs_read+0x8a/0x106
 [<c016cdef>] sys_read+0x3b/0x60
 [<c0103809>] sysenter_past_esp+0x6a/0xb1
 =======================
no locks held by raw_device_benc/9684.

However, I am not quite sure what this section means:

raw_device_be D c1e5c800  5984  9684   9683
       ed9e9d5c 00000046 c1e5c800 c1e5c800 ed9e9d14 587dc805 00001e62 e884be00
       e884c054 c1e5c800 00000000 ed9e8000 f6333b80 00000000 00000000 001eda69
       00000000 e884be00 00000000 e884be00 c044319a 00000000 ed9e9d58 c013e912

Can anyone maybe explain a bit to me? Are those register values? More specifically I wonder if I could infer the arguments being passed to the function in the call trace from those values. Thanks.

Answer by Veda Solutions

Meaning of the following line is:

 raw_device_be D c1e5c800  5984  9684   9683

Hung process name is raw_device_be, it is in D state,process pc was at c1e5c800, free stack space is 5984, pid of the process is 9684 and parent pid of the process is 9683.

And the remaining few lines:

  ed9e9d5c 00000046 c1e5c800 c1e5c800 ed9e9d14 587dc805 00001e62 e884be00
   e884c054 c1e5c800 00000000 ed9e8000 f6333b80 00000000 00000000 001eda69
   00000000 e884be00 00000000 e884be00 c044319a 00000000 ed9e9d58 c013e912

is stack data. A 24 words(96 bytes) of stack data will be printed starting from the current stack pointer(sp) of the process. If you know how stack grows and shrinks and have the disassemble code of the vmlinux, you can find the arguments of a function. Of course you have a limited stack data given.

Note: This conversation is from the forum stack overflow