Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Nov 2012 15:09:33 +0000
From:      Tom Lislegaard <Tom.Lislegaard@proact.no>
To:        'Andriy Gapon' <avg@FreeBSD.org>
Cc:        "freebsd-acpi@FreeBSD.org" <freebsd-acpi@FreeBSD.org>
Subject:   RE: AcpiOsAcquireObject crash [Was: 9-Stable panic: resource_list_unreserve: can't find resource]
Message-ID:  <E8A24BEFDC390C4491718DEE8A9C4F20924820@Semail03.proact.local>
In-Reply-To: <509D091A.8080108@FreeBSD.org>
References:  <E8A24BEFDC390C4491718DEE8A9C4F2091F824@Semail03.proact.local> <509172F6.2040400@FreeBSD.org> <E8A24BEFDC390C4491718DEE8A9C4F2091FC33@Semail03.proact.local> <5092F209.7090803@FreeBSD.org> <E8A24BEFDC390C4491718DEE8A9C4F20920DD1@Semail03.proact <5093BECC.1030709@FreeBSD.org> <E8A24BEFDC390C4491718DEE8A9C4F20921BAC@Semail03.proact.local> <50979BCD.3060000@FreeBSD.org> <E8A24BEFDC390C4491718DEE8A9C4F20921C47@Semail03.proact.local> <5097CB27.8040802@FreeBSD.org> <E8A24BEFDC390C4491718DEE8A9C4F20921C6A@Semail03.proact.local> <5097F24D.7040206@FreeBSD.org> <E8A24BEFDC390C4491718DEE8A9C4F209220E2@Semail03.proact.local> <50995C8F.3040309@FreeBSD.org> <E8A24BEFDC390C4491718DEE8A9C4F20922E13@Semail03.proact.local> <509B8F15.4030300@FreeBSD.org> <E8A24BEFDC390C4491718DEE8A9C4F20922F57@Semail03.proact.local> <509BDF86.3080502@FreeBSD.org> <E8A24BEFDC390C4491718DEE8A9C4F2092347A@Semail03.proact.local> <509D091A.8080108@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


> -----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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E8A24BEFDC390C4491718DEE8A9C4F20924820>