From owner-cvs-all@FreeBSD.ORG Thu Sep 14 01:20:07 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32A0716A47C; Thu, 14 Sep 2006 01:20:07 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EE4A43D7B; Thu, 14 Sep 2006 01:19:59 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.185.148] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis), id 0MKxQS-1GNftW3EUp-0005cI; Thu, 14 Sep 2006 03:19:58 +0200 From: Max Laier Organization: FreeBSD To: Martin Blapp Date: Thu, 14 Sep 2006 03:19:47 +0200 User-Agent: KMail/1.9.3 References: <200609131547.k8DFlrmv012940@repoman.freebsd.org> <20060913234613.S1494@godot.imp.ch> In-Reply-To: <20060913234613.S1494@godot.imp.ch> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart15493826.0phNsZjQF4"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200609140319.57943.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: src-committers@freebsd.org, jhb@freebsd.org, cvs-src@freebsd.org, "Christian S.J. Peron" , cvs-all@freebsd.org, bde@freebsd.org, phk@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_exit.c (DEVFS bug) ? X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2006 01:20:07 -0000 --nextPart15493826.0phNsZjQF4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 13 September 2006 23:54, Martin Blapp wrote: > Hi all, > > The kernel I've made with 'mtx_assert(&Giant, MA_OWNED);' in all tty > functions works fine. I'm not able to crash it yet, even under 24 hour > load. Strange. Probably the asserts screw up the timing just enough to "fix"=20 the problem. Could you try to narrow down the asserts to the places=20 where t_session (we still agree that's the problem?) is accessed? > > But I have also seen what appears to be strange interactions or races > > between devfs and the TTY code before the Giant push down here, which > > was causing me some problems. After some discussions with John and > > Bruce, it looks like the manipulation of t_session should be > > protected by Giant. > > I Agree. This backout doesn't solve this panic here. I got this panic > on FreeBSD 5.3 RELEASE and 5.4 RELEASE too. Exactly the same trace. > And revision 1.272 never made it into RELENG_5. > > #1 0xc066355e in boot (howto=3D260) at > /usr/src/sys/kern/kern_shutdown.c:409 #2 0xc06638b5 in panic > (fmt=3D0xc0891732 "%s") at /usr/src/sys/kern/kern_shutdown.c:565 #3=20 > 0xc085c6b6 in trap_fatal (frame=3D0xed6e4ab8, eva=3D4) at > /usr/src/sys/i386/i386/trap.c:836 #4 0xc085c3bf in trap_pfault > (frame=3D0xed6e4ab8, usermode=3D0, eva=3D4) at > /usr/src/sys/i386/i386/trap.c:744 #5 0xc085bfb5 in trap (frame=3D > {tf_fs =3D 8, tf_es =3D 40, tf_ds =3D -1063714776, tf_edi =3D > -1064042304, tf_esi =3D 0, tf_ebp =3D -311538944, tf_isp =3D -311538972, > tf_ebx > =3D -967615488, tf_edx =3D -1063651212, tf_ecx =3D -941099136, tf_eax =3D= 0, > tf_trapno =3D 12, tf_err =3D 0, tf_eip =3D -1066845359, tf_cs =3D 32, > tf_eflags =3D 66194, tf_esp =3D -967615488, tf_ss =3D 0}) > at /usr/src/sys/i386/i386/trap.c:434 > #6 0xc0848bea in calltrap () at /usr/src/sys/i386/i386/exception.s:139 > #7 0xc0693b51 in ttymodem (tp=3D0xc6535c00, flag=3D-1063651212) at > /usr/src/sys/kern/tty.c:1659 #8 0xc0698362 in ptcclose (dev=3D0x0, > flags=3D3, fmt=3D8192, td=3D0xc7e7f780) at linedisc.h:136 #9 0xc0638a6f = in > giant_close (dev=3D0xcb3c1100, fflag=3D3, devtype=3D8192, td=3D0xc7e7f780= ) at > /usr/src/sys/kern/kern_conf.c:266 #10 0xc06162bf in devfs_close > (ap=3D0xed6e4b7c) at /usr/src/sys/fs/devfs/devfs_vnops.c:287 #11 > 0xc086dc1c in VOP_CLOSE_APV (vop=3D0x0, a=3D0xc099f874) at vnode_if.c:426 > #12 0xc06c87e2 in vn_close (vp=3D0xc9cdf660, flags=3D3, file_cred=3D0x0, > td=3D0xc7e7f780) at vnode_if.h:227 #13 0xc06c974a in vn_closefile > (fp=3D0xc6fc5438, td=3D0xc7e7f780) at /usr/src/sys/kern/vfs_vnops.c:865 #= 14 > 0xc06162e7 in devfs_close_f (fp=3D0xc6fc5438, td=3D0xc7e7f780) at > /usr/src/sys/fs/devfs/devfs_vnops.c:297 #15 0xc0642cdc in fdrop_locked > (fp=3D0xc6fc5438, td=3D0xc7e7f780) at file.h:295 #16 0xc0642c29 in fdrop > (fp=3D0xc6fc5438, td=3D0xc7e7f780) at /usr/src/sys/kern/kern_descrip.c:21= 22 > #17 0xc06411c7 in closef (fp=3D0xc6fc5438, td=3D0xc7e7f780) at > /usr/src/sys/kern/kern_descrip.c:1942 #18 0xc063e329 in close > (td=3D0xc7e7f780, uap=3D0x0) at /usr/src/sys/kern/kern_descrip.c:1007 > > > Back out one of the Giant removals from revision 1.272. Giant was > > not here to protect the vnode, it was present to synchronize access > > to TTY session information between exit(2) and the TTY code. While we > > are here, note that Giant is required for TTY protection. > > > > Clue from: bde > > Discussed with: jhb > > MFC after: 1 week > > > > Revision Changes Path > > 1.290 +2 -2 src/sys/kern/kern_exit.c =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart15493826.0phNsZjQF4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFCK49XyyEoT62BG0RAvskAJ967IWmbciDMAFm98kiRy1fT2mTYQCfWLUE i0dPqU6k6BUhCaat11JzzeA= =2OtX -----END PGP SIGNATURE----- --nextPart15493826.0phNsZjQF4--