[Bug 194727] uaudio device gets disconnected, and hangs usb until everything using /dev/mixer* is closed

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 25 May 2022 08:30:36 UTC

--- Comment #71 from Hans Petter Selasky <hselasky@FreeBSD.org> ---
> If kernel would kill such file descriptors ...

Only applications can fully kill file descriptors! It is not possible for the
kernel to kill file descriptors in a non-blocking fashion.

> I do not care pulse or any other apps, my issue that USB stack is unusable after usb sound adapter disconnected without all apps closes fd.

This is the expected behaviour. Remember that the OSS support in pulseaudio was
written when detachable audio devices didn't yet exist. So how can you expect
it to work accordingly?

I'm saying again, the problem is not the kernel, but in user-space. The kernel
cannot kill file descriptors like you think, no matter what. It's always the
applications responsibility to clean up that as long as it is running, but the
kernel can probably kill misbehaving applications after a while.


You are receiving this mail because:
You are on the CC list for the bug.