Project

General

Profile

Bug #3212

ztest: race condition between vdev_online() and spa_vdev_remove()

Added by Christopher Siden about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2012-09-20
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Assertion failed: !list_link_active(&vd->vdev_state_dirty_node),
file ../../../uts/common/fs/zfs/vdev.c, line 576, function vdev_free

> $c
libc.so.1`_lwp_kill+7(519, 6, e0852738, fee37b36)
libc.so.1`raise+0x22(6, 0, e0852788, fee0f80e)
libc.so.1`abort+0xf2(65737341, 6f697472, 6166206e, 64656c69, 6c21203a, 5f747369)
libc.so.1`_assert_c99+0x85(fed8c180, fed8c15c, 240, fed63315)
libzpool.so.1`vdev_free+0xbf(10c47400, 9b319a6e, e0852a58, e0852a48)
libzpool.so.1`spa_load_l2cache+0x3f5(10c2e000, 1, 9a918d4e, 9b319a6e)
libzpool.so.1`spa_vdev_remove+0x1b3(10c2e000, 9a918d4e, 9b319a6e, 0)
ztest_vdev_aux_add_remove+0x272(830ac38, a, 0, 8064e8a)
ztest_execute+0x67(19, 807d808, a, 0)
ztest_thread+0xf7(a, fef15000, e0852fe8, feea24c2)
libc.so.1`_thrp_setup+0x9b(f0a20240)
libc.so.1`_lwp_start(f0a20240, 0, 0, 0, 0, 0)

There is another thread that is also operating on this vdev:

> 51a::findstack -v
stack pointer for thread 51a: e0159518
[ e0159518 libc.so.1`__lwp_park+0xb() ]
  e0159548 libc.so.1`cond_wait_queue+0x60(10ed3d74, 10ed3d1c, 0, fee9b13e)
  e0159588 libc.so.1`__cond_wait+0x86(10ed3d74, 10ed3d1c, e01595a8, fee9b1fe)
  e01595a8 libc.so.1`cond_wait+0x24(10ed3d74, 10ed3d1c, e01595c8, fed5ce2e)
  e01595c8 libzpool.so.1`cv_wait+0x6d(10ed3d74, 10ed3d14, e0159628, fed23042)
  e0159628 libzpool.so.1`txg_wait_synced+0x192(10ed3b80, 0, 0, fed1de26)
  e0159658 libzpool.so.1`spa_vdev_state_exit+0x17e(10c2e000, 10c47400, 0, 1)
  e0159698 libzpool.so.1`vdev_online+0x1f4(10c2e000, 9a918d4e, 9b319a6e, 0, 0, 0)
  e0159f18 ztest_fault_inject+0x540(830c5a0, b, 0, 8064e8a)
  e0159f78 ztest_execute+0x67(10, 807d778, b, 0)
  e0159fc8 ztest_thread+0xf7(b, fef15000, e0159fe8, feea24c2)
  e0159fe8 libc.so.1`_thrp_setup+0x9b(f0a1d240)
  e0159ff8 libc.so.1`_lwp_start(f0a1d240, 0, 0, 0, 0, 0)
#1

Updated by Christopher Siden about 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100

changeset: 13840:97fd5cdf328a
tag: tip
user: George Wilson <>
date: Thu Sep 27 21:55:09 2012 -0700

description:
3145 single-copy arc
3212 ztest: race condition between vdev_online() and spa_vdev_remove()
Reviewed by: Matt Ahrens <>
Reviewed by: Adam Leventhal <>
Reviewed by: Eric Schrock <>
Reviewed by: Justin T. Gibbs <>
Approved by: Eric Schrock <>

modified:
usr/src/cmd/mdb/common/modules/zfs/zfs.c
usr/src/cmd/ztest/ztest.c
usr/src/uts/common/fs/zfs/arc.c
usr/src/uts/common/fs/zfs/dbuf.c
usr/src/uts/common/fs/zfs/sys/arc.h

Also available in: Atom PDF