Bug 221408

Summary: "zpool online -e zroot mirror-2" - zpool tool crashes, core dumped
Product: Base System Reporter: Boyko Yordanov <b.yordanov2>
Component: binAssignee: freebsd-fs (Nobody) <fs>
Status: Closed FIXED    
Severity: Affects Many People CC: b.yordanov2, mav, pstef, yuripv
Priority: ---    
Version: 11.0-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
zpool.core dump none

Description Boyko Yordanov 2017-08-11 08:45:27 UTC
Hi,

I was trying to expand my pool the other day and messed with the arguments of "zpool online -e". I ended up crashing the zpool command line tool by trying to expand on "mirror-2" instead of the underlying ada1p2.

Further details and crash data below. Attached is the core dump.

# uname -a
FreeBSD backups.hostname.com 11.0-RELEASE-p12 FreeBSD 11.0-RELEASE-p12 #0: Wed Aug  9 10:03:39 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

# zpool status
  pool: zroot
 state: ONLINE
  scan: scrub repaired 0 in 4h50m with 0 errors on Sat Aug  5 06:05:09 2017
config:

	NAME        STATE     READ WRITE CKSUM
	zroot       ONLINE       0     0     0
	  mirror-0  ONLINE       0     0     0
	    ada0p2  ONLINE       0     0     0
	    ada3p2  ONLINE       0     0     0
	  mirror-1  ONLINE       0     0     0
	    ada4p2  ONLINE       0     0     0
	    ada5p2  ONLINE       0     0     0
	  mirror-2  ONLINE       0     0     0
	    ada1p2  ONLINE       0     0     0
	    ada2p2  ONLINE       0     0     0

errors: No known data errors

# zpool online -e zroot mirror-2
Assertion failed: (nvlist_lookup_string(tgt, "path", &pathname) == 0), file /usr/src/cddl/lib/libzfs/../../../cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c, line 2410.
Abort trap (core dumped)
Comment 1 Boyko Yordanov 2017-08-11 08:46:35 UTC
Created attachment 185277 [details]
zpool.core dump
Comment 2 Yuri Pankov 2017-12-06 03:35:52 UTC
Reported upstream: https://www.illumos.org/issues/8897
Comment 3 Yuri Pankov 2018-01-22 00:13:29 UTC
should be fixed in base r328232
Comment 4 Yuri Pankov 2018-09-14 21:45:49 UTC
Adding mav@ to CC list as he did merge the fix from upstream.