NetBSD Problem Report #57696

From www@netbsd.org  Mon Nov 13 07:08:01 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2C3391A9238
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 13 Nov 2023 07:08:01 +0000 (UTC)
Message-Id: <20231113070759.33D4C1A9239@mollari.NetBSD.org>
Date: Mon, 13 Nov 2023 07:07:59 +0000 (UTC)
From: JMoyer@NODOMAIN.NET
Reply-To: JMoyer@NODOMAIN.NET
To: gnats-bugs@NetBSD.org
Subject: NetBSD-10.0_RC1-amd64-install.img.gz kernel panics at reboot or shutdown on mid 2010 21.5" iMac
X-Send-Pr-Version: www-1.0

>Number:         57696
>Category:       kern
>Synopsis:       NetBSD-10.0_RC1-amd64-install.img.gz kernel panics at reboot or shutdown on mid 2010 21.5" iMac
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 13 07:10:00 +0000 2023
>Last-Modified:  Fri Nov 17 14:35:01 +0000 2023
>Originator:     Josh Moyer
>Release:        10_RC1
>Organization:
NODOMAIN.NET
>Environment:
NetBSD  10.0_RC1 NetBSD 10.0_RC1 (GENERIC) #0: Sun Nov  5 18:30:08 UTC 2023  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
NetBSD-10.0_RC1-amd64-install.img.gz kernel crashes at reboot or shutdown on mid 2010 21.5" iMac

kernel: page fault trap, code=0
Stopped in pid 172.172 (reboot) at      netbsd:usb_pci_rem+0x29        movq %rdx,0(%rax)
usb_pci_rem() at netbsd:usb_pci_rem+0x29
config_detach() at netbsd:config_detach+0xfc
config_detach_all() at netbsd:config_detach_all+0xc8
cpu_reboot() at netbsd:cpu_reboot+0x1c0
kern_reboot() at netbsd:kern_reboot+0x6c
sys_reboot() at netbsd:sys_reboot+0x63
syscall() at netbsd:syscall+0x1fc
--- syscall (number 208) ---

Note: I tried to analyze this panic (netbsd.4.core -- for my reference) per the panic wiki with gdb, crash and addr2line, but all three seem broken, sadly.

Note: The system -- once installed -- does not have any trouble rebooting. (Shutdown is a different story/bug.)

Note: I diff'd the image and installed kernel and they were identical, so, perhaps something related to booting off the SD card?

Note: This problem did not repro on a vmware virtual machine booted off the same SD card -- albeit with a USB sd reader.
>How-To-Repeat:
Boot from NetBSD-10.0_RC1-amd64-install.img.gz on a mid 2010 21.5" iMac then reboot or shutdown the machine. 100% repro on my system.

Note: Booted the image from an 8GB microSD card w/the built-in SD card slot and a microSD to SD adapter.
>Fix:
N/A

>Audit-Trail:
From: Taylor R Campbell <riastradh@NetBSD.org>
To: Josh Moyer <JMoyer@NODOMAIN.NET>
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org,
	dyoung@NetBSD.org
