On Fri, Oct 04, 2019 at 06:24:16PM -0400, k...@intricatesoftware.com wrote:
> >Synopsis:    panic after ahci0: log page read failed, slot 31 was still 
> >active
> >Category:    kernel
> >Environment:
>       System      : OpenBSD 6.6
>       Details     : OpenBSD 6.6-beta (GENERIC.MP) #245: Sat Sep 28 20:43:51 
> MDT 2019
>                        
> dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
> 
>       Architecture: OpenBSD.arm64
>       Machine     : arm64
> >Description:
>       While building lang/rust received some ahci0 messages then a panic.
>       System is a RockPro64 with 4G memory. filesystem root is on uSD, the
>       rest of the paritions are on SSD (including swap).
> >How-To-Repeat:
>       Not sure if reproducable yet. I was building lang/rust with
>       ulimit -Sd 4194304.
> >Fix:
>       Unknown
> 
> 
> ahci0: log page read failed, slot 31 was still active.
> ahci0: device didn't come ready after reset, TFD: 0x84c1<BSY,ERR>
> panic: uvm_fault failed: ffffff80003475b8

So, the 'log page read' happens when there are multiple commands active and the
port reports an error.  The log page read is supposed to tell us which command
failed.  If that fails, we fail all active commands, and if the device won't
reset after that, we shut the device off and all further io will fail.  If
that's your swap device, and the system is swapping, you're kind of screwed.

Perhaps disabling command queueing (which means there can only be one command
in flight, so no need to read the log page on errors) might help?  The diff
below should do that.  Checking the SSD out with smartctl is probably also a
good idea at this point.


diff --git sys/dev/pci/ahci_pci.c sys/dev/pci/ahci_pci.c
index 79044b52dd5..f61ae96b0cf 100644
--- sys/dev/pci/ahci_pci.c
+++ sys/dev/pci/ahci_pci.c
@@ -108,7 +108,8 @@ static const struct ahci_device ahci_devices[] = {
        { PCI_VENDOR_ATI,       PCI_PRODUCT_ATI_SBX00_SATA_6,
            NULL,               ahci_ati_sb700_attach },
 
-       { PCI_VENDOR_ASMEDIA,   PCI_PRODUCT_ASMEDIA_ASM1061_SATA },
+       { PCI_VENDOR_ASMEDIA,   PCI_PRODUCT_ASMEDIA_ASM1061_SATA,
+           NULL,               ahci_vt8251_attach },
 
        { PCI_VENDOR_INTEL,     PCI_PRODUCT_INTEL_6SERIES_AHCI_1,
            NULL,               ahci_intel_attach },

Reply via email to