NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/58181: wsbell causes system to freeze on VE-900



On Sun, Apr 21, 2024 at 7:20 AM <rxg%lavabit.com@localhost> wrote:
>
> >Number:         58181
> >Category:       port-amd64
> >Synopsis:       wsbell causes system to freeze on VE-900
> >Confidential:   no
> >Severity:       serious
> >Priority:       medium
> >Responsible:    port-amd64-maintainer
> >State:          open
> >Class:          sw-bug
> >Submitter-Id:   net
> >Arrival-Date:   Sun Apr 21 04:20:00 +0000 2024
> >Originator:     rxg
> >Release:        NetBSD 10.0
> >Organization:
>
> >Environment:
> NetBSD netbsd 10.0 NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
> Architecture: x86_64
> Machine: amd64
> >Description:
> It causes system to freeze when beep is triggered if wsbell were loaded.
> >How-To-Repeat:
> Load wsbell first and log in to system as root, then press the backspace key.
> It freezes and keeps beeping, shows only such message:
> [   53.1730719] audio1(hdafg1): device timeout
> >Fix:
>

To add to the bug report from my own system (EPIA-M900) the issue is
caused by the VX900 integrated graphics HDMI audio codec when
wsbell(4) is attached to it through wsmux(4). The beep (and likely
system?) "hangs" until device timeout is reached (which is visible by
the error message reported in the bug report). Few beeps just after
timeout may work until next hang (I guess they not immediately routed
to affected device). After timeout is reached, beeping also stops
(unless it is triggered again when cycle repeats). If this particular
wsbell is removed from the wsmux (e.g. wsmuxctl -f 1 -r wsbell1), the
issue doesn't reoccur (being it integrated speaker or integrated
hdaudio device).

The error message I received is: audio0(hdafg0): audio_drain: device
timeout, seq=0, usrbuf=2880/H65280, outbuf=1920/1920

Similar issue likely happens if sound is tested with audcfg test 0:
[    71.509737] audio0(hdafg0): audio_write: device timeout, seq=0,
usrbuf=65280/H65280, outbuf=1920/1920
[    74.509747] audio0(hdafg0): audio_drain: device timeout, seq=0,
usrbuf=65280/H65280, outbuf=1920/1920

Besides  It will also print: "audcfg: write: Resource temporarily unavailable".

I assume that device may need some quirk to be supported, however, I
wonder if it can be detected and fix introduced to just fail fast
instead of getting into this freeze state, even if device itself is
not supported.

P.S. With proper load and some actions like shutdown this can trigger
crashes or other errors (had heartbeat crash, mutex assertion fail,
timecounters reporting negative value, etc).

dmesg:
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,
    2024
    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.10 (GENERIC) #8: Fri Apr 19 00:56:54 EEST 2024
    andriusv@agraphic-pc:/home/andriusv/obj/sys/arch/amd64/compile/GENERIC
