← Back to team overview

kernel-packages team mailing list archive

[Bug 1560869] Re: Concurrent zfs create and rename operations can lock a zpool completely

 

Stack traces of hanging processes collected via /proc/<PID>/stack:

proc-1519-stack.log:
[<ffffffffc01adc49>] cv_wait_common+0x109/0x140 [spl]
[<ffffffffc01adcb5>] __cv_wait_sig+0x15/0x20 [spl]
[<ffffffffc02bc131>] txg_quiesce_thread+0x3e1/0x3f0 [zfs]
[<ffffffffc01a8e41>] thread_generic_wrapper+0x71/0x80 [spl]
[<ffffffff8109f3e8>] kthread+0xd8/0xf0
[<ffffffff8182238f>] ret_from_fork+0x3f/0x70
[<ffffffffffffffff>] 0xffffffffffffffff
proc-1520-stack.log:
[<ffffffffc0311b18>] zvol_rename_minors+0x58/0x190 [zfs]
[<ffffffffc028eadd>] dsl_dir_rename_sync+0x31d/0x5a0 [zfs]
[<ffffffffc0297f69>] dsl_sync_task_sync+0xe9/0xf0 [zfs]
[<ffffffffc028ff77>] dsl_pool_sync+0x327/0x430 [zfs]
[<ffffffffc02ab536>] spa_sync+0x366/0xb30 [zfs]
[<ffffffffc02bc9ba>] txg_sync_thread+0x3ba/0x630 [zfs]
[<ffffffffc01a8e41>] thread_generic_wrapper+0x71/0x80 [spl]
[<ffffffff8109f3e8>] kthread+0xd8/0xf0
[<ffffffff8182238f>] ret_from_fork+0x3f/0x70
[<ffffffffffffffff>] 0xffffffffffffffff
proc-1763-stack.log:
[<ffffffffc01adc49>] cv_wait_common+0x109/0x140 [spl]
[<ffffffffc01adcb5>] __cv_wait_sig+0x15/0x20 [spl]
[<ffffffffc0299008>] zfs_zevent_wait+0x88/0xa0 [zfs]
[<ffffffffc02dfb46>] zfs_ioc_events_next+0xa6/0xe0 [zfs]
[<ffffffffc02e45a3>] zfsdev_ioctl+0x423/0x4b0 [zfs]
[<ffffffff8121e7df>] do_vfs_ioctl+0x29f/0x490
[<ffffffff8121ea49>] SyS_ioctl+0x79/0x90
[<ffffffff81821ff2>] entry_SYSCALL_64_fastpath+0x16/0x71
[<ffffffffffffffff>] 0xffffffffffffffff
proc-7027-stack.log:
[<ffffffffc01adc49>] cv_wait_common+0x109/0x140 [spl]
[<ffffffffc01adc95>] __cv_wait+0x15/0x20 [spl]
[<ffffffffc02a0e8c>] rrw_enter_read_impl+0x4c/0x160 [zfs]
[<ffffffffc02a117c>] rrw_enter+0x1c/0x20 [zfs]
[<ffffffffc0290eaa>] dsl_pool_hold+0x5a/0x80 [zfs]
[<ffffffffc026d244>] dmu_objset_own+0x44/0xd0 [zfs]
[<ffffffffc030f9e7>] __zvol_create_minor+0x127/0x640 [zfs]
[<ffffffffc0311763>] zvol_create_minor+0x33/0x70 [zfs]
[<ffffffffc03117ae>] zvol_create_minors_cb+0xe/0x20 [zfs]
[<ffffffffc026e872>] dmu_objset_find_impl+0x112/0x3f0 [zfs]
[<ffffffffc026eba8>] dmu_objset_find+0x58/0x90 [zfs]
[<ffffffffc0311949>] zvol_create_minors+0x29/0x30 [zfs]
[<ffffffffc02e6870>] zfs_ioc_create+0x190/0x2a0 [zfs]
[<ffffffffc02e4398>] zfsdev_ioctl+0x218/0x4b0 [zfs]
[<ffffffff8121e7df>] do_vfs_ioctl+0x29f/0x490
[<ffffffff8121ea49>] SyS_ioctl+0x79/0x90
[<ffffffff81821ff2>] entry_SYSCALL_64_fastpath+0x16/0x71
[<ffffffffffffffff>] 0xffffffffffffffff
proc-7038-stack.log:
[<ffffffffc01adc49>] cv_wait_common+0x109/0x140 [spl]
[<ffffffffc01adc95>] __cv_wait+0x15/0x20 [spl]
[<ffffffffc02bc225>] txg_wait_synced+0xe5/0x130 [zfs]
[<ffffffffc0297ca9>] dsl_sync_task+0x179/0x260 [zfs]
[<ffffffffc028d53b>] dsl_dir_rename+0x5b/0x80 [zfs]
[<ffffffffc02e013d>] zfs_ioc_rename+0x10d/0x120 [zfs]
[<ffffffffc02e45a3>] zfsdev_ioctl+0x423/0x4b0 [zfs]
[<ffffffff8121e7df>] do_vfs_ioctl+0x29f/0x490
[<ffffffff8121ea49>] SyS_ioctl+0x79/0x90
[<ffffffff81821ff2>] entry_SYSCALL_64_fastpath+0x16/0x71
[<ffffffffffffffff>] 0xffffffffffffffff


** Also affects: linux (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1560869

Title:
  Concurrent zfs create and rename operations can lock a zpool
  completely

Status in linux package in Ubuntu:
  Incomplete
Status in zfs-linux package in Ubuntu:
  New

Bug description:
  When doing "zfs create -V" and "zfs rename" operations on the same
  zpool in parallel, there is a high chance for a deadlock leading to a
  complete hang of the zpool in question (i.e., all further zfs
  operations hang indefinitely).

  Attached you find a simple perl script that should trigger the bug
  (the pool variable needs to be set to your pool name), if run in two
  shells at the same time:

  $ for i in `seq 1 100`; do sudo ./zfsrenamebug.pl "A$i"; done

  $ for i in `seq 1 100`; do sudo ./zfsrenamebug.pl "B$i"; done

  Reported upstream in https://github.com/zfsonlinux/zfs/issues/4404 and
  apparently fixed with the linked commits.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1560869/+subscriptions