Here is the output of dmesg with debugging enabled on ahci, running with
-current that I pulled down a few hours ago. The line matches up with the
driver which is an improvement.
ddb{0}> dmesg
OpenBSD 6.0-current (GENERIC.MP) #1: Wed Feb 1 02:14:31 EST 2017
[email protected].:/usr/src/sys/arch/amd64/compile/
GENERIC.MP
real mem = 4261076992 (4063MB)
avail mem = 4127272960 (3936MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdffb7020 (7 entries)
bios0: vendor coreboot version "88a4f96" date 03/11/2016
bios0: PC Engines apu2
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S2 S3 S4 S5
acpi0: tables DSDT FACP SSDT APIC HEST SSDT SSDT HPET
acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PBR8(S4)
UOH
1(S3) UOH3(S3) UOH5(S3) XHC0(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD GX-412TC SOC, 998.28 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,C
FLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,PO
PCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMC
R8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
64b/line 16
-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: TSC frequency 998277310 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD GX-412TC SOC, 998.13 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,C
FLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,PO
PCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMC
R8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
64b/line 16
-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD GX-412TC SOC, 998.13 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,C
FLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,PO
PCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMC
R8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1
cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
64b/line 16
-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD GX-412TC SOC, 998.13 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,C
FLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,PO
PCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMC
R8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1
cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
64b/line 16
-way L2 cache
cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 21, 24 pins
ioapic1 at mainbus0: apid 5 pa 0xfec20000, version 21, 32 pins
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PBR4)
acpiprt2 at acpi0: bus 1 (PBR5)
acpiprt3 at acpi0: bus 2 (PBR6)
acpiprt4 at acpi0: bus 3 (PBR7)
acpiprt5 at acpi0: bus -1 (PBR8)
acpicpu0 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpicpu1 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpicpu2 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpicpu3 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpibtn0 at acpi0: PWRB
"PNP0501" at acpi0 not configured
cpu0: 998 MHz: speeds: 1000 800 600 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 16h Root Complex" rev 0x00
pchb1 at pci0 dev 2 function 0 "AMD AMD64 16h Host" rev 0x00
ppb0 at pci0 dev 2 function 2 "AMD AMD64 16h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
em0 at pci1 dev 0 function 0 "Intel I210" rev 0x03: msi, address
00:0d:b9:42:75
:94
ppb1 at pci0 dev 2 function 3 "AMD AMD64 16h PCIE" rev 0x00: msi
pci2 at ppb1 bus 2
em1 at pci2 dev 0 function 0 "Intel I210" rev 0x03: msi, address
00:0d:b9:42:75
:95
ppb2 at pci0 dev 2 function 4 "AMD AMD64 16h PCIE" rev 0x00: msi
pci3 at ppb2 bus 3
em2 at pci3 dev 0 function 0 "Intel I210" rev 0x03: msi, address
00:0d:b9:42:75
:96
"AMD CCP" rev 0x00 at pci0 dev 8 function 0 not configured
xhci0 at pci0 dev 16 function 0 "AMD Bolton xHCI" rev 0x11: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00
add
r 1
ahci0 at pci0 dev 17 function 0 "AMD Hudson-2 SATA" rev 0x40: apic 4 int
19, GH
C 0x0 AHCI 1.3
ahci0: capabilities
0xf733ff01<S64A,NCQ,SSNTF,SMPS,SALP,SAL,SCLO,SPM,FBSS,PMD,S
SC,PSC>, 2 ports, 32 cmds, gen 3 (6.0Gb/s)
ahci0: extended capabilities 0x0
ahci0: ports implemented: 0x00000003
ahci0.0: port reset
ahci0.0: PMP probe 2
ahci0.0: sending PMP reset cmd
ahci0.0: sending PMP probe status cmd
ahci0.0: ccb in slot 1 errored
ahci0.0: PMP probe cmd timed out
ahci0.0: timed out 1, active 0, count 0
ahci0.0: PMP probe status cmd failed
ahci0.0: PMP probe 1
ahci0.0: sending PMP reset cmd
ahci0.0: sending PMP probe status cmd
ahci0.0: ccb in slot 1 errored
ahci0.0: PMP probe cmd timed out
ahci0.0: timed out 1, active 0, count 0
ahci0.0: PMP probe status cmd failed
ahci0.0: no PMP found, resetting the port
ahci0.0: port reset
ahci0: detected device on port 0; 0
ahci0.0: port 0: 6.0Gb/s
ahci0.1: port reset
ahci0.1: PMP probe 2
ahci0.1: sending PMP reset cmd
ahci0.1: sending PMP probe status cmd
ahci0.1: ccb in slot 1 errored
ahci0.1: PMP probe cmd timed out
ahci0.1: timed out 1, active 0, count 0
ahci0.1: PMP probe status cmd failed
ahci0.1: PMP probe 1
ahci0.1: sending PMP reset cmd
ahci0.1: sending PMP probe status cmd
ahci0.1: ccb in slot 1 errored
ahci0.1: PMP probe cmd timed out
ahci0.1: timed out 1, active 0, count 0
ahci0.1: PMP probe status cmd failed
ahci0.1: no PMP found, resetting the port
ahci0.1: port reset
ahci0: detected device on port 1; 0
ahci0.1: port 1: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SATA SSD, S9FM> SCSI3 0/direct fixed
t10.AT
A_SATA_SSD_8EC60766164804905620
sd0: 15272MB, 512 bytes/sector, 31277232 sectors, thin
sd1 at scsibus1 targ 1 lun 0: <ATA, Crucial_CT250MX2, MU04> SCSI3 0/direct
fixe
d naa.500a0751136e86ac
sd1: 238475MB, 512 bytes/sector, 488397168 sectors, thin
ehci0 at pci0 dev 19 function 0 "AMD Hudson-2 USB2" rev 0x39: apic 4 int 18
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "AMD EHCI root hub" rev 2.00/1.00
add
r 1
piixpm0 at pci0 dev 20 function 0 "AMD Hudson-2 SMBus" rev 0x42: SMBus
disabled
pcib0 at pci0 dev 20 function 3 "AMD Hudson-2 LPC" rev 0x11
sdhc0 at pci0 dev 20 function 7 "AMD Bolton SD/MMC" rev 0x01: apic 4 int 16
sdhc0: SDHC 2.0, 63 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed, dma
pchb2 at pci0 dev 24 function 0 "AMD AMD64 16h Link Cfg" rev 0x00
pchb3 at pci0 dev 24 function 1 "AMD AMD64 16h Address Map" rev 0x00
pchb4 at pci0 dev 24 function 2 "AMD AMD64 16h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 16h Misc Cfg" rev 0x00
pchb5 at pci0 dev 24 function 4 "AMD AMD64 16h CPU Power" rev 0x00
pchb6 at pci0 dev 24 function 5 "AMD AMD64 16h Misc Cfg" rev 0x00
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
wbsio0 at isa0 port 0x2e/2: NCT5104D rev 0x52
vmm at mainbus0 not configured
uhub2 at uhub1 port 1 configuration 1 interface 0 "Advanced Micro Devices
produ
ct 0x7900" rev 2.00/0.18 addr 2
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (402af328685601ff.a) swap on sd0b dump on sd0b
Process (pid 1) got signal 31
ahci0.1: errored slot -1, TFD: 441<ERR>, SERR: 0, DIAG: 8<B>
ahci0.1: read log page
ahci0.1: NCQ errored slot 6
panic: kernel diagnostic assertion "ccb->ccb_xa.state == ATA_S_ONCHIP"
failed: f
ile "/usr/src/sys/dev/ic/ahci.c", line 2185
Stopped at Debugger+0x9: leave
TID PID UID PRFLAGS PFLAGS CPU COMMAND
Debugger() at Debugger+0x9
panic() at panic+0xfe
__assert() at __assert+0x25
ahci_port_intr() at ahci_port_intr+0xa44
ahci_intr() at ahci_intr+0x54
intr_handler() at intr_handler+0x67
Xintr_ioapic_level0() at Xintr_ioapic_level0+0xcd
--- interrupt ---
acpicpu_idle() at acpicpu_idle+0x13c
cpu_idle_cycle() at cpu_idle_cycle+0x10
end trace frame: 0x0, count: 6
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
On Sun, Jan 29, 2017 at 3:12 AM, Jonathan Matthew <[email protected]> wrote:
> On Wed, Jan 18, 2017 at 03:04:21AM +0000, Sanka Coffie wrote:
> > Just installed -current and am hitting a kernel panic on boot:
> >
> > panic: kernel diagnostic assertion "ccb->ccb_xa.state =3D=3D
> ATA_S_ONCHIP"
> > failed: file "../../../../dev/ic/ahci.c", line 2174
>
> This indicates the SATA controller reported an error for a command that had
> already completed, or for a command slot that wasn't in use at all.
> Can you narrow it down to one of the SSDs in that system? Do those SSDs
> work properly in other machines?
>
> Are you able to build a custom kernel and boot it on the APU? If so, the
> first
> thing to do would be to enable ahci debug output by changing the
> #define NO_AHCI_DEBUG line at the top of src/sys/dev/ic/ahcivar.h - this
> won't
> fix the panic but it'll tell us where the error information is coming from.
> Depending on what output you get from that, there are a few more things to
> try.
>