Summary: | kernel panic with vdev_geom_close_locked: cp->private is NULL | ||
---|---|---|---|
Product: | Base System | Reporter: | David NewHamlet <wheelcomplex> |
Component: | kern | Assignee: | Alan Somers <asomers> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | asomers, emaste, wheelcomplex |
Priority: | --- | Flags: | asomers:
mfc-stable11+
asomers: mfc-stable10+ |
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
David NewHamlet
2017-07-28 09:49:47 UTC
Can you please post detailed reproduction steps? (In reply to Alan Somers from comment #1) I hit this issue when trying to use a zfs as rootfs which use a compressed md_image as underlayer device. A compressed md_image can not be opened in write mode. Use a zfs as rootfs(vfs.root.mountfrom) in compressed md_image or a memory stick/Sd card which have a hard switch to turn device into readoly mode will reproduce this panic. Here's a minimal reproduction case: $ sudo gnop create -S 16384 /dev/da0 $ sudo zpool create foo /dev/da0.nop A commit references this bug: Author: asomers Date: Thu Nov 30 15:28:29 UTC 2017 New revision: 326399 URL: https://svnweb.freebsd.org/changeset/base/326399 Log: Fix assertion when ZFS fails to open certain devices "panic: vdev_geom_close_locked: cp->private is NULL" This panic will result if ZFS fails to open a device due to either of the following reasons: 1) The device's sector size is greater than 8KB. 2) ZFS wants to open the device RW, but it can't be opened for writing. The solution is to change the initialization order to ensure that the assertion will be satisfied. PR: 221066 Reported by: David NewHamlet <wheelcomplex@gmail.com> Reviewed by: avg MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13278 Changes: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c A commit references this bug: Author: asomers Date: Thu Nov 30 15:36:06 UTC 2017 New revision: 326401 URL: https://svnweb.freebsd.org/changeset/base/326401 Log: Fix assertion when ZFS fails to open certain devices "panic: vdev_geom_close_locked: cp->private is NULL" This panic will result if ZFS fails to open a device due to either of the following reasons: 1) The device's sector size is greater than 8KB. 2) ZFS wants to open the device RW, but it can't be opened for writing. The solution is to change the initialization order to ensure that the assertion will be satisfied. PR: 221066 Reported by: David NewHamlet <wheelcomplex@gmail.com> Reviewed by: avg MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13278 Changes: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c A commit references this bug: Author: asomers Date: Tue Dec 26 04:02:35 UTC 2017 New revision: 327188 URL: https://svnweb.freebsd.org/changeset/base/327188 Log: MFC r326401: Fix assertion when ZFS fails to open certain devices "panic: vdev_geom_close_locked: cp->private is NULL" This panic will result if ZFS fails to open a device due to either of the following reasons: 1) The device's sector size is greater than 8KB. 2) ZFS wants to open the device RW, but it can't be opened for writing. The solution is to change the initialization order to ensure that the assertion will be satisfied. PR: 221066 Reported by: David NewHamlet <wheelcomplex@gmail.com> Reviewed by: avg Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13278 Changes: _U stable/11/ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c A commit references this bug: Author: asomers Date: Thu Feb 22 01:25:28 UTC 2018 New revision: 329780 URL: https://svnweb.freebsd.org/changeset/base/329780 Log: MFC r326399: Fix assertion when ZFS fails to open certain devices "panic: vdev_geom_close_locked: cp->private is NULL" This panic will result if ZFS fails to open a device due to either of the following reasons: 1) The device's sector size is greater than 8KB. 2) ZFS wants to open the device RW, but it can't be opened for writing. The solution is to change the initialization order to ensure that the assertion will be satisfied. PR: 221066 Reported by: David NewHamlet <wheelcomplex@gmail.com> Reviewed by: avg Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13278 Changes: _U stable/11/ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c A commit references this bug: Author: asomers Date: Mon Mar 5 20:28:49 UTC 2018 New revision: 330522 URL: https://svnweb.freebsd.org/changeset/base/330522 Log: MFC r326401: Fix assertion when ZFS fails to open certain devices "panic: vdev_geom_close_locked: cp->private is NULL" This panic will result if ZFS fails to open a device due to either of the following reasons: 1) The device's sector size is greater than 8KB. 2) ZFS wants to open the device RW, but it can't be opened for writing. The solution is to change the initialization order to ensure that the assertion will be satisfied. PR: 221066 Reported by: David NewHamlet <wheelcomplex@gmail.com> Reviewed by: avg Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13278 Changes: _U stable/10/ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c |