Subject: Re: kern/57696: NetBSD-10.0_RC1-amd64-install.img.gz kernel panics at reboot or shutdown on mid 2010 21.5" iMac
Date: Mon, 13 Nov 2023 15:03:04 +0000

 Can you share dmesg?  Maybe dmesg with `boot -v -x'?

 Looks like the failed attach path in ohci(4) and uhci(4) won't put the
 device on the usb_pci list, which breaks detach because detach assumes
 it is on the list.

 That said, I'm not sure why we set DVF_DETACH_SHUTDOWN for ohci(4) and
 uhci(4) in the first place to make them detach on shutdown; it was set
 by dyoung@ in 2009 with a commit message that doesn't say anything
 about why the change was made.  dyoung: Do you remember anything?

 We can fix the interaction of failed attach with detach, or we can
 remove DVF_DETACH_SHUTDOWN, but there's probably an underlying problem
 on attach that the dmesg will provide hints about, and that's what we
 should really try to fix.

From: Josh Moyer <JMoyer@nodomain.net>
To: Taylor R Campbell <riastradh@NetBSD.org>
Cc: "gnats-bugs@NetBSD.org" <gnats-bugs@NetBSD.org>, "netbsd-bugs@NetBSD.org"
	<netbsd-bugs@NetBSD.org>, "dyoung@NetBSD.org" <dyoung@NetBSD.org>
Subject: RE: kern/57696: NetBSD-10.0_RC1-amd64-install.img.gz kernel panics at
 reboot or shutdown on mid 2010 21.5" iMac
Date: Mon, 13 Nov 2023 15:15:53 +0000

 Thanks for the reply.  I actually saw this repro (and got a kernel dump) wh=
 en booted of the hard disk, which invalidates my hypothesis that it was rel=
 ated to the SD card.  dmesg from that (although without -v -x):

 [     1.000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 200=
 3,
 [     1.000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2=
 013,
 [     1.000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2=
 023
 [     1.000000]     The NetBSD Foundation, Inc.  All rights reserved.
 [     1.000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
 [     1.000000]     The Regents of the University of California.  All right=
 s reserved.

 [     1.000000] NetBSD 10.0_RC1 (GENERIC) #0: Sun Nov  5 18:30:08 UTC 2023
 [     1.000000] 	mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile=
 /GENERIC
 [     1.000000] total memory =3D 4022 MB
 [     1.000000] avail memory =3D 3856 MB
 [     1.000000] timecounter: Timecounters tick every 10.000 msec
 [     1.000000] Kernelized RAIDframe activated
 [     1.000000] [   383.000000] radeon* disabled
 [     1.000000] RTC BIOS diagnostic error 0x76<ROM_cksum,config_unit,memory=
 _size,invalid_time>
 [     1.000000] timecounter: Timecounter "i8254" frequency 1193182 Hz quali=
 ty 100
 [     1.000004] efi: systbl at pa bf75ef18
 [     1.000004] mainbus0 (root)
 [     1.000004] ACPI: RSDP 0x00000000BF70E014 000024 (v02 APPLE )
 [     1.000004] ACPI: XSDT 0x00000000BF70E1C0 00007C (v01 APPLE  Apple00  0=
 000F000      01000013)
 [     1.000004] ACPI: FACP 0x00000000BF70B000 0000F4 (v04 APPLE  Apple00  0=
 000F000 Loki 0000005F)
 [     1.000004] ACPI: DSDT 0x00000000BF6FF000 00571C (v01 APPLE  iMac     0=
 0110001 INTL 20061109)
 [     1.000004] ACPI: FACS 0x00000000BF679000 000040
 [     1.000004] ACPI: ASF! 0x00000000BF70D000 0000A5 (v32 APPLE  Apple00  0=
 0000001 Loki 0000005F)
 [     1.000004] ACPI: HPET 0x00000000BF70A000 000038 (v01 APPLE  Apple00  0=
 0000001 Loki 0000005F)
 [     1.000004] ACPI: APIC 0x00000000BF709000 0000BC (v01 APPLE  Apple00  0=
 0000001 Loki 0000005F)
 [     1.000004] ACPI: APIC 0x00000000BF708000 0000BC (v02 APPLE  Apple00  0=
 0000001 Loki 0000005F)
 [     1.000004] ACPI: SBST 0x00000000BF706000 000030 (v01 APPLE  Apple00  0=
 0000001 Loki 0000005F)
 [     1.000004] ACPI: ECDT 0x00000000BF705000 000053 (v01 APPLE  Apple00  0=
 0000001 Loki 0000005F)
 [     1.000004] ACPI: SSDT 0x00000000BF6FC000 0001DA (v01 APPLE  SataAhci 0=
 0001000 INTL 20061109)
 [     1.000004] ACPI: SSDT 0x00000000BF6FA000 000518 (v01 APPLE  UsbNoRmh 0=
 0001000 INTL 20061109)
 [     1.000004] ACPI: SSDT 0x00000000BF6F7000 000A10 (v01 PmRef  CpuPm    0=
 0003000 INTL 20061109)
 [     1.000004] ACPI: MCFG 0x00000000BF707000 00003C (v01 APPLE  Apple00  0=
 0000001 Loki 0000005F)
 [     1.000004] ACPI: 4 ACPI AML tables successfully acquired and loaded
 [     1.000004] ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 0x20, 24=
  pins
 [     1.000004] cpu0 at mainbus0 apid 0
 [     1.000004] cpu0: Use lfence to serialize rdtsc
 [     1.000004] cpu0: Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz, id 0=
 x20655
 [     1.000004] cpu0: node 0, package 0, core 0, smt 0
 [     1.000004] cpu1 at mainbus0 apid 1
 [     1.000004] cpu1: Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz, id 0=
 x20655
 [     1.000004] cpu1: node 0, package 0, core 0, smt 1
 [     1.000004] cpu2 at mainbus0 apid 4
 [     1.000004] cpu2: Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz, id 0=
 x20655
 [     1.000004] cpu2: node 0, package 0, core 2, smt 0
 [     1.000004] cpu3 at mainbus0 apid 5
 [     1.000004] cpu3: Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz, id 0=
 x20655
 [     1.000004] cpu3: node 0, package 0, core 2, smt 1
 [     1.000004] acpi0 at mainbus0: Intel ACPICA 20221020
 [     1.000004] acpi0: X/RSDT: OemId <APPLE , Apple00,0000f000>, AslId <   =
  ,01000013>
 [     1.000004] acpiecdt0 at acpi0: ACPI Embedded Controller via ECDT
 [     1.000004] acpi0: MCFG: segment 0, bus 0-6, address 0x00000000e0000000
 [     1.000004] ACPI: Dynamic OEM Table Load:
 [     1.000004] ACPI: SSDT 0xFFFFF1BB2799A008 0004FF (v01 PmRef  Cpu0Ist  0=
 0003000 INTL 20061109)
 [     1.000004] ACPI: Dynamic OEM Table Load:
 [     1.000004] ACPI: SSDT 0xFFFFF1BB2799A808 0006E5 (v01 PmRef  Cpu0Cst  0=
 0003001 INTL 20061109)
 [     1.000004] ACPI: Dynamic OEM Table Load:
 [     1.000004] ACPI: SSDT 0xFFFFF1BB5A15CC08 0003A4 (v01 PmRef  ApIst    0=
 0003000 INTL 20061109)
 [     1.000004] ACPI: Dynamic OEM Table Load:
 [     1.000004] ACPI: SSDT 0xFFFFF1BB27957248 000119 (v01 PmRef  ApCst    0=
 0003000 INTL 20061109)
 [     1.000004] acpi0: SCI interrupting at int 9
 [     1.000004] acpi0: fixed power button present
 [     1.000004] timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz q=
 uality 1000
 [     1.036207] hpet0 at acpi0: high precision event timer (mem 0xfed00000-=
 0xfed00400)
 [     1.036207] timecounter: Timecounter "hpet0" frequency 14318180 Hz qual=
 ity 2000
 [     1.036831] acpiec0 at acpi0 (EC, PNP0C09-0): using acpiecdt0
 [     1.036831] acpivga0 at acpi0 (GFX0): ACPI Display Adapter
 [     1.036831] acpiout0 at acpivga0 (LCD, 0x0110): ACPI Display Output Dev=
 ice
 [     1.036831] acpiout0: brightness levels: [0,7,13,20,27,33,40,47,50,53,6=
 0,67,73,80,87,93,100]
 [     1.036831] acpivga0: connected output devices:
 [     1.036831] acpivga0:   0x0110 (acpiout0): LCD Panel, head 0
 [     1.036831] FWHD (INT0800) at acpi0 not configured
 [     1.036831] attimer1 at acpi0 (TIMR, PNP0100): io 0x40-0x43,0x50-0x53
 [     1.036831] SMC (APP0001) at acpi0 not configured
 [     1.036831] acpibut0 at acpi0 (PWRB, PNP0C0C): ACPI Power Button
 [     1.036831] PNLF (APP0002) at acpi0 not configured
 [     1.036831] acpibut1 at acpi0 (SLPB, PNP0C0E): ACPI Sleep Button
 [     1.036831] ACPI: Enabled 4 GPEs in block 00 to 3F
 [     1.036831] pci0 at mainbus0 bus 0: configuration mode 1
 [     1.036831] pci0: i/o space, memory space enabled, rd/line, rd/mult, wr=
 /inv ok
 [     1.036831] pchb0 at pci0 dev 0 function 0: Intel Iron Lake Host Bridge=
  (rev. 0x18)
 [     1.036831] agp0 at pchb0autoconfiguration error: : can't find internal=
  VGA config space
 [     1.036831] ppb0 at pci0 dev 1 function 0: Intel Core PCIe Root Port (r=
 ev. 0x18)
 [     1.036831] ppb0: PCI Express capability version 2 <Root Port of PCI-E =
 Root Complex> x16 @ 5.0GT/s
 [     1.036831] pci1 at ppb0 bus 1
 [     1.036831] pci1: i/o space, memory space enabled, rd/line, wr/inv ok
 [     1.036831] genfb0 at pci1 dev 0 function 0: ATI Technologies Mobility =
 Radeon HD 4670 (rev. 0x00)
 [     1.036831] genfb0: framebuffer at 0xc0010000, size 1920x1080, depth 32=
 , stride 7680
 [     1.036831] genfb0: shadow framebuffer enabled, size 8100 KB
 [     1.036831] wsdisplay0 at genfb0 kbdmux 1: console (default, vt100 emul=
 ation)
 [     1.036831] wsmux1: connecting to wsdisplay0
 [     1.036831] drm at genfb0 not configured
 [     1.036831] hdaudio0 at pci1 dev 0 function 1: HD Audio Controller
 [     1.036831] hdaudio0: interrupting at msi0 vec 0
 [     1.036831] hdaudio0: HDA ver. 1.0, OSS 1, ISS 0, BSS 0, SDO 1, 64-bit
 [     1.036831] hdafg0 at hdaudio0: ATI R6xx HDMI
 [     1.036831] hdafg0: HDMI00 2ch: Digital Out [Jack]
 [     1.036831] hdafg0: 2ch/0ch 32000Hz 44100Hz 48000Hz PCM16 AC3
 [     1.036831] audio0 at hdafg0: playback
 [     1.036831] audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) fo=
 r playback
 [     1.036831] spkr0 at audio0: PC Speaker (synthesized)
 [     1.036831] wsbell at spkr0 not configured
 [     1.036831] uhci0 at pci0 dev 26 function 0: Intel 3400 USB (rev. 0x06)
 [     1.036831] cannot set up pci_intr_handle_t
 [     1.036831] uhci0: autoconfiguration error: couldn't map interrupt
 [     1.036831] ehci0 at pci0 dev 26 function 7: Intel 3400 USB ECHI (rev. =
 0x06)
 [     1.036831] ehci0: 64-bit DMA
 [     1.036831] ehci0: interrupting at ioapic0 pin 21
 [     1.036831] ehci0: EHCI version 1.0
 [     1.036831] ehci0: wrong number of companions (3 !=3D 0)
 [     1.036831] ehci0: Using DMA subregion for control data structures
 [     1.036831] usb0 at ehci0: USB revision 2.0
 [     1.036831] hdaudio1 at pci0 dev 27 function 0: HD Audio Controller
 [     1.036831] hdaudio1: interrupting at msi1 vec 0
 [     1.036831] hdaudio1: HDA ver. 1.0, OSS 4, ISS 4, BSS 0, SDO 1, 64-bit
 [     1.036831] hdafg1 at hdaudio1: vendor 1013 product 4206
 [     1.036831] hdafg1: ADC00 2ch: Mic In [Built-In]
 [     1.036831] hdafg1: ADC01 2ch: Line In [Jack]
 [     1.036831] hdafg1: DIG-In02 2ch: SPDIF In [Jack]
 [     1.036831] hdafg1: DAC03 4ch: Speaker [Built-In]
 [     1.036831] hdafg1: DAC04 2ch: HP Out [Jack]
 [     1.036831] hdafg1: DIG05 2ch: SPDIF Out [Jack]
 [     1.036831] hdafg1: 4ch/2ch 32000Hz 44100Hz 48000Hz 88200Hz 96000Hz 192=
 000Hz PCM16 PCM20 PCM24 PCM32 AC3
 [     1.036831] audio1 at hdafg1: playback, capture, full duplex, independe=
 nt
 [     1.036831] audio1: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) fo=
 r playback
 [     1.036831] audio1: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) fo=
 r recording
 [     1.036831] spkr1 at audio1: PC Speaker (synthesized)
 [     1.036831] wsbell at spkr1 not configured
 [     1.036831] ppb1 at pci0 dev 28 function 0: Intel 3400 PCIe (rev. 0x06)
 [     1.036831] ppb1: PCI Express capability version 2 <Root Port of PCI-E =
 Root Complex> x1 @ 2.5GT/s
 [     1.036831] pci2 at ppb1 bus 2
 [     1.036831] pci2: i/o space, memory space enabled, rd/line, wr/inv ok
 [     1.036831] bge0 at pci2 dev 0 function 0: Broadcom BCM5764 Gigabit Eth=
 ernet
 [     1.036831] bge0: interrupting at msi2 vec 0
 [     1.036831] bge0: HW config 00000015, 00004015, 00002830, 00000000 0000=
 0000
 [     1.036831] bge0: ASIC BCM5784 B0 (0x5784100), Ethernet address c8:bc:c=
 8:9e:bf:a2
 [     1.036831] bge0: setting short Tx thresholds
 [     1.036831] brgphy0 at bge0 phy 1: BCM5784 10/100/1000baseT PHY, rev. 4
 [     1.036831] brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 10=
 00baseT, 1000baseT-FDX, auto
 [     1.036831] ppb2 at pci0 dev 28 function 1: Intel 3400 PCIe (rev. 0x06)
 [     1.036831] ppb2: PCI Express capability version 2 <Root Port of PCI-E =
 Root Complex> x1 @ 2.5GT/s
 [     1.036831] pci3 at ppb2 bus 3
 [     1.036831] pci3: i/o space, memory space enabled, rd/line, wr/inv ok
 [     1.036831] athn0 at pci3 dev 0 function 0: Atheros AR9280
 [     1.036831] athn0: rev 2 (2T2R), ROM rev 22, address c8:bc:c8:bf:a7:90
 [     1.036831] athn0: interrupting at ioapic0 pin 17
 [     1.036831] ppb3 at pci0 dev 28 function 2: Intel 3400 PCIe (rev. 0x06)
 [     1.036831] ppb3: PCI Express capability version 2 <Root Port of PCI-E =
 Root Complex> x1 @ 2.5GT/s
 [     1.036831] pci4 at ppb3 bus 4
 [     1.036831] pci4: i/o space, memory space enabled, rd/line, wr/inv ok
 [     1.036831] ppb4 at pci4 dev 0 function 0: Texas Instruments product 82=
 3e (rev. 0x01)
 [     1.036831] ppb4: PCI Express capability version 1 <PCI-E to PCI/PCI-X =
 Bridge>
 [     1.036831] pci5 at ppb4 bus 5
 [     1.036831] pci5: i/o space, memory space enabled, rd/line, wr/inv ok
 [     1.036831] fwohci0 at pci5 dev 0 function 0: Texas Instruments product=
  823f (rev. 0x01)
 [     1.036831] fwohci0: interrupting at ioapic0 pin 18
 [     1.036831] fwohci0: OHCI version 1.10 (ROM=3D0)
 [     1.036831] fwohci0: No. of Isochronous channels is 8.
 [     1.036831] fwohci0: EUI64 dc:2b:61:ff:fe:f2:ae:92
 [     1.036831] fwohci0: autoconfiguration error: invalid speed 7 (fixed to=
  3).
 [     1.036831] fwohci0: Phy 1394a available S800, 3 ports.
 [     1.036831] fwohci0: Link S800, max_rec 4096 bytes.
 [     1.036831] ieee1394if0 at fwohci0: IEEE1394 bus
 [     1.036831] fwip0 at ieee1394if0: IP over IEEE1394
 [     1.036831] fwohci0: Initiate bus reset
 [     1.036831] fwohci0: Clear PME# now
 [     1.036831] uhci1 at pci0 dev 29 function 0: Intel 3400 USB (rev. 0x06)
 [     1.036831] cannot set up pci_intr_handle_t
 [     1.036831] uhci1: autoconfiguration error: couldn't map interrupt
 [     1.036831] ehci1 at pci0 dev 29 function 7: Intel 3400 USB EHCI (rev. =
 0x06)
 [     1.036831] ehci1: 64-bit DMA
 [     1.036831] ehci1: interrupting at ioapic0 pin 23
 [     1.036831] ehci1: EHCI version 1.0
 [     1.036831] ehci1: wrong number of companions (4 !=3D 0)
 [     1.036831] ehci1: Using DMA subregion for control data structures
 [     1.036831] usb1 at ehci1: USB revision 2.0
 [     1.036831] ppb5 at pci0 dev 30 function 0: Intel 82801BA Hub-PCI Bridg=
 e (rev. 0xa6)
 [     1.036831] pci6 at ppb5 bus 6
 [     1.036831] pci6: i/o space, memory space enabled
 [     1.036831] ichlpcib0 at pci0 dev 31 function 0: Intel P55 LPC Interfac=
 e Bridge (rev. 0x06)
 [     1.036831] timecounter: Timecounter "ichlpcib0" frequency 3579545 Hz q=
 uality 1000
 [     1.036831] ichlpcib0: 24-bit timer
 [     1.036831] tco0 at ichlpcib0: TCO (watchdog) timer configured.
 [     1.036831] tco0: autoconfiguration error: TCO timer reboot disabled by=
  hardware; hope SMBIOS properly handles it.
 [     1.036831] tco0: Min/Max interval 1/367 seconds
 [     1.036831] ahcisata0 at pci0 dev 31 function 2: Intel 3400 AHCI (rev. =
 0x06)
 [     1.036831] ahcisata0: 64-bit DMA
 [     1.036831] ahcisata0: AHCI revision 1.30, 6 ports, 32 slots, CAP 0xe72=
 0ff45<EMS,PSC,SSC,PMD,ISS=3D0x2=3DGen2,SCLO,SAL,SALP,SSNTF,SNCQ,S64A>
 [     1.036831] ahcisata0: interrupting at msi3 vec 0
 [     1.036831] atabus0 at ahcisata0 channel 0
 [     1.036831] atabus1 at ahcisata0 channel 1
 [     1.036831] ichsmb0 at pci0 dev 31 function 3: Intel 3400 SMBus (rev. 0=
 x06)
 [     1.036831] ichsmb0: interrupting at ioapic0 pin 20
 [     1.036831] iic0 at ichsmb0: I2C bus
 [     1.036831] Intel 3400 Thermal (miscellaneous DASP, revision 0x06) at p=
 ci0 dev 31 function 6 not configured
 [     1.036831] isa0 at ichlpcib0
 [     1.036831] pcppi0 at isa0 port 0x61
 [     1.036831] spkr2 at pcppi0: PC Speaker
 [     1.036831] wsbell at spkr2 not configured
 [     1.036831] midi0 at pcppi0: PC speaker
 [     1.036831] sysbeep0 at pcppi0
 [     1.036831] attimer1: attached to pcppi0
 [     1.036831] pci7 at mainbus0 bus 255
 [     1.036831] pci7: i/o space, memory space enabled, rd/line, rd/mult, wr=
 /inv ok
 [     1.036831] pchb1 at pci7 dev 0 function 0: Intel Core i5-600, i3-500 a=
 nd Pentium 6000 QuickPath Generic Non-Core Register (rev. 0x05)
 [     1.036831] pchb2 at pci7 dev 0 function 1: Intel Core i5-600, i3-500 a=
 nd Pentium 6000 QuickPath Generic System Address Decoder (rev. 0x05)
 [     1.036831] pchb3 at pci7 dev 2 function 0: Intel Core i5-600, i3-500 a=
 nd Pentium 6000 QPI Link (rev. 0x05)
 [     1.036831] pchb4 at pci7 dev 2 function 1: Intel Core i5-600, i3-500 a=
 nd Pentium 6000 QPI Physical (rev. 0x05)
 [     1.036831] pchb5 at pci7 dev 2 function 2: Intel Core i5-600, i3-500 a=
 nd Pentium 6000 Reserved (rev. 0x05)
 [     1.036831] pchb6 at pci7 dev 2 function 3: Intel Core i5-600, i3-500 a=
 nd Pentium 6000 Reserved (rev. 0x05)
 [     1.036831] acpicpu0 at cpu0: ACPI CPU
 [     1.036831] acpicpu0: C1: FFH, lat   3 us, pow  1000 mW
 [     1.036831] acpicpu0: C2: FFH, lat 245 us, pow   350 mW
 [     1.036831] acpicpu0: P0: FFH, lat  10 us, pow 35000 mW, 3059 MHz
 [     1.036831] acpicpu0: P1: FFH, lat  10 us, pow 33571 mW, 2926 MHz
 [     1.036831] acpicpu0: P2: FFH, lat  10 us, pow 32142 mW, 2793 MHz
 [     1.036831] acpicpu0: P3: FFH, lat  10 us, pow 30714 mW, 2660 MHz
 [     1.036831] acpicpu0: P4: FFH, lat  10 us, pow 29285 mW, 2527 MHz
 [     1.036831] acpicpu0: P5: FFH, lat  10 us, pow 27857 mW, 2394 MHz
 [     1.036831] acpicpu0: P6: FFH, lat  10 us, pow 26428 mW, 2261 MHz
 [     1.036831] acpicpu0: P7: FFH, lat  10 us, pow 25000 mW, 2128 MHz
 [     1.036831] acpicpu0: P8: FFH, lat  10 us, pow 23571 mW, 1995 MHz
 [     1.036831] acpicpu0: P9: FFH, lat  10 us, pow 22142 mW, 1862 MHz
 [     1.036831] acpicpu0: P10: FFH, lat  10 us, pow 20714 mW, 1729 MHz
 [     1.036831] acpicpu0: P11: FFH, lat  10 us, pow 19285 mW, 1596 MHz
 [     1.036831] acpicpu0: P12: FFH, lat  10 us, pow 17857 mW, 1463 MHz
 [     1.036831] acpicpu0: P13: FFH, lat  10 us, pow 16428 mW, 1330 MHz
 [     1.036831] acpicpu0: P14: FFH, lat  10 us, pow 15000 mW, 1197 MHz
 [     1.036831] acpicpu0: T0: I/O, lat   1 us, pow     0 mW, 100 %
 [     1.036831] acpicpu0: T1: I/O, lat   1 us, pow     0 mW,  88 %
 [     1.036831] acpicpu0: T2: I/O, lat   1 us, pow     0 mW,  76 %
 [     1.036831] acpicpu0: T3: I/O, lat   1 us, pow     0 mW,  64 %
 [     1.036831] acpicpu0: T4: I/O, lat   1 us, pow     0 mW,  52 %
 [     1.036831] acpicpu0: T5: I/O, lat   1 us, pow     0 mW,  40 %
 [     1.036831] acpicpu0: T6: I/O, lat   1 us, pow     0 mW,  28 %
 [     1.036831] acpicpu0: T7: I/O, lat   1 us, pow     0 mW,  16 %
 [     1.036831] coretemp0 at cpu0: thermal sensor, 1 C resolution, Tjmax=3D=
 105
 [     1.036831] acpicpu1 at cpu1: ACPI CPU
 [     1.036831] acpicpu2 at cpu2: ACPI CPU
 [     1.036831] coretemp1 at cpu2: thermal sensor, 1 C resolution, Tjmax=3D=
 105
 [     1.036831] acpicpu3 at cpu3: ACPI CPU
 [     1.036831] fwohci0: BUS reset
 [     1.036831] fwohci0: node_id=3D0xc800ffc0, gen=3D1, CYCLEMASTER mode
 [     1.036831] ieee1394if0: 1 nodes, maxhop <=3D 0 cable IRM irm(0) (me)
 [     1.036831] ieee1394if0: bus manager 0
 [     1.036831] fwohci0: phy int
 [     1.036831] timecounter: Timecounter "clockinterrupt" frequency 100 Hz =
 quality 0
 [     1.036831] timecounter: Timecounter "TSC" frequency 3059001000 Hz qual=
 ity 3000
 [     1.459799] IPsec: Initialized Security Association Processing.
 [     1.477325] uhub0 at usb0: NetBSD (0x0000) EHCI root hub (0x0000), clas=
 s 9/0, rev 2.00/1.00, addr 1
 [     1.477325] uhub0: 6 ports with 6 removable, self powered
 [     1.477325] uhub1 at usb1: NetBSD (0x0000) EHCI root hub (0x0000), clas=
 s 9/0, rev 2.00/1.00, addr 1
 [     1.477325] uhub1: 8 ports with 8 removable, self powered
 [     1.627325] ahcisata0 port 0: device present, speed: 3.0Gb/s
 [     1.627325] ahcisata0 port 1: device present, speed: 1.5Gb/s
 [     2.527324] uhub2 at uhub0 port 1: vendor 0424 (0x0424) product 2514 (0=
 x2514), class 9/0, rev 2.00/0.03, addr 2
 [     2.527324] uhub2: multiple transaction translators
 [     2.527324] uhub3 at uhub1 port 1: vendor 0424 (0x0424) product 2514 (0=
 x2514), class 9/0, rev 2.00/0.03, addr 2
 [     2.527324] uhub3: multiple transaction translators
 [     2.527324] uhub2: 4 ports with 2 removable, self powered
 [     2.527324] uhub3: 4 ports with 2 removable, self powered
 [     3.167324] wd0 at atabus0 drive 0
 [     3.167324] wd0: <ST1000VM002-9ZL162>
 [     3.167324] wd0: drive supports 16-sector PIO transfers, LBA48 addressi=
 ng
 [     3.167324] wd0: 931 GB, 1936980 cyl, 16 head, 63 sec, 512 bytes/sect x=
  1952476592 sectors (4096 bytes/physsect; first aligned sector: 8)
 [     3.237325] wd0: GPT GUID: 71e22824-618e-4ce0-8ff9-89c960948559
 [     3.237325] dk0 at wd0: "EFI System Partition", 409600 blocks at 40, ty=
 pe: msdos
 [     3.237325] dk1 at wd0: "macOS", 194042960 blocks at 671784, type: hfs
 [     3.237325] dk2 at wd0: "70d57bd8-2099-485f-9638-d525e0994cef", 1269536=
  blocks at 194714744, type: <unknown>
 [     3.237325] dk3 at wd0: "NetBSD-stable", 488286536 blocks at 195984280,=
  type: ffs
 [     3.237325] dk4 at wd0: "NetBSD-current", 487483816 blocks at 684532960=
 , type: ffs
 [     3.237325] dk5 at wd0: "NetBSD-experimental", 488591712 blocks at 1172=
 278920, type: ffs
 [     3.237325] dk6 at wd0: "NetBSD-swap", 67108864 blocks at 1661132776, t=
 ype: swap
 [     3.237325] wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode =
 6 (Ultra/133), NCQ (32 tags)
 [     3.237325] wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA=
  mode 6 (Ultra/133) (using DMA), NCQ (31 tags)
 [     3.237325] atapibus0 at atabus1: 1 targets
 [     3.237325] cd0 at atapibus0 drive 0: <OPTIARC DVD RW AD-5680H, , 3AHB>=
  cdrom removable
 [     3.247325] cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode =
 5 (Ultra/100)
 [     3.317324] cd0(ahcisata0:1:0): using PIO mode 4, DMA mode 2, Ultra-DMA=
  mode 5 (Ultra/100) (using DMA)
 [     3.357324] uhub4 at uhub2 port 1: Apple Inc. (0x0a5c) BRCM2046 Hub (0x=
 4500), class 9/0, rev 2.00/1.00, addr 3
 [     3.357324] uhub4: 3 ports with 0 removable, self powered
 [     3.367325] uvideo0 at uhub3 port 1 configuration 1 interface 0: Apple =
 Inc. (0x05ac) Built-in iSight (0x8502), rev 2.00/2.46, addr 3
 [     3.417325] video0 at uvideo0: Apple Inc. (0x05ac) Built-in iSight (0x8=
 502), rev 2.00/2.46, addr 3
 [     3.917324] uhidev0 at uhub3 port 2 configuration 1 interface 0
 [     3.917324] uhidev0: Apple Computer, Inc. (0x05ac) IR Receiver (0x8242)=
 , rev 2.00/0.16, addr 4, iclass 3/0
 [     3.967325] uhidev0: 38 report ids
 [     3.967325] uhid0 at uhidev0 reportid 36: input=3D4, output=3D0, featur=
 e=3D0
 [     3.967325] uhid1 at uhidev0 reportid 37: input=3D4, output=3D0, featur=
 e=3D0
 [     3.967325] uhid2 at uhidev0 reportid 38: input=3D4, output=3D0, featur=
 e=3D0
 [     4.227324] ubt0 at uhub4 port 1
 [     4.227324] ubt0: Apple Inc. (0x05ac) Bluetooth USB Host Controller (0x=
 8215), rev 2.00/2.08, addr 4
 [     4.717324] uhidev1 at uhub4 port 2 configuration 1 interface 0
 [     4.717324] uhidev1: vendor 05ac (0x05ac) product 820a (0x820a), rev 2.=
 00/1.00, addr 5, iclass 3/1
 [     4.717324] uhidev1: 1 report ids
 [     4.717324] ukbd0 at uhidev1 reportid 1
 [     4.717324] wskbd0 at ukbd0: console keyboard, using wsdisplay0
 [     5.207323] uhidev2 at uhub4 port 3 configuration 1 interface 0
 [     5.207323] uhidev2: vendor 05ac (0x05ac) product 820b (0x820b), rev 2.=
 00/1.00, addr 6, iclass 3/1
 [     5.207323] uhidev2: 2 report ids
 [     5.207323] ums0 at uhidev2 reportid 2: 3 buttons
 [     5.207323] wsmouse0 at ums0 mux 0
 [     5.697323] umass0 at uhub2 port 2 configuration 1 interface 0
 [     5.697323] umass0: Apple (0x05ac) Card Reader (0x8403), rev 2.00/98.33=
 , addr 7
 [     5.697323] umass0: using SCSI over Bulk-Only
 [     5.697323] scsibus0 at umass0: 2 targets, 1 lun per target
 [     5.767324] sd0 at scsibus0 target 0 lun 0: <APPLE, SD Card Reader, 1.0=
 0> disk removable
 [     5.767324] sd0: drive offline
 [     5.767324] autoconfiguration error: sd0: unable to open device, error =
 =3D 19
 [     6.187323] uhub5 at uhub2 port 3: vendor 0451 (0x0451) product 1446 (0=
 x1446), class 9/0, rev 1.10/1.10, addr 8
 [     6.187323] uhub5: 4 ports with 4 removable, self powered
 [     7.027323] uhidev3 at uhub5 port 1 configuration 1 interface 0
 [     7.027323] uhidev3: vendor 045e (0x045e) Microsoft Natural Keyboard Pr=
 o (0x001d), rev 1.10/1.11, addr 9, iclass 3/1
 [     7.037323] ukbd1 at uhidev3
 [     7.037323] wskbd1 at ukbd1 mux 1
 [     7.037323] wskbd1: connecting to wsdisplay0
 [     7.037323] uhidev4 at uhub5 port 1 configuration 1 interface 1
 [     7.037323] uhidev4: vendor 045e (0x045e) Microsoft Natural Keyboard Pr=
 o (0x001d), rev 1.10/1.11, addr 9, iclass 3/0
 [     7.037323] uhidev4: 2 report ids
 [     7.037323] uhid3 at uhidev4 reportid 1: input=3D2, output=3D0, feature=
 =3D0
 [     7.037323] uhid4 at uhidev4 reportid 2: input=3D1, output=3D0, feature=
 =3D0
 [     7.537323] uhidev5 at uhub5 port 2 configuration 1 interface 0
 [     7.537323] uhidev5: Microsoft (0x045e) Microsoft 3-Button Mouse with I=
 ntelliEye(TM) (0x0040), rev 1.10/3.00, addr 10, iclass 3/1
 [     7.537323] ums1 at uhidev5: 3 buttons and Z dir
 [     7.537323] wsmouse1 at ums1 mux 0
 [     7.547323] swwdog0: software watchdog initialized
 [     7.697323] WARNING: 6 errors while detecting hardware; check system lo=
 g.
 [     7.697323] boot device: wd0
 [     7.697323] root on dk5 dumps on dk6
 [     7.817322] root file system type: ffs
 [     7.817322] kern.module.path=3D/stand/amd64/10.0/modules
 [   133.917282] wsdisplay0: screen 1 added (default, vt100 emulation)
 [   133.917282] wsdisplay0: screen 2 added (default, vt100 emulation)
 [   133.927281] wsdisplay0: screen 3 added (default, vt100 emulation)
 [   133.927281] wsdisplay0: screen 4 added (default, vt100 emulation)
 [  2591.416477] syncing disks... done
 [  2591.466480] unmounted ptyfs on /dev/pts type ptyfs
 [  2592.056479] sd0: detached
 [  2592.056479] scsibus0: detached
 [  2592.056479] cd0: detached
 [  2592.056479] sysbeep0: detached
 [  2592.056479] midi0: detached
 [  2592.056479] atapibus0: detached
 [  2592.796476] brgphy0: detached
 [  2592.796476] bge0: detached
 [  2592.796476] iic0: detached
 [  2592.796476] atabus1: detached
 [  2592.796476] pci6: detached
 [  2592.796476] pci2: detached
 [  2592.796476] pchb6: detached
 [  2592.796476] pchb5: detached
 [  2592.796476] pchb4: detached
 [  2592.796476] pchb3: detached
 [  2592.796476] pchb2: detached
 [  2592.796476] pchb1: detached
 [  2592.796476] ichsmb0: detached
 [  2592.796476] ppb5: detached
 [  2592.796476] uvm_fault(0xfffff1bb34e589d8, 0x0, 2) -> e
 [  2592.796476] fatal page fault in supervisor mode
 [  2592.796476] trap type 6 code 0x2 rip 0xffffffff80310954 cs 0x8 rflags 0=
 x10246 cr2 0 ilevel 0 rsp 0xffffc48135134da8
 [  2592.796476] curlwp 0xfffff1bb362965c0 pid 5097.5097 lowest kstack 0xfff=
 fc481351302c0

 [  2592.796476] dumping to dev 168,6 (offset=3D58870455, size=3D1029801):
 [  2592.796476] dump

 -----Original Message-----
 From: Taylor R Campbell <campbell@mumble.net> On Behalf Of Taylor R Campbel=
 l
 Sent: Monday, November 13, 2023 7:03 AM
 To: Josh Moyer <JMoyer@nodomain.net>
 Cc: gnats-bugs@NetBSD.org; netbsd-bugs@NetBSD.org; dyoung@NetBSD.org
 Subject: Re: kern/57696: NetBSD-10.0_RC1-amd64-install.img.gz kernel panics=
  at reboot or shutdown on mid 2010 21.5" iMac

 Can you share dmesg?  Maybe dmesg with `boot -v -x'?

 Looks like the failed attach path in ohci(4) and uhci(4) won't put the devi=
 ce on the usb_pci list, which breaks detach because detach assumes it is on=
  the list.

 That said, I'm not sure why we set DVF_DETACH_SHUTDOWN for ohci(4) and
 uhci(4) in the first place to make them detach on shutdown; it was set by d=
 young@ in 2009 with a commit message that doesn't say anything about why th=
 e change was made.  dyoung: Do you remember anything?

 We can fix the interaction of failed attach with detach, or we can remove D=
 VF_DETACH_SHUTDOWN, but there's probably an underlying problem on attach th=
 at the dmesg will provide hints about, and that's what we should really try=
  to fix.

