* xhci: unratelimited "buffer overrun event" warning floods log (~7000/s) with USB S/PDIF capture device
@ 2026-11-21 6:58 Alex Kononov
2026-11-21 9:30 ` Michal Pecio
0 siblings, 1 reply; 2+ messages in thread
From: Alex Kononov @ 2026-11-21 6:58 UTC (permalink / raw)
To: 'Mathias Nyman'; +Cc: linux-usb, 'Takashi Iwai', linux-sound
Good day Mathias,
With a USB S/PDIF TX/RX adapter (Savitech, 262a:9123, UAC2, high speed), the
xHCI driver logs an isochronous buffer overrun warning for nearly
every microframe while the adapter's S/PDIF input has no signal:
xhci_hcd 0000:00:14.0: WARN: buffer overrun event for slot 2 ep 4 on
endpoint
Rate measured: ~433,000 messages per minute (~7,200/s). systemd-journald
sits at 100% of one core and reports "Missed N kernel messages".
Setup:
- Intel N100 (PCH xHCI 0000:00:14.0), Debian 13
- Kernel: 6.12.117+deb13-amd64 (same code in mainline 7.4-rc3)
- Capture stream open continuously (CamillaDSP), 48 kHz S16_LE,
EP 0x82 IN isochronous, adaptive, 125 us interval
- TV feeding the S/PDIF input goes idle -> no input signal -> flood.
With a valid input signal the count is 0.
The device is clearly misbehaving (it sends more data than requested when
the S/PDIF receiver is unlocked; it also reports its clock source
as valid while unlocked). The driver handles the events correctly and audio
recovers fine. The problem is only the logging: the warning in
handle_tx_event() for COMP_ISOCH_BUFFER_OVERRUN is not rate-limited, so a
single misbehaving isoc device can generate thousands of lines per second.
Locally I changed that xhci_warn() to dev_warn_ratelimited() and the rate
dropped to ~100/min with no functional change.
Would a patch rate-limiting this message (or demoting it to xhci_dbg) be
acceptable?
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ handle_tx_event()
case COMP_ISOCH_BUFFER_OVERRUN:
- xhci_warn(xhci,
- "WARN: buffer overrun event for slot %u ep %u on
endpoint",
- slot_id, ep_index);
+ dev_warn_ratelimited(xhci_to_hcd(xhci)->self.controller,
+ "WARN: buffer overrun event for slot %u
ep %u on endpoint\n",
+ slot_id, ep_index);
break;
or
case COMP_ISOCH_BUFFER_OVERRUN:
- xhci_warn(xhci,
- "WARN: buffer overrun event for slot %u ep %u on
endpoint",
- slot_id, ep_index);
+ xhci_dbg(xhci, "Buffer overrun event for slot %u ep %u\n",
+ slot_id, ep_index);
break;
Endpoint descriptor:
Endpoint 0x82 (capture), from lsusb -v:
altset 1 (S16_LE): Isochronous, Adaptive, wMaxPacketSize 104, bInterval 1
altset 2 (S24_3LE): Isochronous, Adaptive, wMaxPacketSize 156, bInterval 1
/proc/asound/card0/stream0 while flooding:
Capture: Status: Running, Interface 3, Altset 1,
Packet Size = 36, Momentary freq = 48000 Hz
Thank you,
Alex.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: xhci: unratelimited "buffer overrun event" warning floods log (~7000/s) with USB S/PDIF capture device
2026-11-21 6:58 xhci: unratelimited "buffer overrun event" warning floods log (~7000/s) with USB S/PDIF capture device Alex Kononov
@ 2026-11-21 9:30 ` Michal Pecio
0 siblings, 0 replies; 2+ messages in thread
From: Michal Pecio @ 2026-11-21 9:30 UTC (permalink / raw)
To: Alex Kononov
Cc: 'Mathias Nyman', linux-usb, 'Takashi Iwai',
linux-sound
Hi,
On Sat, 21 Nov 2026 01:58:44 -0500, Alex Kononov wrote:
> Good day Mathias,
>
> With a USB S/PDIF TX/RX adapter (Savitech, 262a:9123, UAC2, high
> speed), the xHCI driver logs an isochronous buffer overrun warning
> for nearly every microframe while the adapter's S/PDIF input has no
> signal:
>
> xhci_hcd 0000:00:14.0: WARN: buffer overrun event for slot 2 ep 4 on
> endpoint
>
> Rate measured: ~433,000 messages per minute (~7,200/s).
> systemd-journald sits at 100% of one core and reports "Missed N
> kernel messages".
>
> Setup:
> - Intel N100 (PCH xHCI 0000:00:14.0), Debian 13
> - Kernel: 6.12.117+deb13-amd64 (same code in mainline 7.4-rc3)
> - Capture stream open continuously (CamillaDSP), 48 kHz S16_LE,
> EP 0x82 IN isochronous, adaptive, 125 us interval
> - TV feeding the S/PDIF input goes idle -> no input signal -> flood.
> With a valid input signal the count is 0.
>
> The device is clearly misbehaving (it sends more data than requested
> when the S/PDIF receiver is unlocked; it also reports its clock source
> as valid while unlocked).
Either the device is buggy or snd_usb_audio driver submits wrong URBs,
but that's a sound subsystem issue.
> The driver handles the events correctly and audio recovers fine. The
> problem is only the logging: the warning in handle_tx_event() for
> COMP_ISOCH_BUFFER_OVERRUN is not rate-limited, so a single
> misbehaving isoc device can generate thousands of lines per second.
>
> Locally I changed that xhci_warn() to dev_warn_ratelimited() and the
> rate dropped to ~100/min with no functional change.
> Would a patch rate-limiting this message (or demoting it to xhci_dbg)
> be acceptable?
Not Mathias, but I think it should be xhci_dbg() like all the other
conditions which are device-triggerable rather than driver bugs.
People can still see this as -EOVERFLOW status in iso_frame_desc[].
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ handle_tx_event()
> case COMP_ISOCH_BUFFER_OVERRUN:
> - xhci_warn(xhci,
> - "WARN: buffer overrun event for slot %u ep %u on
> endpoint",
When submitting, please make sure to avoid line breaks like this.
Regards,
Michal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-21 9:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 6:58 xhci: unratelimited "buffer overrun event" warning floods log (~7000/s) with USB S/PDIF capture device Alex Kononov
2026-11-21 9:30 ` Michal Pecio
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.