From owner-freebsd-geom@freebsd.org Tue Feb 28 10:01:23 2017 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FE71CF00B9 for ; Tue, 28 Feb 2017 10:01:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 644979C6; Tue, 28 Feb 2017 10:01:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA15744; Tue, 28 Feb 2017 12:01:20 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1cieau-0005it-GQ; Tue, 28 Feb 2017 12:01:20 +0200 To: freebsd-geom@FreeBSD.org Cc: "Andrey V. Elsukov" From: Andriy Gapon Subject: GEOM_PART: zvol/pond/xxx was automatically resized, every boot Message-ID: Date: Tue, 28 Feb 2017 12:00:24 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 10:01:23 -0000 I updated a system that was running a half year old head before that. Now on every reboot I see messages like: GEOM_PART: zvol/pond/raidz0 was automatically resized. Use `gpart commit zvol/pond/raidz0` to save changes or `gpart undo zvol/pond/raidz0` to revert them I have done "gpart commit", but on the next reboot I still see the same message. That didn't happen with the older FreeBSD. This is quite annoying as I have to do gpart commit after each reboot to make my zvols usable. To add some data: > gpart show zvol/pond/raidz0 => 63 10485697 zvol/pond/raidz0 MBR (5.0G) 63 10485697 - free - (5.0G) The zvol actually has whole-disk ZFS on it, which uses zfsboot for booting. In other words, the first block of the zvol is the first block of zfsboot binary. Please advise. Thank you. -- Andriy Gapon From owner-freebsd-geom@freebsd.org Tue Feb 28 10:59:48 2017 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03978CF0E5A for ; Tue, 28 Feb 2017 10:59:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E73927D for ; Tue, 28 Feb 2017 10:59:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SAxl6V032694 for ; Tue, 28 Feb 2017 10:59:47 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-geom@FreeBSD.org Subject: [Bug 205343] [panic] [geom] [gjournal] g_journal KASSERT triggers for stable/10 Date: Tue, 28 Feb 2017 10:59:48 +0000 X-Bugzilla-Reason: CC AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ports@grosbein.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-geom@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 10:59:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205343 --- Comment #2 from Eugene Grosbein --- I've upgraded this system to 11.0-STABLE/amd64 r313803 and eventually same panic occured again: Unread portion of the kernel message buffer: panic: poffset=3D59478637056 plength=3D6144 coffset=3D59478573056 cpuid =3D 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe023885e= 6f0 vpanic() at vpanic+0x186/frame 0xfffffe023885e770 kassert_panic() at kassert_panic+0x126/frame 0xfffffe023885e7e0 g_journal_optimize() at g_journal_optimize+0x33/frame 0xfffffe023885e820 g_journal_flush_send() at g_journal_flush_send+0xfd/frame 0xfffffe023885e860 g_journal_worker() at g_journal_worker+0x888/frame 0xfffffe023885eb70 fork_exit() at fork_exit+0x84/frame 0xfffffe023885ebb0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe023885ebb0 --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- Uptime: 21h55m19s Dumping 887 out of 8161 MB:..2%..11%..22%..31% (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) (CTRL-C to abort) ..42%..51%..62%..71%..82%..91% (kgdb) bt #0 doadump (textdump=3D1) at pcpu.h:222 #1 0xffffffff80590ac5 in kern_reboot (howto=3D) at /data2/src/sys/kern/kern_shutdown.c:366 #2 0xffffffff805910a0 in vpanic (fmt=3D,=20 ap=3D) at /data2/src/sys/kern/kern_shutdown.c:759 #3 0xffffffff80590ed6 in kassert_panic (fmt=3D) at /data2/src/sys/kern/kern_shutdown.c:649 #4 0xffffffff8051a003 in g_journal_optimize (head=3D) at /data2/src/sys/geom/journal/g_journal.c:1034 #5 0xffffffff8051902d in g_journal_flush_send (sc=3D) at /data2/src/sys/geom/journal/g_journal.c:1395 #6 0xffffffff80516578 in g_journal_worker (arg=3D) at /data2/src/sys/geom/journal/g_journal.c:2186 #7 0xffffffff8055cc94 in fork_exit ( callout=3D0xffffffff80515cf0 , arg=3D0xfffff8000699b8= 00,=20 frame=3D0xfffffe023885ebc0) at /data2/src/sys/kern/kern_fork.c:1040 #8 0xffffffff80814abe in fork_trampoline () at /data2/src/sys/amd64/amd64/exception.S:611 #9 0x0000000000000000 in ?? () (kgdb) frame 4 #0 0x0000000000000000 in ?? () (kgdb) frame 4 #4 0xffffffff8051a003 in g_journal_optimize (head=3D) at /data2/src/sys/geom/journal/g_journal.c:1034 1034 KASSERT(pbp->bio_offset + pbp->bio_length < cbp->bio_offset, (kgdb) l 1029 continue; 1030 } 1031 /* Is this a neighbour bio? */ 1032 if (pbp->bio_offset + pbp->bio_length !=3D cbp->bio_offset) { 1033 /* Be sure that bios queue is sorted. */ 1034 KASSERT(pbp->bio_offset + pbp->bio_length < cbp->bio_offset, 1035 ("poffset=3D%jd plength=3D%jd coffset= =3D%jd", 1036 (intmax_t)pbp->bio_offset, 1037 (intmax_t)pbp->bio_length, 1038 (intmax_t)cbp->bio_offset)); --=20 You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.= From owner-freebsd-geom@freebsd.org Tue Feb 28 12:07:46 2017 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27540CF1D10 for ; Tue, 28 Feb 2017 12:07:46 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from butcher-nb.yandex.net (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id 64D3C40E; Tue, 28 Feb 2017 12:07:45 +0000 (UTC) (envelope-from ae@FreeBSD.org) Subject: Re: GEOM_PART: zvol/pond/xxx was automatically resized, every boot To: Andriy Gapon , freebsd-geom@FreeBSD.org References: From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <49828d0f-fe1c-f635-82c7-b63a32b6bba9@FreeBSD.org> Date: Tue, 28 Feb 2017 15:05:23 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CWjdgrBH15C5AhFpe53762MbtwqDKmFRT" X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 12:07:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CWjdgrBH15C5AhFpe53762MbtwqDKmFRT Content-Type: multipart/mixed; boundary="QoEGFsv31HWcWsp3EGLn16Mlk9CpkRDgA"; protected-headers="v1" From: "Andrey V. Elsukov" To: Andriy Gapon , freebsd-geom@FreeBSD.org Message-ID: <49828d0f-fe1c-f635-82c7-b63a32b6bba9@FreeBSD.org> Subject: Re: GEOM_PART: zvol/pond/xxx was automatically resized, every boot References: In-Reply-To: --QoEGFsv31HWcWsp3EGLn16Mlk9CpkRDgA Content-Type: multipart/mixed; boundary="------------E88C7528E6DEDB205227EAD0" This is a multi-part message in MIME format. --------------E88C7528E6DEDB205227EAD0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 28.02.2017 13:00, Andriy Gapon wrote: > This is quite annoying as I have to do gpart commit after each reboot t= o make my > zvols usable. >=20 > To add some data: >> gpart show zvol/pond/raidz0 > =3D> 63 10485697 zvol/pond/raidz0 MBR (5.0G) > 63 10485697 - free - (5.0G) >=20 > The zvol actually has whole-disk ZFS on it, which uses zfsboot for boot= ing. > In other words, the first block of the zvol is the first block of zfsbo= ot binary. Hi Andriy, I think the attached (untested) patch can help. --=20 WBR, Andrey V. Elsukov --------------E88C7528E6DEDB205227EAD0 Content-Type: text/x-patch; name="zvol.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="zvol.diff" Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c (revision 31429= 8) +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c (working copy) @@ -278,7 +278,15 @@ zvol_size_changed(zvol_state_t *zv, uint64_t volsi if (pp =3D=3D NULL) return; g_topology_lock(); - g_resize_provider(pp, zv->zv_volsize); + /* + * Do not invoke resize event when initial size was zero. + * ZVOL initializes the size on first open, this is not + * real resizing. + */ + if (pp->mediasize =3D=3D 0) + pp->mediasize =3D zv->zv_volsize; + else + g_resize_provider(pp, zv->zv_volsize); g_topology_unlock(); } #endif /* illumos */ --------------E88C7528E6DEDB205227EAD0-- --QoEGFsv31HWcWsp3EGLn16Mlk9CpkRDgA-- --CWjdgrBH15C5AhFpe53762MbtwqDKmFRT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAli1Z4MACgkQAcXqBBDI oXovtwf/a0fJ+Ua8qaakFfs4n20BLscM+K7oWqebaSbUAjO1FNQwQmb0D97TAlrq K/Qn/iuawv1R3Ox4oDcfwgX0tQcUBWoteTcuxuHbdY72dVN9iQc0rPY1tkEJfhf7 uWE7uRxhKdoJbp3Es3BGgf071VoJYpIs5QGEpeDANg25UcqSXBAGSFIkNVLBH0LK vemd58CMyugPlJGnsRC3xvFU8nmmoifi8YqKoZ+pbYsA9z4byVfWrPmNWy4n3K2H T/uKfNxuZ6fioisyaZjazw4zfP6pbDQlh02RhtNjfDMgUZ07wNnBTFb7sLxbkyCO 57XAJHtJsLphOtqMZ+t2AW29ykSFqw== =apL4 -----END PGP SIGNATURE----- --CWjdgrBH15C5AhFpe53762MbtwqDKmFRT-- From owner-freebsd-geom@freebsd.org Wed Mar 1 17:14:16 2017 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1D94CF1FDB for ; Wed, 1 Mar 2017 17:14:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E4C41A89; Wed, 1 Mar 2017 17:14:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA20612; Wed, 01 Mar 2017 19:14:13 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1cj7pN-0007T0-EN; Wed, 01 Mar 2017 19:14:13 +0200 Subject: Re: GEOM_PART: zvol/pond/xxx was automatically resized, every boot To: "Andrey V. Elsukov" , freebsd-geom@FreeBSD.org References: <49828d0f-fe1c-f635-82c7-b63a32b6bba9@FreeBSD.org> From: Andriy Gapon Message-ID: <16315780-6525-d1ce-1129-6f9307155649@FreeBSD.org> Date: Wed, 1 Mar 2017 19:13:17 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <49828d0f-fe1c-f635-82c7-b63a32b6bba9@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 17:14:16 -0000 On 28/02/2017 14:05, Andrey V. Elsukov wrote: > On 28.02.2017 13:00, Andriy Gapon wrote: >> This is quite annoying as I have to do gpart commit after each reboot to make my >> zvols usable. >> >> To add some data: >>> gpart show zvol/pond/raidz0 >> => 63 10485697 zvol/pond/raidz0 MBR (5.0G) >> 63 10485697 - free - (5.0G) >> >> The zvol actually has whole-disk ZFS on it, which uses zfsboot for booting. >> In other words, the first block of the zvol is the first block of zfsboot binary. > > Hi Andriy, > > I think the attached (untested) patch can help. The patch does help. Thank you very much! -- Andriy Gapon