total memory = 7167 MB
avail memory = 6907 MB
WARNING: module error: module `pciverbose' pushed by boot loader already exists
WARNING: module error: module `drmkms_pci' pushed by boot loader already exists
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
mainbus0 (root)
ACPI: RSDP 0x00000000000F9CD0 000024 (v02 ACPIAM)
ACPI: XSDT 0x00000000BFFB0100 000054 (v01 041012 XSDT1616 20120410
MSFT 00000097)
ACPI: FACP 0x00000000BFFB0290 0000F4 (v04 041012 FACP1616 20120410
MSFT 00000097)
ACPI: DSDT 0x00000000BFFB04B0 00428A (v02 I2F00  I2F00107 00000107
INTL 20051117)
ACPI: FACS 0x00000000BFFBE000 000040
ACPI: APIC 0x00000000BFFB0390 000082 (v02 041012 APIC1616 20120410
MSFT 00000097)
ACPI: MCFG 0x00000000BFFB0420 00003C (v01 041012 OEMMCFG  20120410
MSFT 00000097)
ACPI: WDRT 0x00000000BFFB0460 000047 (v01 041012 OEMWDRT  20120410
MSFT 00000097)
ACPI: OEMB 0x00000000BFFBE040 000072 (v01 041012 OEMB1616 20120410
MSFT 00000097)
ACPI: HPET 0x00000000BFFBA4B0 000038 (v01 041012 VIA HPET 20120410
MSFT 00000097)
ACPI: 1 ACPI AML tables successfully acquired and loaded
ioapic0 at mainbus0 apid 3: pa 0xfec00000, version 0x3, 24 pins
ioapic1 at mainbus0 apid 4: pa 0xfecc0000, version 0x3, 24 pins
cpu0 at mainbus0 apid 0
cpu0: Use cpuid to serialize rdtsc
cpu0: VIA Nano X2 L4350 @ 1.6+ GHz, id 0x6fc
cpu0: node 0, package 0, core 0, smt 0
cpu1 at mainbus0 apid 2
cpu1: VIA Nano X2 L4350 @ 1.6+ GHz, id 0x6fc
cpu1: node 0, package 0, core 0, smt 0
acpi0 at mainbus0: Intel ACPICA 20230628
acpi0: X/RSDT: OemId <041012,XSDT1616,20120410>, AslId <MSFT,00000097>
allocated pic ioapic0 type level pin 9 level 6 to cpu0 slot 0 idt entry 96
acpi0: MCFG: segment 0, bus 0-255, address 0x00000000e0000000
acpi0: SCI interrupting at int 9
acpi0: fixed power button present
timecounter: Timecounter "ACPI-Safe" frequency 3579545 Hz quality 900
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
NBPE (PNP0C01) at acpi0 not configured
acpiacad0 at acpi0 (ACDP, ACPI0003): ACPI AC Adapter
attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43
pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
spkr0 at pcppi1: PC Speaker
wsbell at spkr0 not configured
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1
com0 at acpi0 (UAR1, PNP0501-1): io 0x3f8-0x3ff irq 4
com0: ns16550a, 16-byte FIFO
allocated pic ioapic0 type edge pin 4 level 8 to cpu0 slot 1 idt entry 129
acpibut0 at acpi0 (SLPB, PNP0C0E): ACPI Sleep Button
RMEM (PNP0C01) at acpi0 not configured
acpibut1 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
acpiwdrt0 at acpi0: mem 0xfed01000,0xfed01004
acpiwdrt0: watchdog interval 1-1023 sec.
ACPI: Enabled 3 GPEs in block 00 to 0F
attimer1: attached to pcppi1
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: VIA Technologies VX900 Host Bridge (rev. 0x80)
pchb1 at pci0 dev 0 function 1: VIA Technologies VX900 Error Reporting
(rev. 0x00)
pchb2 at pci0 dev 0 function 2: VIA Technologies VX900 CPU Bus
Controller (rev. 0x00)
pchb3 at pci0 dev 0 function 3: VIA Technologies VX900 DRAM Controller
(rev. 0x00)
pchb4 at pci0 dev 0 function 4: VIA Technologies VX900 Power
Management Controller (rev. 0x00)
pchb5 at pci0 dev 0 function 5: VIA Technologies VX900 APIC and
Traffic Controller (rev. 0x00)
pchb6 at pci0 dev 0 function 6: VIA Technologies VX900 Scratch
Registers (rev. 0x00)
pchb7 at pci0 dev 0 function 7: VIA Technologies VX900 North-South
Module Interface Control (rev. 0x00)
vga0 at pci0 dev 1 function 0: VIA Technologies VX900 Graphics
[Chrome9 HD] (rev. 0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
viadrmums0 at vga0
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
[drm] Initialized via 2.11.1 20070202 for viadrmums0 on minor 0
hdaudio0 at pci0 dev 1 function 1: HD Audio Controller
allocated pic msi0 type edge pin 0 level 7 to cpu0 slot 16 idt entry 112
hdaudio0: interrupting at msi0 vec 0
hdaudio0: HDA ver. 1.0, OSS 2, ISS 0, BSS 0, SDO 1, 64-bit
hdafg0 at hdaudio0: VIA VX900 HDMI/DP
hdafg0: HDMI00 2ch: Digital Out [Jack]
hdafg0: 2ch/0ch 32000Hz 44100Hz 48000Hz PCM16 PCM24 AC3
audio0 at hdafg0: playback
audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for playback
spkr1 at audio0: PC Speaker (synthesized)
wsbell at spkr1 not configured
ppb0 at pci0 dev 3 function 0: VIA Technologies VX900 PCI Express Root
Port 0 (rev. 0x00)
ppb0: PCI Express capability version 2 <Root Port of PCI-E Root
Complex> x8 @ 5.0GT/s
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
ppb1 at pci0 dev 3 function 1: VIA Technologies VX900 PCI Express Root
Port 1 (rev. 0x00)
ppb1: PCI Express capability version 2 <Root Port of PCI-E Root
Complex> x1 @ 5.0GT/s
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
ppb2 at pci0 dev 3 function 2: VIA Technologies VX900 PCI Express Root
Port 2 (rev. 0x00)
ppb2: PCI Express capability version 2 <Root Port of PCI-E Root
Complex> x1 @ 5.0GT/s
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
ppb3 at pci0 dev 3 function 3: VIA Technologies VX900 PCI Express Root
Port 3 (rev. 0x00)
ppb3: PCI Express capability version 2 <Root Port of PCI-E Root
Complex> x1 @ 5.0GT/s
ppb3: link is x1 @ 2.5GT/s
pci4 at ppb3 bus 5
pci4: i/o space, memory space enabled, rd/line, wr/inv ok
vge0 at pci4 dev 0 function 0: VIA VT612X Gigabit Ethernet (rev. 0x82)
allocated pic ioapic1 type level pin 12 level 6 to cpu0 slot 2 idt entry 97
vge0: interrupting at ioapic1 pin 12
vge0: Ethernet address xx:xx:xx:xx:xx:xx
ipgphy0 at vge0 phy 22: IP1001 10/100/1000 PHY, rev. 0
ipgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
1000baseT-FDX, auto
pchb8 at pci0 dev 3 function 4: VIA Technologies VX900 PCI Express
Physical Layer Electrical Sub-block (rev. 0x00)
viaide0 at pci0 dev 15 function 0
viaide0: VIA Technologies VX900 ATA133 controller
viaide0: bus-master DMA support present
viaide0: primary channel configured to native-PCI mode
allocated pic ioapic0 type level pin 21 level 6 to cpu0 slot 3 idt entry 98
viaide0: using ioapic0 pin 21 for native-PCI interrupt
atabus0 at viaide0 channel 0
viaide0: secondary channel configured to native-PCI mode
atabus1 at viaide0 channel 1
uhci0 at pci0 dev 16 function 0: VIA Technologies VT83C572 USB
Controller (rev. 0xa0)
allocated pic ioapic0 type level pin 20 level 6 to cpu0 slot 4 idt entry 99
uhci0: interrupting at ioapic0 pin 20
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 16 function 1: VIA Technologies VT83C572 USB
Controller (rev. 0xa0)
allocated pic ioapic0 type level pin 22 level 6 to cpu0 slot 5 idt entry 100
uhci1: interrupting at ioapic0 pin 22
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 16 function 2: VIA Technologies VT83C572 USB
Controller (rev. 0xa0)
allocated pic ioapic0 type level pin 21 level 6 to cpu0 slot 3 idt entry 98
uhci2: interrupting at ioapic0 pin 21
usb2 at uhci2: USB revision 1.0
uhci3 at pci0 dev 16 function 3: VIA Technologies VT83C572 USB
Controller (rev. 0xa0)
allocated pic ioapic0 type level pin 23 level 6 to cpu0 slot 6 idt entry 101
uhci3: interrupting at ioapic0 pin 23
usb3 at uhci3: USB revision 1.0
ehci0 at pci0 dev 16 function 4: VIA Technologies VT8237 EHCI USB
Controller (rev. 0x90)
ehci0: 32-bit DMA
allocated pic ioapic0 type level pin 23 level 6 to cpu0 slot 6 idt entry 101
ehci0: interrupting at ioapic0 pin 23
ehci0: dropped intr workaround enabled
ehci0: EHCI version 1.0
ehci0: 4 companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
ehci0: Using DMA subregion for control data structures
usb4 at ehci0: USB revision 2.0
pcib0 at pci0 dev 17 function 0: VIA Technologies VX900 Bus Control
and Power Management (rev. 0x00)
pchb9 at pci0 dev 17 function 7: VIA Technologies VX8xx/VX900
South-North Module Interface Control (rev. 0x00)
ppb4 at pci0 dev 19 function 0: VIA Technologies VX8xx/VX900 PCI to
PCI Bridge (rev. 0x00)
pci5 at ppb4 bus 6
pci5: i/o space, memory space enabled
hdaudio1 at pci0 dev 20 function 0: HD Audio Controller
allocated pic msi1 type edge pin 0 level 7 to cpu0 slot 17 idt entry 113
hdaudio1: interrupting at msi1 vec 0
hdaudio1: HDA ver. 1.0, OSS 4, ISS 4, BSS 0, SDO 1, 64-bit
hdafg1 at hdaudio1: VIA VT2020
hdafg1: DAC00 2ch: Speaker [Jack], HP Out [Jack]
hdafg1: ADC01 2ch: Line In [Jack], Mic In [Jack]
hdafg1: DIG02 2ch: SPDIF Out [Jack]
hdafg1: 2ch/2ch 48000Hz PCM16*
audio1 at hdafg1: playback, capture, full duplex, independent
audio1: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for playback
audio1: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for recording
spkr2 at audio1: PC Speaker (synthesized)
wsbell at spkr2 not configured
isa0 at pcib0
pckbc0 at isa0 port 0x60-0x64
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: HLT, lat   0 us, pow     0 mW
acpicpu0: T0: I/O, lat   1 us, pow     0 mW, 100 %
acpicpu0: T1: I/O, lat   1 us, pow     0 mW,  94 %
acpicpu0: T2: I/O, lat   1 us, pow     0 mW,  88 %
acpicpu0: T3: I/O, lat   1 us, pow     0 mW,  82 %
acpicpu0: T4: I/O, lat   1 us, pow     0 mW,  76 %
acpicpu0: T5: I/O, lat   1 us, pow     0 mW,  70 %
acpicpu0: T6: I/O, lat   1 us, pow     0 mW,  64 %
acpicpu0: T7: I/O, lat   1 us, pow     0 mW,  58 %
acpicpu0: T8: I/O, lat   1 us, pow     0 mW,  52 %
acpicpu0: T9: I/O, lat   1 us, pow     0 mW,  46 %
acpicpu0: T10: I/O, lat   1 us, pow     0 mW,  40 %
acpicpu0: T11: I/O, lat   1 us, pow     0 mW,  34 %
acpicpu0: T12: I/O, lat   1 us, pow     0 mW,  28 %
acpicpu0: T13: I/O, lat   1 us, pow     0 mW,  22 %
acpicpu0: T14: I/O, lat   1 us, pow     0 mW,  16 %
acpicpu0: T15: I/O, lat   1 us, pow     0 mW,  10 %
viac7temp0 at cpu0: VIA C7/Nano temperature sensor
acpicpu1 at cpu1: ACPI CPU
viac7temp1 at cpu1: VIA C7/Nano temperature sensor
timecounter: Timecounter "lapic" frequency 266676000 Hz quality -100
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "TSC" frequency 1733396000 Hz quality -100
acpiacad0: AC adapter online.
IPsec: Initialized Security Association Processing.
uhub0 at usb0: NetBSD (0x0000) UHCI root hub (0x0000), class 9/0, rev
1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb1: NetBSD (0x0000) UHCI root hub (0x0000), class 9/0, rev
1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2 at usb2: NetBSD (0x0000) UHCI root hub (0x0000), class 9/0, rev
1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhub3 at usb3: NetBSD (0x0000) UHCI root hub (0x0000), class 9/0, rev
1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
uhub4 at usb4: NetBSD (0x0000) EHCI root hub (0x0000), class 9/0, rev
2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
ehci0: handing over low speed device on port 4 to uhci1
umass0 at uhub4 port 7 configuration 1 interface 0
umass0: ADATA (0x125f) ADATA USB Flash Drive (0xdd1a), rev 2.10/11.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <ADATA, USB Flash Drive, 1100> disk removable
sd0: fabricating a geometry
sd0: 29600 MB, 29600 cyl, 64 head, 32 sec, 512 bytes/sect x 60620800 sectors
sd0: fabricating a geometry
uhidev0 at uhub1 port 2 configuration 1 interface 0
uhidev0: CASUE (0x2a7a) CASUE USB Keyboard (0x9a18), rev 1.10/0.01,
addr 2, iclass 3/1
ukbd0 at uhidev0
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub1 port 2 configuration 1 interface 1
uhidev1: CASUE (0x2a7a) CASUE USB Keyboard (0x9a18), rev 1.10/0.01,
addr 2, iclass 3/0
uhidev1: 2 report ids
uhid0 at uhidev1 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev1 reportid 2: input=3, output=0, feature=0
crypto: assign driver 0, flags 2
crypto: driver 0 registers alg 1 flags 0 maxoplen 0
crypto: driver 0 registers alg 2 flags 0 maxoplen 0
crypto: driver 0 registers alg 3 flags 0 maxoplen 0
crypto: driver 0 registers alg 4 flags 0 maxoplen 0
crypto: driver 0 registers alg 5 flags 0 maxoplen 0
crypto: driver 0 registers alg 26 flags 0 maxoplen 0
crypto: driver 0 registers alg 27 flags 0 maxoplen 0
crypto: driver 0 registers alg 29 flags 0 maxoplen 0
crypto: driver 0 registers alg 33 flags 0 maxoplen 0
crypto: driver 0 registers alg 17 flags 0 maxoplen 0
crypto: driver 0 registers alg 6 flags 0 maxoplen 0
crypto: driver 0 registers alg 19 flags 0 maxoplen 0
crypto: driver 0 registers alg 7 flags 0 maxoplen 0
crypto: driver 0 registers alg 20 flags 0 maxoplen 0
crypto: driver 0 registers alg 15 flags 0 maxoplen 0
crypto: driver 0 registers alg 24 flags 0 maxoplen 0
crypto: driver 0 registers alg 25 flags 0 maxoplen 0
crypto: driver 0 registers alg 8 flags 0 maxoplen 0
crypto: driver 0 registers alg 21 flags 0 maxoplen 0
crypto: driver 0 registers alg 16 flags 0 maxoplen 0
crypto: driver 0 registers alg 9 flags 0 maxoplen 0
crypto: driver 0 registers alg 10 flags 0 maxoplen 0
crypto: driver 0 registers alg 13 flags 0 maxoplen 0
crypto: driver 0 registers alg 14 flags 0 maxoplen 0
crypto: driver 0 registers alg 28 flags 0 maxoplen 0
crypto: driver 0 registers alg 30 flags 0 maxoplen 0
crypto: driver 0 registers alg 31 flags 0 maxoplen 0
crypto: driver 0 registers alg 32 flags 0 maxoplen 0
crypto: driver 0 registers alg 11 flags 0 maxoplen 0
crypto: driver 0 registers alg 18 flags 0 maxoplen 0
crypto: driver 0 registers alg 23 flags 0 maxoplen 0
crypto: driver 0 registers alg 22 flags 0 maxoplen 0
swwdog0: software watchdog initialized
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs
kern.module.path=/stand/amd64/10.99.10/modules
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
wsbell1 at spkr1 mux 1
wsbell2 at spkr2 mux 1
audio1(hdafg1): audio_drain: device timeout, seq=0,
usrbuf=2880/H65280, outbuf=1920/1920
audio0(hdafg0): audio_drain: device timeout, seq=0,
usrbuf=2880/H65280, outbuf=1920/1920


Regards,
Andrius V


Home | Main Index | Thread Index | Old Index