From owner-freebsd-current@FreeBSD.ORG Thu Aug 25 09:22:03 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A87BD16A41F; Thu, 25 Aug 2005 09:22:03 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED41B43D45; Thu, 25 Aug 2005 09:22:02 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226]) by aiolos.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j7P9M1sI017391; Thu, 25 Aug 2005 12:22:01 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) by orion.daedalusnetworks.priv (8.13.4/8.13.4) with ESMTP id j7P9M01n000604; Thu, 25 Aug 2005 12:22:00 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by orion.daedalusnetworks.priv (8.13.4/8.13.4/Submit) id j7P9M00F000598; Thu, 25 Aug 2005 12:22:00 +0300 (EEST) (envelope-from keramida@freebsd.org) X-Authentication-Warning: orion.daedalusnetworks.priv: keramida set sender to keramida@freebsd.org using -f Date: Thu, 25 Aug 2005 12:22:00 +0300 From: Giorgos Keramidas To: Hajimu UMEMOTO Message-ID: <20050825092200.GA576@orion.daedalusnetworks.priv> References: <20050824163054.GA646@orion.daedalusnetworks.priv> <20050824210954.GA1046@gothmog.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: acpi@freebsd.org, freebsd-current@freebsd.org Subject: Re: Recent CURRENT/i386 + acpi_thermal panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 25 Aug 2005 09:22:03 -0000 On 2005-08-25 17:11, Hajimu UMEMOTO wrote: > keramida> The panic message, which I failed to copy was "sleeping without a mutex". > > Okay, the message is out when timo is zero. > > keramida> Thanks for the quick reply. I'll give a try to your patch tomorrow > keramida> morning, when I have access to that machine again. > > You are welcome. > Perhaps, I found the cause. sc->tz_zone is initialized before each > retrieval of new value from BIOS. It makes the period where > sc->tz_zone.tsp is zero. > Please try following patch, instead: This patch seems to work fine here. I've gone through at least 10 reboots (which was almost impossible with the system I use now before the patch, without triggerring at least 4-5 panics). Thank you :) > Index: sys/dev/acpica/acpi_thermal.c > diff -u -p sys/dev/acpica/acpi_thermal.c.orig sys/dev/acpica/acpi_thermal.c > --- sys/dev/acpica/acpi_thermal.c.orig Mon Aug 22 15:25:16 2005 > +++ sys/dev/acpica/acpi_thermal.c Thu Aug 25 16:46:15 2005 > @@ -347,7 +347,14 @@ acpi_tz_establish(struct acpi_tz_softc * > AcpiOsFree(sc->tz_zone.al[i].Pointer); > if (sc->tz_zone.psl.Pointer != NULL) > AcpiOsFree(sc->tz_zone.psl.Pointer); > - bzero(&sc->tz_zone, sizeof(sc->tz_zone)); > + > + /* > + * XXX: We initialize only ACPI_BUFFER to avoid race condition > + * with passive cooling thread which refers psv, tc1, tc2 and tsp. > + */ > + bzero(sc->tz_zone.ac, sizeof(sc->tz_zone.ac)); > + bzero(sc->tz_zone.al, sizeof(sc->tz_zone.al)); > + bzero(&sc->tz_zone.psl, sizeof(sc->tz_zone.psl)); > > /* Evaluate thermal zone parameters. */ > for (i = 0; i < TZ_NUMLEVELS; i++) {