From owner-freebsd-stable@FreeBSD.ORG Mon Jun 20 18:43:56 2005 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 38D3016A41F for ; Mon, 20 Jun 2005 18:43:56 +0000 (GMT) (envelope-from Philippe.Pegon@crc.u-strasbg.fr) Received: from mailhost.u-strasbg.fr (mailhost.u-strasbg.fr [130.79.200.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FF2A43D49 for ; Mon, 20 Jun 2005 18:43:55 +0000 (GMT) (envelope-from Philippe.Pegon@crc.u-strasbg.fr) Received: from sokaris.u-strasbg.fr (sokaris.u-strasbg.fr [IPv6:2001:660:2402::101]) by mailhost.u-strasbg.fr (8.13.1/jtpda-5.5pre1) with ESMTP id j5KIhs2i011688 ; Mon, 20 Jun 2005 20:43:54 +0200 (CEST) Received: from [127.0.0.1] (crc.u-strasbg.fr [IPv6:2001:660:2402:1001::1]) by sokaris.u-strasbg.fr (8.12.9/jtpda-5.5pre1) with ESMTP id j5KIhmtt044856 ; Mon, 20 Jun 2005 20:43:49 +0200 (CEST) Message-ID: <42B70E62.3080801@crc.u-strasbg.fr> Date: Mon, 20 Jun 2005 20:43:46 +0200 From: Philippe PEGON User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050326) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Philippe PEGON References: <20050617150950.F1236@kuoi.asui.uidaho.edu> <20050619161113.V83634@carver.gumbysoft.com> <20050619180740.H750@kuoi.asui.uidaho.edu> <42B7071F.30704@crc.u-strasbg.fr> In-Reply-To: <42B7071F.30704@crc.u-strasbg.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (mailhost.u-strasbg.fr [IPv6:2001:660:2402::156]); Mon, 20 Jun 2005 20:43:54 +0200 (CEST) X-Antivirus: scanned by sophos at u-strasbg.fr Cc: Mitch Parks , freebsd-stable@freebsd.org Subject: Re: 5.4-p1 crash 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, 20 Jun 2005 18:43:56 -0000 Philippe PEGON wrote: > Mitch Parks wrote: > >> On Sun, 19 Jun 2005, Doug White wrote: >> >>> On Fri, 17 Jun 2005, Mitch Parks wrote: >>> >>>> Below are details regarding another crash on a Dell 2600 SMP (HTT >>>> and USB >>>> disabled). It has been 9 days since the last crash. I didn't have >>>> the serial >>>> console in place for this last crash, but it is now. >>> >>> >>> >>> As noted, the ttwakeup() panic is a known bug. The best thing we have >>> for >>> a fix is this patch: >>> >>> http://people.freebsd.org/~mlaier/tty.t_pgrp.diff >>> >>> Please give it a try and report back if you have any more panics (or >>> don't :-) ). >> >> >> >> Thanks! This patch appears to be for 5.3, but I manually applied the >> chunk of the patch that didn't apply cleanly and the countdown is on. >> >> I'll report back in 10 days unless something bad happens before then. >> >> Below is the patch chunk #10 that I actually applied rather than the >> one given. If I've done something bad here by removing the PGRP_LOCK >> please let me know. > > > I'm not a kernel developper, but if you remove > > PGRP_LOCK(tp->t_pgrp); > > and the PGRP_UNLOCK(tp->t_pgrp) in the if condition (removed by the > orginal patch) > > there is maybe another "PGRP_UNLOCK(tp->t_pgrp);" to remove if the if > condition doesn't match, line 2528 in the original 5.4-p1 tty.c ? after having applied the patch (with your modification), there is no "sx_sunlock(&proctree_lock)" in the ttyinfo function if the three conditions failed. Maybe we have just to replace "PGRP_UNLOCK(tp->t_pgrp);" line 2528 by "sx_sunlock(&proctree_lock)" ? I think that we need the helps of a kernel developper. > >> >> .... >> Hunk #6 succeeded at 1154 (offset -51 lines). >> Hunk #7 succeeded at 1215 (offset -6 lines). >> Hunk #8 succeeded at 1203 (offset -51 lines). >> Hunk #9 succeeded at 1946 (offset -5 lines). >> Hunk #10 failed at 2562. >> Hunk #11 succeeded at 2847 (offset -212 lines). >> 1 out of 11 hunks failed--saving rejects to tty.c.rej >> >> >> @@ -2495,19 +2511,21 @@ >> * On return following a ttyprintf(), we set tp->t_rocount to >> 0 so >> * that pending input will be retyped on BS. >> */ >> + sx_slock(&proctree_lock); >> if (tp->t_session == NULL) { >> + sx_sunlock(&proctree_lock); >> ttyprintf(tp, "not a controlling terminal\n"); >> tp->t_rocount = 0; >> return; >> } >> if (tp->t_pgrp == NULL) { >> + sx_sunlock(&proctree_lock); >> ttyprintf(tp, "no foreground process group\n"); >> tp->t_rocount = 0; >> return; >> } >> - PGRP_LOCK(tp->t_pgrp); >> - if ((p = LIST_FIRST(&tp->t_pgrp->pg_members)) == 0) { >> - PGRP_UNLOCK(tp->t_pgrp); >> + if ((p = LIST_FIRST(&tp->t_pgrp->pg_members)) == NULL) { >> + sx_sunlock(&proctree_lock); >> ttyprintf(tp, "empty foreground process group\n"); >> tp->t_rocount = 0; >> return; >> >> Or the complete patch: >> http://kuoi.asui.uidaho.edu/~mitch/crash/tty_5.4.patch >> >> Mitch Parks >> mitch@kuoi.asui.uidaho.edu >> _______________________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > -- Philippe PEGON