NetBSD Problem Report #57563

From martin@aprisoft.de  Fri Aug  4 11:31:15 2023
Return-Path: <martin@aprisoft.de>
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 CAEA41A923A
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  4 Aug 2023 11:31:15 +0000 (UTC)
Message-Id: <20230804113103.EAEFB5CC794@emmas.aprisoft.de>
Date: Fri,  4 Aug 2023 13:31:03 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: xhci triggers softint while still cold
X-Send-Pr-Version: 3.95

>Number:         57563
>Category:       kern
>Synopsis:       xhci triggers softint while still cold
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 04 11:35:00 +0000 2023
>Last-Modified:  Fri Aug 04 12:25:01 +0000 2023
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.106
>Organization:
The NetBSD Foundation, Inc.
>Environment:
(this is wrong, can't boot the real env currently)
System: NetBSD h-pulse.aprisoft.de 9.99.100 NetBSD 9.99.100 (GENERIC64) #347: Mon Nov 28 19:40:07 CET 2022 martin@martins.aprisoft.de:/home/martin/wifi/sys/arch/evbarm/compile/GENERIC64 evbarm
Architecture: aarch64
Machine: evbarm
>Description:

When booting this board with a -current kernel it reproducably crashes
with an assertion:

[   1.0000040] enet0: interrupting on irq 152
[   1.0000040] enet0: couldn't find phy reset gpios
[   1.0000040] enet0: cannot get mac address. set randomly
[   1.0000040] enet0: Ethernet address 00:00:41:a7:3a:f1
[   1.0000040] atphy0 at enet0 phy 4: Atheros AR8035 10/100/1000 PHY, rev. 4
[   1.0000040] atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseSX-FDX, 1000baseT-FDX, auto
[   1.0000040] /soc@0/memory-controller@3d400000 at simplebus1 not configured
[   1.0000040] /soc@0/bus@30000000/watchdog@30280000 at simplebus3 not configured
[   1.0000040] /soc@0/bus@30000000/snvs@30370000/snvs-rtc-lp at syscon1 not configured
[   1.0000040] /soc@0/bus@30400000/timer@306a0000 at simplebus5 not configured
[   1.0000040] /soc@0/bus@30800000/crypto@30900000 at simplebus4 not configured
[   1.0000040] /soc@0/bus@30800000/mailbox@30aa0000 at simplebus4 not configured
[   1.0000040] sdhc0 at simplebus4: SDMMC (400000 kHz)
[   1.0000040] sdhc0: interrupting on irq 54
[   1.0000040] sdhc0: SDHC 3.0, rev 0, 32-bit ADMA2, 180000 kHz, HS SDR50 DDR50 1.8V 3.0V 3.3V, re-tuning mode 1, 4096 byte blocks
[   1.0000040] sdmmc0 at sdhc0 slot 0
[   1.0000040] sdhc1 at simplebus4: SDMMC (200000 kHz)
[   1.0000040] sdhc1: interrupting on irq 55
[   1.0000040] sdhc1: SDHC 3.0, rev 0, 32-bit ADMA2, 180000 kHz, HS SDR50 DDR50 1.8V 3.0V 3.3V, re-tuning mode 1, 4096 byte blocks
[   1.0000040] sdmmc1 at sdhc1 slot 0
[   1.0000040] /soc@0/bus@30800000/spi@30bb0000 at simplebus4 not configured
[   1.0000040] /soc@0/bus@32c00000/interrupt-controller@32e2d000 at simplebus6 not configured
[   1.0000040] xhci1 at simplebus1: DesignWare USB3 XHCI (rev. 3.10a)
[   1.0000040] xhci1: interrupting on irq 73
[   1.0000040] usb0 at xhci1: USB revision 3.0
[   1.0000040] usb1 at xhci1: USB revision 2.0
[   1.0000040] /soc@0/video-codec@38300000 at simplebus1 not configured
[   1.0000040] armpmu0 at simplebus0: Performance Monitor Unit
[   1.0000040] /soc@0/ddr-pmu@3d800000 at simplebus1 not configured
[   1.0000040] panic: kernel diagnostic assertion "!cold" failed: file "../../../../kern/kern_softint.c", line 491 
[   1.0000040] cpu0: Begin traceback...
[   1.0000040] trace fp ffffc0000120a810
[   1.0000040] fp ffffc0000120a840 vpanic() at ffffc00000598118 netbsd:vpanic+0x178
[   1.0000040] fp ffffc0000120a8a0 kern_assert() at ffffc00000831ec8 netbsd:kern_assert+0x58
[   1.0000040] fp ffffc0000120a930 softint_schedule() at ffffc0000055c750 netbsd:softint_schedule+0x190
[   1.0000040] fp ffffc0000120a960 usb_schedsoftintr() at ffffc00000184874 netbsd:usb_schedsoftintr+0x40
[   1.0000040] fp ffffc0000120a980 xhci_intr() at ffffc00000240abc netbsd:xhci_intr+0x8c
[   1.0000040] fp ffffc0000120a9c0 pic_dispatch() at ffffc0000000286c netbsd:pic_dispatch+0x4c
[   1.0000040] fp ffffc0000120aa10 gicv3_irq_handler() at ffffc00000006eb4 netbsd:gicv3_irq_handler+0x130
[   1.0000040] fp ffffc0000120aa70 cpu_irq() at ffffc000000b4ab8 netbsd:cpu_irq+0x48
[   1.0000040] tf ffffc0000120aaa0 el1_trap() at ffffc000000b6f84 netbsd:el1_vectors+0x784
[   1.0000040] ---- Interrupt: trapframe 0xffffc0000120aaa0 (304 bytes) ----
[   1.0000040]     pc=ffffc000000041dc,   spsr=0000000040000005
[   1.0000040]    esr=ffffffffffffffff,    far=0000000000000000
[   1.0000040]     x0=ffffc00040044000,     x1=0000000000000000
[   1.0000040]     x2=0000000000000000,     x3=ffffc00000e6f580
[   1.0000040]     x4=0000000000000000,     x5=00000000000000ff
[   1.0000040]     x6=0000000000000001,     x7=ffffc0000120ad00
[   1.0000040]     x8=0000000000000040,     x9=ffffc00000b81c88
[   1.0000040]    x10=0000000000000000,    x11=0101010101010101
[   1.0000040]    x12=ffffc0000120a7e8,    x13=ffffc0000125cb18
[   1.0000040]    x14=0000000000000020,    x15=ffff0000fe8b7710
[   1.0000040]    x16=ffffc00000005510,    x17=5d84947c95d6d38a
[   1.0000040]    x18=0000000000001000,    x19=0000000000000000
[   1.0000040]    x20=ffffc00000e6f580,    x21=0000000000000007
[   1.0000040]    x22=0000000000000000,    x23=ffffc00000bd91a0
[   1.0000040]    x24=00000000fd53b8e0,    x25=00000000fd53be60
[   1.0000040]    x26=00000000fd53a868,    x27=00000000fd517814
[   1.0000040]    x28=00000000fe546a20, fp=x29=ffffc0000120add0
[   1.0000040] lr=x30=ffffc000000041c0,     sp=ffffc0000120add0
[   1.0000040] ------------------------------------------------
[   1.0000040] fp ffffc0000120add0 _spllower() at ffffc000000041dc netbsd:_spllower+0x8c
[   1.0000040] fp ffffc0000120ae00 cpu_configure() at ffffc0000006e0e8 netbsd:cpu_configure+0x58
[   1.0000040] fp ffffc0000120ae30 main() at ffffc000008321a4 netbsd:main+0x2d4
[   1.0000040] fp 0000000000000000 aarch64_start() at ffffc0000000189c netbsd:aarch64_start+0x109c
[   1.0000040] cpu0: End traceback...
Stopped in pid 0.0 (system) at  netbsd:cpu_Debugger+0xc:        ldp     x29, x30
, [sp],#16


Old dmesg (from last weeks kernel) is:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
    2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
    2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 10.99.6 (GENERIC64) #393: Wed Jul 26 11:35:23 CEST 2023
	martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbarm/compile/GENERIC64
total memory = 3052 MB
avail memory = 2941 MB
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
armfdt0 (root)
simplebus0 at armfdt0: SolidRun i.MX8MQ HummingBoard Pulse
simplebus1 at simplebus0
cpus0 at simplebus0
psci0 at simplebus0: PSCI 1.1
simplebus2 at simplebus0
cpu0 at cpus0: Arm Cortex-A53 r0p4 (v8-A), id 0x0
cpu0: package 0, core 0, smt 0
cpu0: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
cpu0: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
cpu0: Dcache line 64, Icache line 64, DIC=0, IDC=0, LoUU=1, LoC=2, LoUIS=1
cpu0: L1 32KB/64B 2-way (256 set) VIPT Instruction cache
cpu0: L1 32KB/64B 4-way (128 set) PIPT Data cache
cpu0: L2 1024KB/64B 16-way (1024 set) PIPT Unified cache
cpu0: revID=0x180, PMCv3, 4k table, 64k table, 16bit ASID
cpu0: auxID=0x11120, GICv3, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
cpufreqdt0 at cpu0
cpu1 at cpus0: Arm Cortex-A53 r0p4 (v8-A), id 0x1
cpu1: package 0, core 1, smt 0
cpu1: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
cpu1: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
cpu1: Dcache line 64, Icache line 64, DIC=0, IDC=0, LoUU=1, LoC=2, LoUIS=1
cpu1: L1 32KB/64B 2-way (256 set) VIPT Instruction cache
cpu1: L1 32KB/64B 4-way (128 set) PIPT Data cache
cpu1: L2 1024KB/64B 16-way (1024 set) PIPT Unified cache
cpu1: revID=0x180, PMCv3, 4k table, 64k table, 16bit ASID
cpu1: auxID=0x11120, GICv3, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
cpufreqdt1 at cpu1
cpu2 at cpus0: Arm Cortex-A53 r0p4 (v8-A), id 0x2
cpu2: package 0, core 2, smt 0
cpu2: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
cpu2: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
cpu2: Dcache line 64, Icache line 64, DIC=0, IDC=0, LoUU=1, LoC=2, LoUIS=1
cpu2: L1 32KB/64B 2-way (256 set) VIPT Instruction cache
cpu2: L1 32KB/64B 4-way (128 set) PIPT Data cache
cpu2: L2 1024KB/64B 16-way (1024 set) PIPT Unified cache
cpu2: revID=0x180, PMCv3, 4k table, 64k table, 16bit ASID
cpu2: auxID=0x11120, GICv3, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
cpufreqdt2 at cpu2
cpu3 at cpus0: Arm Cortex-A53 r0p4 (v8-A), id 0x3
cpu3: package 0, core 3, smt 0
cpu3: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
cpu3: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
cpu3: Dcache line 64, Icache line 64, DIC=0, IDC=0, LoUU=1, LoC=2, LoUIS=1
cpu3: L1 32KB/64B 2-way (256 set) VIPT Instruction cache
cpu3: L1 32KB/64B 4-way (128 set) PIPT Data cache
cpu3: L2 1024KB/64B 16-way (1024 set) PIPT Unified cache
cpu3: revID=0x180, PMCv3, 4k table, 64k table, 16bit ASID
cpu3: auxID=0x11120, GICv3, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
cpufreqdt3 at cpu3
simplebus3 at simplebus1
simplebus4 at simplebus1
simplebus5 at simplebus1
simplebus6 at simplebus1
syscon0 at simplebus3: System Controller Registers
gicvthree0 at simplebus1: GICv3
gicvthree0: iidr 0x0001143b, cpuif non-secure, dist non-secure, priority shift 4, pmr shift 4, quirks 0
syscon1 at simplebus3: System Controller Registers
fclock0 at simplebus0: 32768 Hz fixed clock (ckil)
fclock1 at simplebus0: 25000000 Hz fixed clock (osc_25m)
fclock2 at simplebus0: 27000000 Hz fixed clock (osc_27m)
fclock3 at simplebus0: 133000000 Hz fixed clock (clk_ext1)
fclock4 at simplebus0: 133000000 Hz fixed clock (clk_ext2)
fclock5 at simplebus0: 133000000 Hz fixed clock (clk_ext3)
fclock6 at simplebus0: 133000000 Hz fixed clock (clk_ext4)
syscon2 at simplebus3: System Controller Registers
syscon3 at simplebus3: System Controller Registers
syscon4 at simplebus3: System Controller Registers
imx7gpc0 at simplebus3: General Power Controller
imx8mqccm0 at simplebus3: Clock Control Module
imxiomux0 at simplebus3: IOMUX Controller
gtmr0 at simplebus0: Generic Timer
gtmr0: interrupting on GICv3 irq 27
armgtmr0 at gtmr0: Generic Timer (8333 kHz, virtual)
timecounter: Timecounter "armgtmr0" frequency 8333333 Hz quality 500
imxgpio0 at simplebus3: GPIO (gpio@30200000)
imxgpio0: interrupting on irq 96
imxgpio0: interrupting on irq 97
imxgpio0: interrupts 16384..16415
gpio0 at imxgpio0: 32 pins
imxgpio1 at simplebus3: GPIO (gpio@30210000)
imxgpio1: interrupting on irq 98
imxgpio1: interrupting on irq 99
imxgpio1: interrupts 16416..16447
gpio1 at imxgpio1: 32 pins
imxgpio2 at simplebus3: GPIO (gpio@30220000)
imxgpio2: interrupting on irq 100
imxgpio2: interrupting on irq 101
imxgpio2: interrupts 16448..16479
gpio2 at imxgpio2: 32 pins
imxgpio3 at simplebus3: GPIO (gpio@30230000)
imxgpio3: interrupting on irq 102
imxgpio3: interrupting on irq 103
imxgpio3: interrupts 16480..16511
gpio3 at imxgpio3: 32 pins
imxgpio4 at simplebus3: GPIO (gpio@30240000)
imxgpio4: interrupting on irq 104
imxgpio4: interrupting on irq 105
imxgpio4: interrupts 16512..16543
gpio4 at imxgpio4: 32 pins
imxi2c0 at simplebus4
iic0 at imxi2c0: I2C bus
pmic (fsl,pfuze100) at iic0 addr 0x08 not configured
seeprom0 at iic0 addr 0x50: eeprom
seeprom0: autoconfiguration error: invalid size specified; assuming 2KB (16Kb)
fregulator0 at simplebus0: VSD_3V3
imxi2c1 at simplebus4
iic1 at imxi2c1: I2C bus
seeprom1 at iic1 addr 0x50: usb-typec
seeprom1: autoconfiguration error: invalid size specified; assuming 2KB (16Kb)
imxuart0 at simplebus4, 25000000 Hz
imxuart0: interrupting on irq 58
imxuart0: console
imxuart1 at simplebus4, 25000000 Hz
imxuart1: interrupting on irq 60
imxuart2 at simplebus4, 25000000 Hz
imxuart2: interrupting on irq 59
imxi2c2 at simplebus4
iic2 at imxi2c2: I2C bus
seeprom2 at iic2 addr 0x57: eeprom: size 256
rtc (abracon,ab1805) at iic2 addr 0x69 not configured
imxuart3 at simplebus4, 25000000 Hz
imxuart3: interrupting on irq 61
fregulator1 at simplebus0: vdd_3v3
fregulator2 at simplebus0: v_5v0
imx8mqusbphy0 at simplebus1: USB PHY
imx8mqusbphy1 at simplebus1: USB PHY
/opp-table at simplebus0 not configured
/soc@0/bus@30000000/tmu@30260000 at simplebus3 not configured
/soc@0/gpu@38000000 at simplebus1 not configured
/soc@0/bus@30000000/sdma@302c0000 at simplebus3 not configured
/soc@0/bus@30800000/sdma@30bd0000 at simplebus4 not configured
/soc@0/interconnect@32700000 at simplebus1 not configured
/soc@0/bus@30000000/syscon@30340000/mux-controller at syscon2 not configured
xhci0 at simplebus1autoconfiguration error: : cannot switch 'otg' mode to host
enet0 at simplebus4: Gigabit Ethernet Controller
enet0: interrupting on irq 150
enet0: interrupting on irq 151
enet0: interrupting on irq 152
enet0: autoconfiguration error: couldn't find phy reset gpios
enet0: autoconfiguration error: cannot get mac address. set randomly
enet0: Ethernet address 00:00:41:a7:3a:f1
atphy0 at enet0 phy 4: Atheros AR8035 10/100/1000 PHY, rev. 4
atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseSX-FDX, 1000baseT-FDX, auto
/soc@0/memory-controller@3d400000 at simplebus1 not configured
/soc@0/bus@30000000/watchdog@30280000 at simplebus3 not configured
/soc@0/bus@30000000/snvs@30370000/snvs-rtc-lp at syscon1 not configured
/soc@0/bus@30400000/timer@306a0000 at simplebus5 not configured
/soc@0/bus@30800000/crypto@30900000 at simplebus4 not configured
/soc@0/bus@30800000/mailbox@30aa0000 at simplebus4 not configured
sdhc0 at simplebus4: SDMMC (400000 kHz)
sdhc0: interrupting on irq 54
sdhc0: SDHC 3.0, rev 0, caps <07ffb407/00000005>, 32-bit ADMA2, 180000 kHz, HS SDR50 DDR50 1.8V 3.0V 3.3V, re-tuning mode 1, 4096 byte blocks
sdmmc0 at sdhc0 slot 0
sdhc1 at simplebus4: SDMMC (200000 kHz)
sdhc1: interrupting on irq 55
sdhc1: SDHC 3.0, rev 0, caps <07ffb407/00000005>, 32-bit ADMA2, 180000 kHz, HS SDR50 DDR50 1.8V 3.0V 3.3V, re-tuning mode 1, 4096 byte blocks
sdmmc1 at sdhc1 slot 0
/soc@0/bus@30800000/spi@30bb0000 at simplebus4 not configured
/soc@0/bus@32c00000/interrupt-controller@32e2d000 at simplebus6 not configured
xhci1 at simplebus1: DesignWare USB3 XHCI (rev. 3.10a)
xhci1: interrupting on irq 73
xhci1: xHCI version 1.10
usb0 at xhci1: USB revision 3.0
usb1 at xhci1: USB revision 2.0
/soc@0/video-codec@38300000 at simplebus1 not configured
armpmu0 at simplebus0: Performance Monitor Unit
/soc@0/ddr-pmu@3d800000 at simplebus1 not configured
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
cpufreqdt0: autoconfiguration error: couldn't acquire clock
cpufreqdt1: autoconfiguration error: couldn't acquire clock
cpufreqdt2: autoconfiguration error: couldn't acquire clock
cpufreqdt3: autoconfiguration error: couldn't acquire clock
uhub0 at usb0: NetBSD (0x0000) xHCI root hub (0x0000), class 9/0, rev 3.00/1.00, addr 0
uhub0: 1 port with 1 removable, self powered
uhub1 at usb1: NetBSD (0x0000) xHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 0
uhub1: 1 port with 1 removable, self powered
armpmu0: interrupting on GICv3 irq 23
WARNING: system needs entropy for security; see entropy(7)
IPsec: Initialized Security Association Processing.
sdmmc1: SD card status: 4-bit, C10
ld1 at sdmmc1: <0xfe:0x3432:SD16G:0x20:0x0000ea76:0x153>
ld1: 7680 MB, 3900 cyl, 64 head, 63 sec, 512 bytes/sect x 15728640 sectors
ld1: 4-bit width, High-Speed/SDR25, 50.000 MHz
uhub2 at uhub1 port 1: vendor 04b4 (0x04b4) product 6502 (0x6502), class 9/0, rev 2.10/50.10, addr 1
uhub2: multiple transaction translators
uhub3 at uhub0 port 1: vendor 04b4 (0x04b4) product 6500 (0x6500), class 9/0, rev 3.00/50.10, addr 2
uhub2: 4 ports with 4 removable, self powered
uhub3: 4 ports with 4 removable, self powered
swwdog0: software watchdog initialized
WARNING: 9 errors while detecting hardware; check system log.
boot device: ld1
root on ld1a dumps on ld1b
root file system type: ffs
kern.module.path=/stand/evbarm/10.99.6/modules
WARNING: no TOD clock present
WARNING: using filesystem time
WARNING: CHECK AND RESET THE DATE!
entropy: ready


>How-To-Repeat:

Just boot.

>Fix:
n/a

>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57563 CVS commit: src/sys/kern
Date: Fri, 4 Aug 2023 12:24:36 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Fri Aug  4 12:24:36 UTC 2023

 Modified Files:
 	src/sys/kern: kern_softint.c

 Log Message:
 Revert "softint(9): Sprinkle KASSERT(!cold)."

 Temporary workaround for PR kern/57563 -- to be fixed properly after
 analysis.


 To generate a diff of this commit:
 cvs rdiff -u -r1.74 -r1.75 src/sys/kern/kern_softint.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

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.