From owner-freebsd-current@FreeBSD.ORG Mon Jul 1 23:09:59 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 15B4B84E; Mon, 1 Jul 2013 23:09:59 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id A59201882; Mon, 1 Jul 2013 23:09:55 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 8AFF53B2; Tue, 2 Jul 2013 01:05:09 +0200 (CEST) Date: Tue, 2 Jul 2013 01:10:11 +0200 From: Pawel Jakub Dawidek To: Mateusz Guzik , koobs@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: r248583 Kernel panic: negative refcount 0xfffffe0031b59168 Message-ID: <20130701231011.GA1406@garage.freebsd.pl> References: <51CFDC86.2040506@FreeBSD.org> <20130630111836.GB22492@dft-labs.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <20130630111836.GB22492@dft-labs.eu> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 01 Jul 2013 23:09:59 -0000 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 30, 2013 at 01:18:36PM +0200, Mateusz Guzik wrote: > On Sun, Jun 30, 2013 at 05:21:42PM +1000, Kubilay Kocak wrote: > > I'm seeing what I believe is related panic, reliably being generated by > > the Python regression test suite on a newly created FreeBSD 10-CURRENT > > buildbot. > >=20 > > Symptoms first seen in an freebsd.org FTP snapshot dated "Thu May 30 > > 20:01:46 UTC 2013" and also reproducible on a freshly updated r252400 > >=20 > > It is additionally reproducible after checking out pure upstream python > > sources, using the following steps: > >=20 > > hg clone http://hg.python.org/cpython > > cd cpython && configure && make buildbottest > >=20 > > An interesting possible correlation is that it seems to drop out > > during/around "test_socket" > >=20 >=20 > Turns out the bug is quite funny ;) >=20 > Try this: > diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c > index 5d8e814..7a4db04 100644 > --- a/sys/kern/uipc_usrreq.c > +++ b/sys/kern/uipc_usrreq.c > @@ -1764,8 +1764,8 @@ unp_externalize(struct mbuf *control, struct mbuf *= *controlp, int flags) > } > for (i =3D 0; i < newfds; i++, fdp++) { > fde =3D &fdesc->fd_ofiles[*fdp]; > - fde->fde_file =3D fdep[0]->fde_file; > - filecaps_move(&fdep[0]->fde_caps, > + fde->fde_file =3D fdep[i]->fde_file; > + filecaps_move(&fdep[i]->fde_caps, > &fde->fde_caps); > if ((flags & MSG_CMSG_CLOEXEC) !=3D 0) > fde->fde_flags |=3D UF_EXCLOSE; Thanks for tracking it down before I had time to get to it! The change looks good. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlHSDFMACgkQForvXbEpPzRnawCgxiD6AX7hF+71/YTKmcLtLEt2 bDsAnRoCZyNLXZWN0B0zyt0cD1c9WpJz =juSa -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--