From owner-freebsd-acpi@FreeBSD.ORG Tue Nov 13 15:09:48 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 124891C9; Tue, 13 Nov 2012 15:09:48 +0000 (UTC) (envelope-from Tom.Lislegaard@proact.no) Received: from am1outboundpool.messaging.microsoft.com (am1ehsobe002.messaging.microsoft.com [213.199.154.205]) by mx1.freebsd.org (Postfix) with ESMTP id 528048FC13; Tue, 13 Nov 2012 15:09:46 +0000 (UTC) Received: from mail104-am1-R.bigfish.com (10.3.201.226) by AM1EHSOBE008.bigfish.com (10.3.204.28) with Microsoft SMTP Server id 14.1.225.23; Tue, 13 Nov 2012 15:09:39 +0000 Received: from mail104-am1 (localhost [127.0.0.1]) by mail104-am1-R.bigfish.com (Postfix) with ESMTP id E3ADD3401C6; Tue, 13 Nov 2012 15:09:39 +0000 (UTC) X-Forefront-Antispam-Report: CIP:195.159.75.198; KIP:(null); UIP:(null); IPV:NLI; H:nomtaout01.proact.no; RD:nomtaout01.proact.no; EFVD:NLI X-SpamScore: -3 X-BigFish: VPS-3(zzbb2dI542M1432Izz1de0h1d18h1202h1d1ah1d2ahzz8275dhz2dh668h839h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh15d0l1155h) Received: from mail104-am1 (localhost.localdomain [127.0.0.1]) by mail104-am1 (MessageSwitch) id 1352819377316256_30371; Tue, 13 Nov 2012 15:09:37 +0000 (UTC) Received: from AM1EHSMHS012.bigfish.com (unknown [10.3.201.241]) by mail104-am1.bigfish.com (Postfix) with ESMTP id 4A1174E003F; Tue, 13 Nov 2012 15:09:37 +0000 (UTC) Received: from nomtaout01.proact.no (195.159.75.198) by AM1EHSMHS012.bigfish.com (10.3.207.112) with Microsoft SMTP Server id 14.1.225.23; Tue, 13 Nov 2012 15:09:35 +0000 Received: from Semail04.proact.local (outside.proact.se [212.214.215.3]) by nomtaout01.proact.no (Postfix) with ESMTP id BFE365DD81; Tue, 13 Nov 2012 16:09:34 +0100 (MET) Received: from SEMAIL03.proact.local ([fe80::a52b:385d:b44f:ecb9]) by Semail04.proact.local ([fe80::885:6e64:c1e6:dcf1%20]) with mapi id 14.02.0318.001; Tue, 13 Nov 2012 16:09:34 +0100 From: Tom Lislegaard To: 'Andriy Gapon' Subject: RE: AcpiOsAcquireObject crash [Was: 9-Stable panic: resource_list_unreserve: can't find resource] Thread-Topic: AcpiOsAcquireObject crash [Was: 9-Stable panic: resource_list_unreserve: can't find resource] Thread-Index: AQHNvc81+Z+//tujgE2NCdmsWuXGgZfhbFxQgAAIXwCABmv7oA== Date: Tue, 13 Nov 2012 15:09:33 +0000 Message-ID: References: <509172F6.2040400@FreeBSD.org> <5092F209.7090803@FreeBSD.org> <50979BCD.3060000@FreeBSD.org> <5097CB27.8040802@FreeBSD.org> <5097F24D.7040206@FreeBSD.org> <50995C8F.3040309@FreeBSD.org> <509B8F15.4030300@FreeBSD.org> <509BDF86.3080502@FreeBSD.org> <509D091A.8080108@FreeBSD.org> In-Reply-To: <509D091A.8080108@FreeBSD.org> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.7.1.59] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: proact.no 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: Tue, 13 Nov 2012 15:09:48 -0000 > -----Original Message----- > From: Andriy Gapon [mailto:avg@FreeBSD.org] > Sent: 9. november 2012 14:46 > To: Tom Lislegaard > Cc: freebsd-acpi@FreeBSD.org > Subject: Re: AcpiOsAcquireObject crash [Was: 9-Stable panic: resource_lis= t_unreserve: can't find > resource] >=20 > on 09/11/2012 14:17 Tom Lislegaard said the following: > > kgdb) up 7 > > #7 0xffffffff802d1bdd in AcpiOsAcquireObject (Cache=3D0xfffffe00052bac= 60) at > /usr/src/sys/contrib/dev/acpica/utilities/utcache.c:316 > > 316 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, > > (kgdb) x/9a Cache->ListHead > > 0xfffffffeec85c730: Cannot access memory at address 0xfffffffeec85c730 >=20 > [Slaps forehead] Ah, right, indeed.on > I guess the problem hasn't happened again since then? > Does the patch appear to work OK so far (with respect to the original pro= blem)? > You're right, I haven't had any occurrence of the 'resource_list_unreserve'= panic since the original patch. The patch below works badly on my system. I notice that certain processes s= tart to hang, for instance during boot I have to interrupt /etc/rc.d/initra= ndom to continue. Xorg also hangs and if I log in on another terminal I see= the process is in processorstate 'acmtx'.=20 The kernel msg buffer is full of messages like this ACPI Error: Could not acquire AML Interpreter mutex (20110527/exutils-107) ACPI Exception: AE_ERROR, Thread 100076 could not acquire Mutex [0x8] (2011= 0527/utmutex-315) ACPI Error: Mutex [0x8] is not acquired, cannot release (20110527/utmutex-3= 59) ACPI Error: Mutex [0x0] is not acquired, cannot release (20110527/utmutex-3= 59) ACPI Error: Could not release AML Interpreter mutex (20110527/exutils-177) -tom > I have a suspicion about what causes the new problem. > If it is correct then the following experimental patch may help with it: >=20 > --- a/sys/contrib/dev/acpica/components/utilities/utdelete.c > +++ b/sys/contrib/dev/acpica/components/utilities/utdelete.c > @@ -415,6 +415,8 @@ AcpiUtUpdateRefCount ( > return; > } >=20 > + (void) AcpiUtAcquireMutex (ACPI_MTX_REFCOUNTS); > + > Count =3D Object->Common.ReferenceCount; > NewCount =3D Count; >=20 > @@ -490,6 +492,8 @@ AcpiUtUpdateRefCount ( > ACPI_WARNING ((AE_INFO, > "Large Reference Count (0x%X) in object %p", Count, Object))= ; > } > + > + (void) AcpiUtReleaseMutex (ACPI_MTX_REFCOUNTS); > } >=20 >=20 >=20 > --- a/sys/contrib/dev/acpica/include/aclocal.h > +++ b/sys/contrib/dev/acpica/include/aclocal.h > @@ -89,8 +89,9 @@ union acpi_parse_object; > #define ACPI_MTX_MEMORY 5 /* Debug memory tracking lis= ts */ > #define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */ > #define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */ > +#define ACPI_MTX_REFCOUNTS 8 /* ACPI object reference cou= nts */ >=20 > -#define ACPI_MAX_MUTEX 7 > +#define ACPI_MAX_MUTEX 8 > #define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1 >=20 >=20 >=20 > -- > Andriy Gapon