From owner-freebsd-current@freebsd.org Fri Jan 26 15:07:15 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22415EDB05C for ; Fri, 26 Jan 2018 15:07:15 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B041977051 for ; Fri, 26 Jan 2018 15:07:14 +0000 (UTC) (envelope-from david@catwhisker.org) Received: by mailman.ysv.freebsd.org (Postfix) id 67D64EDB05B; Fri, 26 Jan 2018 15:07:14 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 431EFEDB05A for ; Fri, 26 Jan 2018 15:07:14 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mx.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (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 A95AA77050 for ; Fri, 26 Jan 2018 15:07:13 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.15.2/8.15.2) with ESMTP id w0QF7Adx075742; Fri, 26 Jan 2018 15:07:10 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.15.2/8.15.2/Submit) id w0QF7AN6075741; Fri, 26 Jan 2018 07:07:10 -0800 (PST) (envelope-from david) Date: Fri, 26 Jan 2018 07:07:10 -0800 From: David Wolfskill To: Warner Losh Cc: FreeBSD Current Subject: Re: Panic on shutdown @r328436: "Unholding 6 with cnt = -559038242" Message-ID: <20180126150710.GV1287@albert.catwhisker.org> Reply-To: current@freebsd.org Mail-Followup-To: current@freebsd.org, Warner Losh References: <20180126122947.GA1287@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LJa15rN3LQ9Y2Ulo" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2018 15:07:15 -0000 --LJa15rN3LQ9Y2Ulo Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 26, 2018 at 07:47:48AM -0700, Warner Losh wrote: > On Fri, Jan 26, 2018 at 5:29 AM, David Wolfskill > wrote: >=20 > > This is on my "build machine" (laptop is still building updated ports > > for today, so I don't know yet whether or not it encounters this.) > > >=20 > Running a kernel with INVARIANTS, right? Yes -- GENERIC. > > I had performed a source-based update from r328393 to r328436, > > rebooted, performed "make delete-old-libs", and all seemed well. > > >=20 > This has my change 328415 in it. :-) > > I then issued "sudo shutdown -p now", and serial console shows: > > panic: Unholding 6 with cnt =3D -559038242 > > cpuid =3D 3 > > time =3D 1516968697 > > KDB: stack backtrace: > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > > 0xfffffe00004288c0 > > vpanic() at vpanic+0x18d/frame 0xfffffe0000428920 > > panic() at panic+0x43/frame 0xfffffe0000428980 > > dadiskgonecb() at dadiskgonecb+0x42/frame 0xfffffe00004289a0 > > g_disk_providergone() at g_disk_providergone+0x25/frame 0xfffffe0000428= 9d0 > > g_destroy_provider() at g_destroy_provider+0xae/frame 0xfffffe00004289f0 > > g_wither_washer() at g_wither_washer+0x87/frame 0xfffffe0000428a30 > > g_run_events() at g_run_events+0x3ca/frame 0xfffffe0000428a70 > > fork_exit() at fork_exit+0x84/frame 0xfffffe0000428ab0 > > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0000428ab0 > > --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- > > KDB: enter: panic > > [ thread pid 13 tid 100044 ] > > Stopped at kdb_enter+0x3b: movq $0,kdb_why > > db> > > >=20 > That's no good. We're releasing a reference to the da peripheral because > geom has finished with the disk and is giving us a final callback so we c= an > drop the reference we took when we created the geom. Trouble is, cnt shou= ld > be like 1 always for this code, but it's not. It looks like it may be byt= es > to a pointer :( >=20 >=20 > > As noted, this is a build machine, and it was to be powered off for > > the rest of the day anyway, so I don't need to get it up & running > > immediately: I can poke at the ddb prompt, given some clues. > > >=20 > I don't suppose you can attach kgdb to this machine? I'd be interested to > see what the contents of the softc are...a Pointer to how to do that? I do have ddb right now.... > .... > Thanks for the report. This is quite troubling. Well, let's get it fixed, then! :-) > Warner > .... I should still have access to the serial console after I get in to the office (heading out shortly). Peace, david --=20 David H. Wolfskill david@catwhisker.org "unfortunately, no trust!=E2=80=9D -- well, of course! You reap what you s= ow. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --LJa15rN3LQ9Y2Ulo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEzLfO+ReoAfQwZNd7FTnMQKBJ7hcFAlprRB1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEND QjdDRUY5MTdBODAxRjQzMDY0RDc3QjE1MzlDQzQwQTA0OUVFMTcACgkQFTnMQKBJ 7hfNdggAqYHLXjkXPcdnKW8jgNJz3GCXvzzq7Dn9RMcpvXZnyOYbI2Lz+suwNgDn sOvSzQfXkG2QvvLyGQxsueSAKW/OOo06/Xtd6lwkwikHuTR+swjymI5SQZcBHs+3 Th92uwfMKRB9SPbhbyF/kBw0P+EsBAMpq/jnsSF6p4aL5qfJT+G0d8t228O2l2fR KKsaWU7uz6T9b9Zcn0JWzgyzKyw87UHRX8bm6xalLT3OhrwVvnC4kBNegJrfBEbK nZlTXcsTR7Q2SlJ+UXjzGpr2nzmBbV9c2g8gRqc2Akfhm468PahjmNdjILVCEEG/ OvriPQ3pIZLDy4hDehz7zwttUCo4MA== =ualf -----END PGP SIGNATURE----- --LJa15rN3LQ9Y2Ulo--