From: Taylor R Campbell <riastradh@NetBSD.org>
To: Josh Moyer <JMoyer@nodomain.net>
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/57696: NetBSD-10.0_RC1-amd64-install.img.gz kernel panics at
	reboot or shutdown on mid 2010 21.5" iMac
Date: Tue, 14 Nov 2023 01:41:35 +0000

 > Date: Mon, 13 Nov 2023 15:15:53 +0000
 > From: Josh Moyer <JMoyer@nodomain.net>
 >=20
 > [     1.036831] uhci0 at pci0 dev 26 function 0: Intel 3400 USB (rev. 0x0=
 6)
 > [     1.036831] cannot set up pci_intr_handle_t
 > [     1.036831] uhci0: autoconfiguration error: couldn't map interrupt
 > ...
 > [     1.036831] uhci1 at pci0 dev 29 function 0: Intel 3400 USB (rev. 0x0=
 6)
 > [     1.036831] cannot set up pci_intr_handle_t
 > [     1.036831] uhci1: autoconfiguration error: couldn't map interrupt

 This looks likely to be the culprit -- uhci attach failed, but left it
 in a state not expected by uhci detach.

 This message comes from the x86 pci_intx_alloc when pci_intr_map
 fails:

     448 	if (pci_intr_map(pa, handle) !=3D 0) {
     449 		aprint_normal("cannot set up pci_intr_handle_t\n");
     450 		error =3D EINVAL;
     451 		goto error;
     452 	}

 https://nxr.netbsd.org/xref/src/sys/arch/x86/pci/pci_intr_machdep.c#448

 Can you share the output of the following commands?

 # pcictl pci0 dump -d 26 -f 0
 # pcictl pci0 dump -d 29 -f 0

 Perhaps that will provide a clue about what's wrong with the device's
 PCI interrupt mapping.

 Is this problem new?  Does it occur with, e.g., the 9.3 image, or 8.2,
 or any other older versions?

