Date: Fri, 15 May 2009 16:06:09 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Chris Timmons <cwt@networks.cwu.edu> Cc: freebsd-stable@freebsd.org, Martin Sugioarto <nakal@web.de>, John Baldwin <jhb@freebsd.org> Subject: Re: kernel trap 12 with interrupts disabled [bge0 on 7.2R] Message-ID: <20090515130609.GG1927@deviant.kiev.zoral.com.ua> In-Reply-To: <20090515053142.D17400@n.cwu.edu> References: <1696198956@web.de> <20090514091410.H12558@n.cwu.edu> <20090514093008.Q12558@n.cwu.edu> <200905141317.56551.jhb@freebsd.org> <20090514152838.E12558@n.cwu.edu> <20090515082458.GB1927@deviant.kiev.zoral.com.ua> <20090515053142.D17400@n.cwu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--JbKQpFqZXJ2T76Sg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 15, 2009 at 05:32:49AM -0700, Chris Timmons wrote: >=20 > #8 0xc076cf64 in devfs_fp_check (fp=3D0xc78fadf4, devp=3D0xee156b0c,=20 > dswp=3D0xee156b08) at /usr/src/sys/fs/devfs/devfs_vnops.c:89 > 89 *dswp =3D devvn_refthread(fp->f_vnode, devp); >=20 > (kgdb) p *(struct file *)0xc78fadf4 > $1 =3D {f_list =3D {le_next =3D 0xc78ab5f0, le_prev =3D 0xc789e5f0}, f_ty= pe =3D 1,=20 > f_data =3D 0xce5f9b00, f_flag =3D 3, f_mtxp =3D 0xc74540a0, f_ops =3D 0xc= 0c48e80,=20 > f_cred =3D 0xc7ae1c00, f_count =3D 2, f_vnode =3D 0xc90f4000, f_offset = =3D 0,=20 > f_vnread_flags =3D 0, f_gcflag =3D 0, f_msgcount =3D 0, f_seqcount =3D 1,= =20 > f_nextoff =3D 0, f_label =3D 0x0, f_cdevpriv =3D 0x0} >=20 >=20 >=20 > On Fri, 15 May 2009, Kostik Belousov wrote: >=20 > >>#8 0xc076cf64 in devfs_fp_check (fp=3D0xc78fadf4, devp=3D0xee156b0c, > >>dswp=3D0xee156b08) at /usr/src/sys/fs/devfs/devfs_vnops.c:89 > >Please, show the output of > >p *(struct file *)0xc78fadf4 The file structure in the dump is fully initialized. It seems that the issue is with devfs replacing file ops vector with devfs-specific one in devfs_open() before the struct file is fully initialized in vn_open. Please, try the patch below (against 7) and report results. Index: fs/devfs/devfs_vnops.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 --- fs/devfs/devfs_vnops.c (revision 192089) +++ fs/devfs/devfs_vnops.c (working copy) @@ -890,6 +890,7 @@ if (fp !=3D NULL) { FILE_LOCK(fp); fp->f_data =3D dev; + fp->f_vnode =3D vp; FILE_UNLOCK(fp); } fpop =3D td->td_fpop; --JbKQpFqZXJ2T76Sg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkoNaMEACgkQC3+MBN1Mb4gXoACg6YycyS3NTGo9D+/QVMCT81M3 jSEAoIFaJZk6lu3pE89agkKHqQZGAgal =Cg2x -----END PGP SIGNATURE----- --JbKQpFqZXJ2T76Sg--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090515130609.GG1927>