Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asynchronous zvol minor operations cause deadlock in buildbot #6075

Closed
ryao opened this issue Apr 26, 2017 · 2 comments
Closed

asynchronous zvol minor operations cause deadlock in buildbot #6075

ryao opened this issue Apr 26, 2017 · 2 comments
Assignees
Labels
Component: ZVOL ZFS Volumes Type: Regression Indicates a functional regression

Comments

@ryao
Copy link
Contributor

ryao commented Apr 26, 2017

The deadlock was introduced by a0bd735, which itself was a deadlock fix. It caused a buildbot failure on #6058:

http://build.zfsonlinux.org/builders/CentOS%206.7%20x86_64%20%28TEST%29/builds/5360/steps/shell_10/logs/console

We had a zvol attempt to create minors during pool export.

  1. spa_export_common() took the namespace lock in the zpool thread.
  2. The zpool thread blocked on the taskq being destroyed.
  3. A taskq thread that was executing minor creation blocked on the namespace lock.
  4. Deadlock
z_zvol        D 0000000000000001     0 12229      2 0x00000080
 ffff8801b6f6bc30 0000000000000046 ffff8801b6f6bbe0 ffffffffa06310f7
 ffff8801b6f6bbf0 0000000000000282 ffff8801ba692738 ffff8801ba692730
 ffff8801b6f6bbc0 ffffffff812998e9 ffff880131e0dad8 ffff8801b6f6bfd8
Call Trace:
 [<ffffffffa06310f7>] ? zap_lookup_norm+0x97/0xb0 [zfs]
 [<ffffffff812998e9>] ? cpumask_next_and+0x29/0x50
 [<ffffffff8154c086>] __mutex_lock_slowpath+0x96/0x210
 [<ffffffff8154bbab>] mutex_lock+0x2b/0x50
 [<ffffffffa05fc002>] spa_open_common+0x72/0x490 [zfs]
 [<ffffffff8100969d>] ? __switch_to+0x7d/0x340
 [<ffffffffa0688a60>] ? zvol_create_minors_cb+0x0/0x170 [zfs]
 [<ffffffffa05fc433>] spa_open+0x13/0x20 [zfs]
 [<ffffffffa0599eb9>] dmu_objset_find+0x39/0x80 [zfs]
 [<ffffffffa0347579>] ? spl_kmem_alloc+0xc9/0x1e0 [spl]
 [<ffffffffa068ae64>] zvol_task_cb+0x4a4/0x530 [zfs]
 [<ffffffffa034c844>] taskq_thread+0x294/0x590 [spl]
 [<ffffffff8106c480>] ? default_wake_function+0x0/0x20
 [<ffffffffa034c5b0>] ? taskq_thread+0x0/0x590 [spl]
 [<ffffffff810a63ae>] kthread+0x9e/0xc0
 [<ffffffff8100c28a>] child_rip+0xa/0x20
 [<ffffffff810a6310>] ? kthread+0x0/0xc0
 [<ffffffff8100c280>] ? child_rip+0x0/0x20
INFO: task zpool:20233 blocked for more than 120 seconds.
      Tainted: P           -- ------------    2.6.32-696.1.1.el6.x86_64 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
zpool         D 0000000000000000     0 20233  20229 0x00000080
 ffff8801ea35fc48 0000000000000086 0000000000000000 ffff8801efc701c0
 000000000000003c ffff8801efec29f0 000006df85aa4a1d ffffffff81181554
 ffff8801efc212c0 00000001006ebb68 ffff880100dba5f8 ffff8801ea35ffd8
Call Trace:
 [<ffffffff81181554>] ? free_block+0x154/0x170
 [<ffffffff8106c480>] ? default_wake_function+0x0/0x20
 [<ffffffffa034b84d>] taskq_wait+0x5d/0x90 [spl]
 [<ffffffff810a6840>] ? autoremove_wake_function+0x0/0x40
 [<ffffffffa034b9a7>] taskq_destroy+0x57/0x3f0 [spl]
 [<ffffffffa05f7ad7>] spa_deactivate+0x77/0x6c0 [zfs]
 [<ffffffffa05f8f97>] spa_export_common+0x257/0x4d0 [zfs]
 [<ffffffffa03472bb>] ? spl_kmem_free+0x2b/0x40 [spl]
 [<ffffffffa05f924b>] spa_export+0x1b/0x20 [zfs]
 [<ffffffffa06458bf>] zfs_ioc_pool_export+0x3f/0x50 [zfs]
 [<ffffffffa0647f94>] zfsdev_ioctl+0x4d4/0x540 [zfs]
 [<ffffffff810521a4>] ? __do_page_fault+0x1f4/0x500
 [<ffffffff811af632>] vfs_ioctl+0x22/0xa0
 [<ffffffff811af7d4>] do_vfs_ioctl+0x84/0x580
 [<ffffffff811afd51>] sys_ioctl+0x81/0xa0
 [<ffffffff8100b0d2>] system_call_fastpath+0x16/0x1b
@ryao ryao changed the title asynchronous zvol minor operations causes deadlock in buildbot asynchronous zvol minor operations cause deadlock in buildbot Apr 26, 2017
@ryao ryao added Type: Regression Indicates a functional regression Component: ZVOL ZFS Volumes labels Apr 26, 2017
@ryao ryao self-assigned this Apr 26, 2017
@loli10K
Copy link
Contributor

loli10K commented Apr 26, 2017

Isn't this just a duplicate of #5195?

@ryao
Copy link
Contributor Author

ryao commented Apr 26, 2017

@loli10K It is. Thanks.

@ryao ryao closed this as completed Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ZVOL ZFS Volumes Type: Regression Indicates a functional regression
Projects
None yet
Development

No branches or pull requests

2 participants