From: Josh Moyer <JMoyer@nodomain.net>
To: Taylor R Campbell <riastradh@NetBSD.org>
Cc: "gnats-bugs@NetBSD.org" <gnats-bugs@NetBSD.org>, "netbsd-bugs@NetBSD.org"
	<netbsd-bugs@NetBSD.org>
Subject: RE: kern/57696: NetBSD-10.0_RC1-amd64-install.img.gz kernel panics at
	reboot or shutdown on mid 2010 21.5" iMac
Date: Thu, 16 Nov 2023 22:33:54 +0000

 > From: Taylor R Campbell <campbell@mumble.net> On Behalf Of Taylor R Campb=
 ell
 > Sent: Monday, November 13, 2023 5:42 PM
 >> Date: Mon, 13 Nov 2023 15:15:53 +0000
 >> From: Josh Moyer <JMoyer@nodomain.net>
 >>=20
 >> [     1.036831] uhci0 at pci0 dev 26 function 0: Intel 3400 USB (rev. 0x=
 06)
 >> [     1.036831] cannot set up pci_intr_handle_t
 >> [     1.036831] uhci0: autoconfiguration error: couldn't map interrupt
 >> ...
 >> [     1.036831] uhci1 at pci0 dev 29 function 0: Intel 3400 USB (rev. 0x=
 06)
 >> [     1.036831] cannot set up pci_intr_handle_t
 >> [     1.036831] uhci1: autoconfiguration error: couldn't map interrupt
 >
 > This looks likely to be the culprit -- uhci attach failed, but left it in=
  a
 > state not expected by uhci detach.
 >
 > This message comes from the x86 pci_intx_alloc when pci_intr_map
 > fails:
 >
 >    448 	if (pci_intr_map(pa, handle) !=3D 0) {
 >    449 		aprint_normal("cannot set up pci_intr_handle_t\n");
 >    450 		error =3D EINVAL;
 >    451 		goto error;
 >    452 	}
 >
 > https://nxr.netbsd.org/xref/src/sys/arch/x86/pci/pci_intr_machdep.c#448
 >
 > Can you share the output of the following commands?
 >
 > # pcictl pci0 dump -d 26 -f 0
 PCI configuration registers:
   Common header:
     0x00: 0x3b3b8086 0x02900005 0x0c030006 0x00800000

     Vendor Name: Intel (0x8086)
     Device Name: 3400 USB (0x3b3b)
     Command register: 0x0005
       I/O space accesses: on
       Memory space accesses: off
       Bus mastering: on
       Special cycles: off
       MWI transactions: off
       Palette snooping: off
       Parity error checking: off
       Address/data stepping: off
       System error (SERR): off
       Fast back-to-back transactions: off
       Interrupt disable: off
     Status register: 0x0290
       Immediate Readiness: off
       Interrupt status: inactive
       Capability List support: on
       66 MHz capable: off
       User Definable Features (UDF) support: off
       Fast back-to-back capable: on
       Data parity error detected: off
       DEVSEL timing: medium (0x1)
       Slave signaled Target Abort: off
       Master received Target Abort: off
       Master received Master Abort: off
       Asserted System Error (SERR): off
       Parity error detected: off
     Class Name: serial bus (0x0c)
     Subclass Name: USB (0x03)
     Interface Name: UHCI (0x00)
     Revision ID: 0x06
     BIST: 0x00
     Header Type: 0x00+multifunction (0x80)
     Latency Timer: 0x00
     Cache Line Size: 0bytes (0x00)

   Type 0 ("normal" device) header:
     0x10: 0x00000000 0x00000000 0x00000000 0x00000000
     0x20: 0x00003101 0x00000000 0x00000000 0x72708086
     0x30: 0x00000000 0x00000050 0x00000000 0x00000000

     Base address register at 0x10
       not implemented
     Base address register at 0x14
       not implemented
     Base address register at 0x18
       not implemented
     Base address register at 0x1c
       not implemented
     Base address register at 0x20
       type: I/O
       base: 0x00003100
     Base address register at 0x24
       not implemented
     Cardbus CIS Pointer: 0x00000000
     Subsystem vendor ID: 0x8086
     Subsystem ID: 0x7270
     Expansion ROM Base Address Register: 0x00000000
       base: 0x00000000
       Expansion ROM Enable: off
       Validation Status: Validation not supported
       Validation Details: 0x0
     Capability list pointer: 0x50
     Reserved @ 0x38: 0x00000000
     Maximum Latency: 0x00
     Minimum Grant: 0x00
     Interrupt pin: 0x00 (none)
     Interrupt line: 0x00

   Capability register at 0x50
     type: 0x13 (Advanced Features)

   Advanced Features Capability Register
     AF Capabilities register: 0x03
     AF Structure Length: 0x06
       Transaction Pending: on
       Function Level Reset: on
     AF Control register: 0x00
     AF Status register: 0x00
       Transaction Pending: off

   Device-dependent header:
     0x40: 0x00000000 0x00000000 0x00000000 0x00000000
     0x50: 0x03060013 0x00000000 0x00000000 0x00000000
     0x60: 0x00000010 0x00000000 0x00000000 0x00000000
     0x70: 0x00000000 0x00000000 0x00000000 0x00000000
     0x80: 0x00000000 0x00000000 0x00000000 0x00000000
     0x90: 0x00000000 0x00000000 0x00000000 0x00000000
     0xa0: 0x00000000 0x00000000 0x00000000 0x00000000
     0xb0: 0x00000000 0x00000000 0x00000000 0x00000000
     0xc0: 0x00000500 0x00000000 0x00010000 0x00000000
     0xd0: 0x00000000 0x00000000 0x00000000 0x00000000
     0xe0: 0x00000000 0x00000000 0x00000000 0x00000000
     0xf0: 0x00000000 0x00000000 0x08060f87 0x00000000

 > # pcictl pci0 dump -d 29 -f 0
 PCI configuration registers:
   Common header:
     0x00: 0x3b368086 0x02900005 0x0c030006 0x00800000

     Vendor Name: Intel (0x8086)
     Device Name: 3400 USB (0x3b36)
     Command register: 0x0005
       I/O space accesses: on
       Memory space accesses: off
       Bus mastering: on
       Special cycles: off
       MWI transactions: off
       Palette snooping: off
       Parity error checking: off
       Address/data stepping: off
       System error (SERR): off
       Fast back-to-back transactions: off
       Interrupt disable: off
     Status register: 0x0290
       Immediate Readiness: off
       Interrupt status: inactive
       Capability List support: on
       66 MHz capable: off
       User Definable Features (UDF) support: off
       Fast back-to-back capable: on
       Data parity error detected: off
       DEVSEL timing: medium (0x1)
       Slave signaled Target Abort: off
       Master received Target Abort: off
       Master received Master Abort: off
       Asserted System Error (SERR): off
       Parity error detected: off
     Class Name: serial bus (0x0c)
     Subclass Name: USB (0x03)
     Interface Name: UHCI (0x00)
     Revision ID: 0x06
     BIST: 0x00
     Header Type: 0x00+multifunction (0x80)
     Latency Timer: 0x00
     Cache Line Size: 0bytes (0x00)

   Type 0 ("normal" device) header:
     0x10: 0x00000000 0x00000000 0x00000000 0x00000000
     0x20: 0x000030a1 0x00000000 0x00000000 0x72708086
     0x30: 0x00000000 0x00000050 0x00000000 0x00000000

     Base address register at 0x10
       not implemented
     Base address register at 0x14
       not implemented
     Base address register at 0x18
       not implemented
     Base address register at 0x1c
       not implemented
     Base address register at 0x20
       type: I/O
       base: 0x000030a0
     Base address register at 0x24
       not implemented
     Cardbus CIS Pointer: 0x00000000
     Subsystem vendor ID: 0x8086
     Subsystem ID: 0x7270
     Expansion ROM Base Address Register: 0x00000000
       base: 0x00000000
       Expansion ROM Enable: off
       Validation Status: Validation not supported
       Validation Details: 0x0
     Capability list pointer: 0x50
     Reserved @ 0x38: 0x00000000
     Maximum Latency: 0x00
     Minimum Grant: 0x00
     Interrupt pin: 0x00 (none)
     Interrupt line: 0x00

   Capability register at 0x50
     type: 0x13 (Advanced Features)

   Advanced Features Capability Register
     AF Capabilities register: 0x03
     AF Structure Length: 0x06
       Transaction Pending: on
       Function Level Reset: on
     AF Control register: 0x00
     AF Status register: 0x00
       Transaction Pending: off

   Device-dependent header:
     0x40: 0x00000000 0x00000000 0x00000000 0x00000000
     0x50: 0x03060013 0x00000000 0x00000000 0x00000000
     0x60: 0x00000010 0x00000000 0x00000000 0x00000000
     0x70: 0x00000000 0x00000000 0x00000000 0x00000000
     0x80: 0x00000000 0x00000000 0x00000000 0x00000000
     0x90: 0x00000000 0x00000000 0x00000000 0x00000000
     0xa0: 0x00000000 0x00000000 0x00000000 0x00000000
     0xb0: 0x00000000 0x00000000 0x00000000 0x00000000
     0xc0: 0x00000500 0x00000000 0x00010000 0x00000000
     0xd0: 0x00000000 0x00000000 0x00000000 0x00000000
     0xe0: 0x00000000 0x00000000 0x00000000 0x00000000
     0xf0: 0x00000000 0x00000000 0x08060f87 0x00000000

 > Perhaps that will provide a clue about what's wrong with the device's
 > PCI interrupt mapping.
 >
 > Is this problem new?  Does it occur with, e.g., the 9.3 image, or 8.2,
 > or any other older versions?

 I checked and saw the same system messages with 9.3 and ran the pcictl dump=
  there, too.  The output between the 9.3 and 10_RC1 pcictl invocations diff=
 d identically.  However, the 9.3 install reboots without incident.

From: Robert Elz <kre@munnari.OZ.AU>
To: Josh Moyer <JMoyer@nodomain.net>
Cc: "gnats-bugs@NetBSD.org" <gnats-bugs@NetBSD.org>,
        "netbsd-bugs@NetBSD.org" <netbsd-bugs@NetBSD.org>
Subject: Re: kern/57696: NetBSD-10.0_RC1-amd64-install.img.gz kernel panics at reboot or shutdown on mid 2010 21.5" iMac
Date: Fri, 17 Nov 2023 15:22:09 +0700

 What might be useful to know there are details of the interrupt mappings
 between 9 and 10 boots, and whatever differences exist, possibly

 	grep interr /var/run/dmesg.boot

 might provide enough info.

 kre

From: Josh Moyer <JMoyer@nodomain.net>
To: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>,
	"kern-bug-people@netbsd.org" <kern-bug-people@netbsd.org>,
	"gnats-admin@netbsd.org" <gnats-admin@netbsd.org>, "netbsd-bugs@netbsd.org"
	<netbsd-bugs@netbsd.org>
Cc: 
Subject: RE: kern/57696: NetBSD-10.0_RC1-amd64-install.img.gz kernel panics at
 reboot or shutdown on mid 2010 21.5" iMac
Date: Fri, 17 Nov 2023 14:33:14 +0000

 > From: Robert Elz <kre@munnari.OZ.AU>
 > Date: Fri, 17 Nov 2023 15:22:09 +0700
 >
 > What might be useful to know there are details of the interrupt mappings
 > between 9 and 10 boots, and whatever differences exist, possibly
 >=20
 > 	grep interr /var/run/dmesg.boot
 >=20

 Identical between 9.3 and 10_RC1:

 acpi0: SCI interrupting at int 9
 hdaudio0: interrupting at msi0 vec 0
 uhci0: autoconfiguration error: couldn't map interrupt
 ehci0: interrupting at ioapic0 pin 21
 hdaudio1: interrupting at msi1 vec 0
 bge0: interrupting at msi2 vec 0
 athn0: interrupting at ioapic0 pin 17
 fwohci0: interrupting at ioapic0 pin 18
 uhci1: autoconfiguration error: couldn't map interrupt
 ehci1: interrupting at ioapic0 pin 23
 ahcisata0: interrupting at msi3 vec 0
 ichsmb0: interrupting at ioapic0 pin 20
 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
 =20

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.