Bug 156726 - [snd_uaudio]: snd_uaudio(4) fails to detach when mixer is open
Summary: [snd_uaudio]: snd_uaudio(4) fails to detach when mixer is open
Status: Closed Feedback Timeout
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 8.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-usb (Nobody)
Depends on:
Reported: 2011-04-29 21:30 UTC by Arnaud
Modified: 2021-10-17 18:16 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud 2011-04-29 21:30:12 UTC
When a userland application has an open file descriptor to /dev/pcmN,
backed by an snd_uaudio(4) based device, trying to detach this device
will hang the USB stack until the userland application is closed.
Ultimately, this could lead to a complete stall of the USB stack.

It would be expected that every child of snd_uaudio(4) just detach
themselves, letting the userland die with EIO.

How-To-Repeat: plug a snd_uaudio adapter
open aumix(1)
unplug the adapter
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-05-02 01:24:11 UTC
Responsible Changed
From-To: freebsd-amd64->freebsd-multimedia

Comment 2 Gavin Atkinson freebsd_committer freebsd_triage 2012-08-16 13:53:15 UTC
Responsible Changed
From-To: freebsd-multimedia->freebsd-usb

This sounds potentially like a USB stack issue to me.
Comment 3 Hans Petter Selasky 2012-08-16 19:22:40 UTC
On Thursday 16 August 2012 14:54:00 gavin@freebsd.org wrote:
> Synopsis: [snd_uaudio]: snd_uaudio(4) fails to detach when mixer is open
> Responsible-Changed-From-To: freebsd-multimedia->freebsd-usb
> Responsible-Changed-By: gavin
> Responsible-Changed-When: Thu Aug 16 12:53:15 UTC 2012
> Responsible-Changed-Why:
> This sounds potentially like a USB stack issue to me.
> http://www.freebsd.org/cgi/query-pr.cgi?pr=156726

This is not a USB stack problem, but a sound system issue.

This is a known issue.

Comment 4 Kevin Zheng 2021-10-17 18:15:01 UTC
I ran into this problem in 13.0-RELEASE. In my case, suspend (via acpiconf) hangs on uaudio_detach_sub() ("Waiting for sound application to exit!") because an application is holding the mixer open. Can we re-open this issue for investigating a fix on the sound side, or should I open a new PR?
Comment 5 Kevin Zheng 2021-10-17 18:16:42 UTC
(In reply to Kevin Zheng from comment #4)
Looks like this duplicates 194727. Could someone with permissions please add this to the duplicates list?