From owner-freebsd-acpi@FreeBSD.ORG Sun Nov 25 16:17:42 2012 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 610B276B; Sun, 25 Nov 2012 16:17:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 730358FC0C; Sun, 25 Nov 2012 16:17:41 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA19686; Sun, 25 Nov 2012 18:17:40 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Tcetn-000L2c-OR; Sun, 25 Nov 2012 18:17:39 +0200 Message-ID: <50B244A1.1040800@FreeBSD.org> Date: Sun, 25 Nov 2012 18:17:37 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Stefan Farfeleder Subject: Re: ACPI panic References: <20121120103522.GB2012@mole.fafoe.narf.at> <50AC0A68.8070906@FreeBSD.org> <20121121104840.GA1468@mole.fafoe.narf.at> <20121122081831.GA1483@mole.fafoe.narf.at> <50ADFD75.10709@FreeBSD.org> <50ADFFB2.1000108@FreeBSD.org> <50AE057D.8060808@FreeBSD.org> <20121125140008.GA1497@mole.fafoe.narf.at> In-Reply-To: <20121125140008.GA1497@mole.fafoe.narf.at> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@FreeBSD.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2012 16:17:42 -0000 on 25/11/2012 16:00 Stefan Farfeleder said the following: > Hi Andriy, > > with your patch my notebook has a ~50% chance of stalling during boot. > This always happens after the "Entropy harvesting" line and I can only > power it down then. > I guess somehow cycles are introduced into the acpi objects list? The > panic was never triggered. Hmm, I didn't think that the cycles were possible... Could you please try the following patch on top of the previous ones? Also, if you don't have DDB in your kernel yet, please add it and try to break into the debugger if one of those hangs happens again without any panic. diff --git a/sys/contrib/dev/acpica/components/utilities/utcache.c b/sys/contrib/dev/acpica/components/utilities/utcache.c index edd9e4f..5eee934 100644 --- a/sys/contrib/dev/acpica/components/utilities/utcache.c +++ b/sys/contrib/dev/acpica/components/utilities/utcache.c @@ -229,6 +229,8 @@ AcpiOsReleaseObject ( (void) AcpiUtAcquireMutex (ACPI_MTX_CACHES); char *Curr; char *Next; + int Depth; + Depth = Cache->CurrentDepth; Next = Cache->ListHead; while (Next) { @@ -238,6 +240,10 @@ AcpiOsReleaseObject ( if (Object == Curr) { panic("freeing a free object %p", Object); } + Depth--; + if (Depth < 0) { + panic("cycle in a cache list"); + } } (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES); -- Andriy Gapon