Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2018 07:07:10 -0800
From:      David Wolfskill <david@catwhisker.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        FreeBSD Current <current@freebsd.org>
Subject:   Re: Panic on shutdown @r328436: "Unholding 6 with cnt = -559038242"
Message-ID:  <20180126150710.GV1287@albert.catwhisker.org>
In-Reply-To: <CANCZdfqWs_1Ss_oJ0ik8r17uDRyUN8nk%2Bt9DS=zZ=j92Xz=qZA@mail.gmail.com>
References:  <20180126122947.GA1287@albert.catwhisker.org> <CANCZdfqWs_1Ss_oJ0ik8r17uDRyUN8nk%2Bt9DS=zZ=j92Xz=qZA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <david@catwhisker.org>
> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180126150710.GV1287>