zfsonlinux/zfs — Issue #531: zfs related deadlock in kswapd
Author: akorn
Created: 2012-01-13 08:16:54+00:00
State: open

Hi,

I just received the following:

```
kern: kern.err: Jan 13 02:49:23 kernel: INFO: task kswapd0:549 blocked for more than 3600 seconds.
kern: kern.err: Jan 13 02:49:23 kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kern: kern.info: Jan 13 02:49:23 kernel: kswapd0 D ffff8804032bb148 0 549 2 0x00000000
kern: kern.notice: Jan 13 02:49:23 kernel: ffff8804032c3960 0000000000000046 ffff8804032bada0 0000000000000008
kern: kern.notice: Jan 13 02:49:23 kernel: ffff8804032bada0 ffff8804032c3fd8 ffff8804032c3fd8 ffff8804032c3fd8
kern: kern.notice: Jan 13 02:49:23 kernel: ffff8804054d5b40 ffff8804032bada0 ffff8804032c3980 0000000000000297
kern: kern.notice: Jan 13 02:49:23 kernel: Call Trace:
kern: kern.notice: Jan 13 02:49:23 kernel: [] schedule+0x3a/0x50
kern: kern.notice: Jan 13 02:49:23 kernel: [] rwsem_down_failed_common+0xcd/0x160
kern: kern.notice: Jan 13 02:49:23 kernel: [] rwsem_down_write_failed+0x13/0x20
kern: kern.notice: Jan 13 02:49:23 kernel: [] call_rwsem_down_write_failed+0x13/0x20
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? down_write+0x20/0x22
kern: kern.notice: Jan 13 02:49:23 kernel: [] dnode_evict_dbufs+0x1a6/0x310 [zfs]
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? move_active_pages_to_lru+0x16c/0x1b0
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? _raw_spin_lock+0x9/0x10
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? sched_clock+0x9/0x10
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? try_to_wake_up+0x228/0x290
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? __mutex_lock_slowpath+0x3e/0x140
kern: kern.notice: Jan 13 02:49:23 kernel: [] dmu_objset_evict_dbufs+0x170/0x1d0 [zfs]
kern: kern.notice: Jan 13 02:49:23 kernel: [] zpl_free_cached_objects+0x17/0x20 [zfs]
kern: kern.notice: Jan 13 02:49:23 kernel: [] prune_super+0x109/0x1a0
kern: kern.notice: Jan 13 02:49:23 kernel: [] shrink_slab+0x139/0x2e0
kern: kern.notice: Jan 13 02:49:23 kernel: [] balance_pgdat+0x522/0x6e0
kern: kern.notice: Jan 13 02:49:23 kernel: [] kswapd+0x108/0x3d0
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? __schedule+0x3bc/0x890
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? add_wait_queue+0x60/0x60
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? balance_pgdat+0x6e0/0x6e0
kern: kern.notice: Jan 13 02:49:23 kernel: [] kthread+0x87/0x90
kern: kern.notice: Jan 13 02:49:23 kernel: [] kernel_thread_helper+0x4/0x10
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? flush_kthread_worker+0xa0/0xa0
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? gs_change+0x13/0x13
kern: kern.notice: Jan 13 02:49:23 kernel: Pid: 543, comm: khungtaskd Tainted: P 3.1.6-vs2.3.2.5-newjayhawk #4
2012-01-13T02:49:23+01:00 kern: <0>Jan 13 02:49:23 kernel: Kernel panic - not syncing: hung_task: blocked tasks
kern: kern.notice: Jan 13 02:49:23 kernel: Call Trace:
kern: kern.notice: Jan 13 02:49:23 kernel: [] panic+0x8c/0x19b
kern: kern.notice: Jan 13 02:49:23 kernel: [] watchdog+0x206/0x210
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? hung_task_panic+0x20/0x20
kern: kern.notice: Jan 13 02:49:23 kernel: [] kthread+0x87/0x90
kern: kern.notice: Jan 13 02:49:23 kernel: [] kernel_thread_helper+0x4/0x10
kern: kern.notice: Jan 13 02:49:23 kernel: [] ? flush_kthread_worker+0xa0/0xa0
```

Note that I had increased the hung task timeout to 3600s.

Andras