Linux USB
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: Bart Nagel <bart@tremby.net>
Cc: linux-usb@vger.kernel.org, mathias.nyman@intel.com
Subject: Re: Regression: webcam freezing since Linux 6.15
Date: Sat, 25 Jul 2026 11:59:56 +0200	[thread overview]
Message-ID: <20260725115956.321185a1.michal.pecio@gmail.com> (raw)
In-Reply-To: <amKUdIRBrsFiDTiV@spiral>

On Thu, 23 Jul 2026 15:45:25 -0700, Bart Nagel wrote:
> I found that I can reproduce the freeze much, much faster if I run
> `stress --cpu $(nproc)` at the same time.

Great news, good work.

What happens differently in absence of CPU load?
- no Missed Service Errors anymore
- ep_trb_dma (see below) becomes always zero
- no obvious change, somehow the kernel gets more lucky

>     [  174.709692] xhci_hcd 0000:00:14.0: Transfer error for slot 6 ep 2 on endpoint
>     [  174.709815] xhci_hcd 0000:00:14.0: Miss service interval error for slot 6 ep 2 ep_trb_dma 0, set skip flag

That's kinda normal. Errors sometimes happen, isochronous doesn't
recover from them, SW must deal with it. Transfer error becomes -71
status, Missed Service becomes -18. Later uvcvideo logs this again.

ep_trb_dma should point to the failed transfer, but xHCI 1.0 spec
allows it to be zero for Missed Service Error. We deal with that too.

But oddly, on your HW it sometimes isn't zero. The commit you bisected
assumes that non-zero numbers are valid pointers and this seems to work
more or less correctly, until it doesn't:

[  174.818444] xhci_hcd 0000:00:14.0: Miss service interval error for slot 6 ep 2 ep_trb_dma 108165b90, set skip flag
[  174.818452] xhci_hcd 0000:00:14.0: Found td. Clear skip flag for slot 6 ep 2.
--
[  176.818812] xhci_hcd 0000:00:14.0: Miss service interval error for slot 6 ep 2 ep_trb_dma 108165dd0, set skip flag
[  176.818817] xhci_hcd 0000:00:14.0: Found td. Clear skip flag for slot 6 ep 2.
--
[  177.517933] xhci_hcd 0000:00:14.0: Miss service interval error for slot 6 ep 2 ep_trb_dma 10a63ec30, set skip flag
[  177.517937] xhci_hcd 0000:00:14.0: Found td. Clear skip flag for slot 6 ep 2.
--
[  177.586809] xhci_hcd 0000:00:14.0: Miss service interval error for slot 6 ep 2 ep_trb_dma 10a63e020, set skip flag
[  177.586815] xhci_hcd 0000:00:14.0: Found td. Clear skip flag for slot 6 ep 2.
--
[  177.636060] xhci_hcd 0000:00:14.0: Miss service interval error for slot 6 ep 2 ep_trb_dma 10a63e530, set skip flag
[  177.636065] xhci_hcd 0000:00:14.0: Found td. Clear skip flag for slot 6 ep 2.
--
[  177.817933] xhci_hcd 0000:00:14.0: Miss service interval error for slot 6 ep 2 ep_trb_dma 10a63ee10, set skip flag
[  177.817937] xhci_hcd 0000:00:14.0: Found td. Clear skip flag for slot 6 ep 2.
--
[  179.934449] xhci_hcd 0000:00:14.0: Miss service interval error for slot 6 ep 2 ep_trb_dma 10a63e7b0, set skip flag
[  179.934453] xhci_hcd 0000:00:14.0: Found td. Clear skip flag for slot 6 ep 2.
--
[  180.701300] xhci_hcd 0000:00:14.0: Miss service interval error for slot 6 ep 2 ep_trb_dma 10a63e920, set skip flag
[  180.701315] xhci_hcd 0000:00:14.0: All TDs skipped for slot 6 ep 2. Clear skip flag.

For some reason the driver thought that all TDs were missed and
returned them with -18 status; we see a burst of those logs from
uvcvideo moment later. Then I suspect uvcvideo resubmitted enough
URBs to go around the whole ring and overwrite pending transfers
with opposite cycle bit, which caused the HW to stop and produce
a Ring Overrun event.

The root cause is bogus ep_trb_dma from the HW or some kernel bug.

Maybe we could get enough info from debugfs to see what happened. If
possible, disconnect other USB devices from bus 1 and 2, trigger the
bug again, and *before* stopping video recording, run:

zip -r debugfs.zip /sys/kernel/debug/usb/xhci/0000:00:14.0

This requires debugfs to be enabled in the kernel and mounted. And zip
will print some warnings, but generate a valid archive. If you need to
use tar instead, you must first copy the directory, then archive it.

Email the zip (should be under 1MB) and corresponding dmesg as before.

Regards,
Michal

  reply	other threads:[~2026-07-25 10:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 22:10 Regression: webcam freezing since Linux 6.15 Bart Nagel
2026-07-22 22:22 ` Michal Pecio
2026-07-22 23:23   ` Bart Nagel
2026-07-23  6:14     ` Michal Pecio
2026-07-23  6:19       ` Michal Pecio
2026-07-23 21:02       ` Bart Nagel
2026-07-23 22:45         ` Bart Nagel
2026-07-25  9:59           ` Michal Pecio [this message]
2026-07-22 23:30   ` Bart Nagel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260725115956.321185a1.michal.pecio@gmail.com \
    --to=michal.pecio@gmail.com \
    --cc=bart@tremby.net \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox