From owner-freebsd-stable@FreeBSD.ORG Mon Jun 26 14:36:00 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E9A216A571; Mon, 26 Jun 2006 14:36:00 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8391D44BC7; Mon, 26 Jun 2006 14:14:46 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.183.130] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis), id 0MKwpI-1Furqi1sfF-0002X0; Mon, 26 Jun 2006 16:14:00 +0200 From: Max Laier Organization: FreeBSD To: Gavin Atkinson Date: Mon, 26 Jun 2006 16:13:50 +0200 User-Agent: KMail/1.9.1 References: <20060621202508.S17514@godot.imp.ch> <20060626151138.C14714@godot.imp.ch> <1151328755.80434.17.camel@buffy.york.ac.uk> In-Reply-To: <1151328755.80434.17.camel@buffy.york.ac.uk> 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="nextPart3205480.12Vt4fEPCI"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200606261613.59057.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: freebsd-stable@freebsd.org, "Wojciech A. Koszek" , csjp@freebsd.org, Martin Blapp , Robert Watson , Patrick Guelat Subject: Re: Crash with FreeBSD 6.1 STABLE of today X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2006 14:36:00 -0000 --nextPart3205480.12Vt4fEPCI Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 26 June 2006 15:32, Gavin Atkinson wrote: > On Mon, 2006-06-26 at 15:15 +0200, Martin Blapp wrote: > > A remote stress testing of a tty session over serial cable > > with a patched kernel worked fine. > > > > How to proceed now ? The patch also applies to CURRENT > > as there where no big changes since the repo has been > > branched. > > > > Should I commit it to CURRENT ? > > > > > http://mx.imp.ch/patch-tty.t_pgrp.diff > > I'm still not convinced that the proctree lock is the correct lock to > use - maybe a new lock for the tty subsystem? Also, some of the locking > in the patch appears to be unnecessary. I can't help feeling that this > patch is the heavy-handed solution to the problem, and given how > heavyweight locks can be, maybe it's not a good solution. > > Is the problem actually understood? Do we know what's racing with what? I found kern_proc.c:461 to be a likely candidate for a race. > Given there only ever seems to be a single backtrace involved, as far as > I can tell, it's ttymodem racing with tty_close - can those two > functions alone be locked? When locking something you have to lock every access to do it right. It ma= kes=20 no sense to lock just paths that exhibit the race. Indeed a new lock for t= ty=20 would make sense, but be warned that you will have to use this lock in a=20 dozen places that are now rightfully protected with the proctree lock. So= =20 instead of one locking operation you now have to do two. The only benefit= =20 you get is reduced lock contention. I am against pushing in the heavy handed patch as well, but I rather have t= he=20 heavy handed version in than a nasty race. > Alas, I can't recreate the problem on-demand so can't really find a > better solution. =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 --nextPart3205480.12Vt4fEPCI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQBEn+unXyyEoT62BG0RAidUAJ9EgIX8uUfQOQqCaOlR21w8S/zgUwCfQ3jk s114ageSM0TTisEA/ZP/Mw8= =CrO/ -----END PGP SIGNATURE----- --nextPart3205480.12Vt4fEPCI--