| Summary: | "zpool add" crashes in the presence of a replacing vdev with a spare child | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Alan Somers <asomers> |
| Component: | kern | Assignee: | Alan Somers <asomers> |
| Status: | Closed FIXED | ||
| Severity: | Affects Some People | CC: | danfe |
| Priority: | --- | Flags: | asomers:
mfc-stable11+
asomers: mfc-stable10+ |
| Version: | CURRENT | ||
| Hardware: | Any | ||
| OS: | Any | ||
A commit references this bug: Author: asomers Date: Mon Jan 29 23:20:30 UTC 2018 New revision: 328569 URL: https://svnweb.freebsd.org/changeset/base/328569 Log: Add a regression test for PR 225546 If a pool contains a replacing vdev with a spare child, then any "zpool add" command will fail. It doesn't matter whether you're adding a regular vdev, log, cache, or spare vdev. The bug is in get_replication in zpool_vdev.c in the zpool command. tests/sys/cddl/zfs/tests/cli_root/zpool_add/Makefile tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_010_pos.ksh tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_test.sh Add a test case that creates a pool with replacing vdev that has a spare child, then attempts to add another spare. tests/sys/cddl/zfs/include/commands.txt Add an alias for /usr/bin/timeout PR: 225546 Sponsored by: Spectra Logic Corp Changes: projects/zfsd/head/tests/sys/cddl/zfs/include/commands.txt projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/Makefile projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_010_pos.ksh projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_test.sh A commit references this bug: Author: danfe Date: Tue Jan 30 14:54:31 UTC 2018 New revision: 460390 URL: https://svnweb.freebsd.org/changeset/ports/460390 Log: Update `sysutils/xorriso' to version 1.4.8. PR: 225546 Submitted by: benno Changes: head/sysutils/xorriso/Makefile head/sysutils/xorriso/distinfo head/sysutils/xorriso/pkg-plist danfe I think you may want to double check the PR number for xorriso. Yup, I already did, mea culpa (typo 8 -> 6). A commit references this bug: Author: asomers Date: Fri Feb 9 16:08:57 UTC 2018 New revision: 329067 URL: https://svnweb.freebsd.org/changeset/base/329067 Log: Fix "zpool add" crash when a replacing vdev has a spare child Fix an assertion in zpool that causes a crash when running any "zpool add" command on a spare that contains a replacing vdev with a spare child. This likely affects Illumos, too. PR: 225546 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D14138 Changes: head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c A commit references this bug: Author: asomers Date: Sat Mar 10 03:04:49 UTC 2018 New revision: 330728 URL: https://svnweb.freebsd.org/changeset/base/330728 Log: MFC r329067: Fix "zpool add" crash when a replacing vdev has a spare child Fix an assertion in zpool that causes a crash when running any "zpool add" command on a spare that contains a replacing vdev with a spare child. This likely affects Illumos, too. PR: 225546 Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D14138 Changes: _U stable/11/ stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c A commit references this bug: Author: asomers Date: Sat Mar 10 04:02:51 UTC 2018 New revision: 330735 URL: https://svnweb.freebsd.org/changeset/base/330735 Log: MFC r329067: Fix "zpool add" crash when a replacing vdev has a spare child Fix an assertion in zpool that causes a crash when running any "zpool add" command on a spare that contains a replacing vdev with a spare child. This likely affects Illumos, too. PR: 225546 Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D14138 Changes: _U stable/10/ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c |
If a pool contains a replacing vdev with a spare child, then any "zpool add" command will fail. It doesn't matter whether you're adding a regular vdev, log, cache, or spare vdev. The bug is in get_replication in zpool_vdev.c in the zpool command. zpool status bar pool: bar state: DEGRADED status: One or more devices is currently being resilvered. The pool will continue to function, possibly in a degraded state. action: Wait for the resilver to complete. scan: resilver in progress since Wed Dec 6 22:32:52 2017 17.7G scanned out of 4.24T at 534M/s, 2h18m to go 11.8G resilvered, 0.41% done config: NAME STATE READ WRITE CKSUM bar DEGRADED 0 0 0 raidz1-0 DEGRADED 0 0 0 replacing-0 DEGRADED 0 0 0 spare-0 REMOVED 0 0 0 4444235316927249078 REMOVED 0 0 0 was /dev/da0 da5 ONLINE 0 0 0 (resilvering) da4 ONLINE 0 0 0 (resilvering) da1 ONLINE 0 0 0 da2 ONLINE 0 0 0 da3 ONLINE 0 0 0 spares 17011840191929354180 INUSE currently in use was /dev/da5 errors: No known data errors zpool add bar log da6 Assertion failed: (nvlist_lookup_string(cnv, "path", &path) == 0), file /usr/home/alans/freebsd/head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c, line 694. Abort(coredump)