Skip to content

Commit

Permalink
Debug ZVOL open deadlock
Browse files Browse the repository at this point in the history
Run zpool_destroy_001_pos 50 times with a 30 seconds timeout.

Requires-builders: test
Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#6145
  • Loading branch information
behlendorf committed May 25, 2017
1 parent 7bc181e commit 3512fb6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 12 deletions.
10 changes: 5 additions & 5 deletions TEST
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
#TEST_SPLAT_OPTIONS="-acvx"

### ztest
#TEST_ZTEST_SKIP="yes"
TEST_ZTEST_SKIP="yes"
#TEST_ZTEST_TIMEOUT=1800
#TEST_ZTEST_DIR="/var/tmp/"
#TEST_ZTEST_OPTIONS="-V"

### zimport
#TEST_ZIMPORT_SKIP="yes"
TEST_ZIMPORT_SKIP="yes"
#TEST_ZIMPORT_DIR="/var/tmp/zimport"
#TEST_ZIMPORT_VERSIONS="master installed"
#TEST_ZIMPORT_POOLS="zol-0.6.1 zol-0.6.2 master installed"
#TEST_ZIMPORT_OPTIONS="-c"

### xfstests
#TEST_XFSTESTS_SKIP="yes"
TEST_XFSTESTS_SKIP="yes"
#TEST_XFSTESTS_URL="https://github.com/behlendorf/xfstests/archive/"
#TEST_XFSTESTS_VER="zfs.tar.gz"
#TEST_XFSTESTS_POOL="tank"
Expand All @@ -33,7 +33,7 @@
#TEST_ZFSTESTS_SKIP="yes"
#TEST_ZFSTESTS_DISKS="vdb vdc vdd"
#TEST_ZFSTESTS_DISKSIZE="8G"
#TEST_ZFSTESTS_RUNFILE="linux.run"
TEST_ZFSTESTS_RUNFILE="zvol-open-deadlock.run"

### filebench
#TEST_FILEBENCH_SKIP="yes"
Expand All @@ -47,7 +47,7 @@
#TEST_FILEBENCH_OPTIONS=""

### zfsstress
#TEST_ZFSSTRESS_SKIP="yes"
TEST_ZFSSTRESS_SKIP="yes"
#TEST_ZFSSTRESS_URL="https://github.com/nedbass/zfsstress/archive/"
#TEST_ZFSSTRESS_VER="master.tar.gz"
#TEST_ZFSSTRESS_RUNTIME=300
Expand Down
41 changes: 41 additions & 0 deletions tests/runfiles/zvol-open-deadlock.run
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

[DEFAULT]
pre = setup
quiet = False
pre_user = root
user = root
timeout = 30
post_user = root
post = cleanup
outputdir = /var/tmp/test_results

[tests/functional/cli_root/zpool_destroy]
tests = ['zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos',
'zpool_destroy_001_pos', 'zpool_destroy_001_pos', 'zpool_destroy_001_pos']
pre =
post =
4 changes: 3 additions & 1 deletion tests/test-runner/include/logapi.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

. ${STF_TOOLS}/include/stf.shlib

trap 'log_timed_out "Test killed by SIGTERM' TERM

# Output an assertion
#
# $@ - assertion text
Expand Down Expand Up @@ -418,7 +420,7 @@ function _endlog
typeset logfile="/tmp/log.$$"
_recursive_output $logfile

if [[ $1 == $STF_FAIL ]] ; then
if [[ $1 == $STF_FAIL ]] || [[ $1 == $STF_TIMED_OUT ]]; then
_execute_testfail_callbacks
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@

verify_runnable "global"

# https://github.com/zfsonlinux/zfs/issues/6145
if is_linux; then
log_unsupported "Test case occasionally fails"
fi

function cleanup
{
poolexists $TESTPOOL2 && destroy_pool $TESTPOOL2
Expand All @@ -71,7 +66,6 @@ if ! $(is_physical_device $DISKS) ; then
fi

log_assert "'zpool destroy <pool>' can destroy a specified pool."

log_onexit cleanup

partition_disk $SLICE_SIZE $DISK 2
Expand Down

0 comments on commit 3512fb6

Please sign in to comment.