Ticket #2175 (closed bug: duplicate)
Panic in AHCI interrupt handling.
| Reported by: | bga | Owned by: | bonefish |
|---|---|---|---|
| Priority: | critical | Milestone: | R1 |
| Component: | Drivers/Disk | Version: | R1 development |
| Cc: | marcusoverhagen | Blocked By: | |
| Platform: | All | Blocking: |
Description
I am running Haiku in a quad core machine with SATA drives in AHCI mode. Since recently (I only noticed it yesterday) I started getting KDLs in the AHCI interrupt handling. The KDL is the result of a panic() that is triggered. Here is the relevant code:
void AHCIPort::Interrupt() {
uint32 is = fRegs->is; uint32 ci = fRegs->ci; fRegs->is = is; // clear interrupts
RWTRACE("AHCIPort::Interrupt port %d, fCommandsActive 0x%08lx, is 0x%08lx, ci 0x%08lx\n", fIndex, fCommandsActive, is, ci);
if (is & PORT_INT_ERROR)
TRACE("AHCIPort::Interrupt port %d, fCommandsActive 0x%08lx, is 0x%08lx, ci 0x%08lx\n", fIndex, fCommandsActive, is, ci);
if (is & PORT_INT_FATAL)
panic("ahci fatal error, is 0x%08lx", is);
int release = 0;
acquire_spinlock(&fSpinlock); if ((fCommandsActive & 1) && !(ci & 1)) {
release = 1; fCommandsActive &= ~1;
} release_spinlock(&fSpinlock);
if (release)
release_sem_etc(fResponseSem, 1, B_RELEASE_IF_WAITING_ONLY | B_DO_NOT_RESCHEDULE);
}
I wonder if recent changes to locking primitives or something else broke it. As I mentioned, this is new and I did not noticed getting it even once before yesterday (wehn I got it 2 times just after unzipping the source tree inside Haiku and literally when doing nothing (the crash was inside one of the idle threads).
I don't have the KDL here with me, but I will capture it the next time I see it and attach to the bug.
