Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jun 2007 23:28:55 GMT
From:      Alan Grow <alangrow+b9d2265c@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/114113: ACPI kernel panic during S3 suspend / resume
Message-ID:  <200706282328.l5SNStXR077111@www.freebsd.org>
Resent-Message-ID: <200706282330.l5SNU9Tr035126@freefall.freebsd.org>

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

>Number:         114113
>Category:       kern
>Synopsis:       ACPI kernel panic during S3 suspend / resume
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 28 23:30:09 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Alan Grow
>Release:        -CURRENT
>Organization:
>Environment:
FreeBSD host 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Thu Jun 28 16:09:35 EDT 2007     root@host:/usr/obj/usr/src/sys/HOST  i386
>Description:
A -CURRENT build from yesterday panics every time on S3 suspend / resume:

panic: _mtx_lock_sleep: recursed on non_recursive mutex acpi subsystem GPE lock @ ../../../dev/acpica/Osd/OsdSynch.c


>How-To-Repeat:
$ acpiconf -s 3
>Fix:
The tip-off is in sys/contrib/dev/acpica/CHANGES.txt: "All interfaces to the global lock now allow the same thread to acquire the lock multiple times." However, mtx_init() is still called without the MTX_RECURSE flag in sys/dev/acpica/Osd/OsdSynch.c. The following patch fixes it for me:


--- sys/dev/acpica/Osd/OsdSynch.c.orig	2007-06-28 18:35:07.000000000 -0400
+++ sys/dev/acpica/Osd/OsdSynch.c	2007-03-26 19:04:02.000000000 -0400
@@ -92,7 +92,7 @@
     if ((as = malloc(sizeof(*as), M_ACPISEM, M_NOWAIT | M_ZERO)) == NULL)
 	return_ACPI_STATUS (AE_NO_MEMORY);
 
-    mtx_init(&as->as_mtx, "ACPI semaphore", NULL, MTX_DEF | MTX_RECURSE);
+    mtx_init(&as->as_mtx, "ACPI semaphore", NULL, MTX_DEF);
     as->as_units = InitialUnits;
     as->as_maxunits = MaxUnits;
     as->as_pendings = as->as_resetting = as->as_timeouts = 0;
@@ -346,7 +346,7 @@
 	snprintf(h->name, sizeof(h->name), "acpi subsystem HW lock");
     else
 	snprintf(h->name, sizeof(h->name), "acpi subsys %p", OutHandle);
-    mtx_init(&h->lock, h->name, NULL, MTX_DEF | MTX_RECURSE);
+    mtx_init(&h->lock, h->name, NULL, MTX_DEF);
     *OutHandle = (ACPI_SPINLOCK)h;
     return (AE_OK);
 }

>Release-Note:
>Audit-Trail:
>Unformatted:



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