Bug 3967 - Failed to acquire semaphore ACPI_MTX_HARDWARE
Failed to acquire semaphore ACPI_MTX_HARDWARE
Status: CLOSED CODE_FIX
Product: ACPI
Classification: Unclassified
Component: ACPICA-Core
i386 Linux
: P2 low
Assigned To: Robert Moore
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-30 00:08 UTC by Shaohua
Modified: 2006-09-28 13:14 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.10
Tree: Mainline
Regression: ---


Attachments
debug patch (576 bytes, patch)
2004-12-30 00:10 UTC, Shaohua
Details | Diff

Description Shaohua 2004-12-30 00:08:07 UTC
I test the latest kernel in a HP nx5000, which includes the RTC fix. I 
observed some error message:
Failed to acquire semaphore ACPI_MTX_HARDWARE

After digging out, It appears 'acpi_install_fixed_event_handler' prepares to 
install RTC handler, and in the meantime a RTC interrupt is generated. Exactly 
the interrupt is invoked when ACPICA does:
status = acpi_enable_event (event, 0);

But I can't always reproduce it. Below steps is the more reliable reproduce 
steps, but it also can't be trust.
1. Set /proc/acpi/alarm. wait it timeout
2. reboot; Then we will see the error message.
Comment 1 Shaohua 2004-12-30 00:10:40 UTC
Created attachment 4316 [details]
debug patch

I think we should clear event before try to enable event.
Attached patch seems help my system (I didn't see the error message after apply
it). But since I can't always reproduce the bug, it's hard to say if it's the
fix.
Comment 2 Shaohua 2004-12-30 01:55:46 UTC
Ok, I get the reliable reproduce steps:
1.  Set /proc/acpi/alarm. wait it timeout
Do step 1 for 3 times
2. reboot
Then I always look at the error message:
>     osl-0958 [15] os_wait_semaphore     : Failed to acquire semaphore
[df7cc544|1|0], AE_TIME
>  utmisc-0729 [14] ut_acquire_mutex      : Thread 0 could not acquire Mutex 
[ACPI_MTX_Hardware] AE_TIME
>     osl-0958 [15] os_wait_semaphore     : Failed to acquire semaphore
[df7cc544|1|0], AE_TIME
>  utmisc-0729 [14] ut_acquire_mutex      : Thread 0 could not acquire Mutex 
[ACPI_MTX_Hardware] AE_TIME

The patch in comment #1 indead fixes it for me. Please review the patch.
Comment 3 Len Brown 2005-03-03 20:28:44 UTC
Reproduced this on a Toshiba laptop as well. 
Was also able to work around the error by reverting the patch in bug #1320 which enabled the 
wake-on-RTC feature. 
 
Applied patch in comment #1 to acpi-test tree. 
Comment 4 Len Brown 2005-07-27 19:04:18 UTC
shipped in 2.6.13-rc3 - closing

Note You need to log in before you can comment on or make changes to this bug.