https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239730
Bug ID: 239730 Summary: System fails to remove the audio device because some app keeps it opened, kernel enters the endless cycle: unregister: mixer busy Waiting for sound application to exit! Product: Base System Version: 12.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: usb Assignee: u...@freebsd.org Reporter: y...@freebsd.org I connected the USB audio device through a (possibly unstable) USB hub. When the USB hub has disconnected the system began to print messages like this: > Aug 8 15:57:12 sw kernel: pcm3: unregister: mixer busy > Aug 8 15:57:12 sw kernel: pcm3: Waiting for sound application to exit! IMHO, this is an entirely wrong behavior. Once the device disappears, the device file should be just gone. If some application has it opened, the file handle should remain and all subsequent API functions that this application invokes with this file handle should fail. The file handle should disappear when the application would close it. In the next second the same device can reappear, and then any applications should be able to just use it again, regardless of some application that is potentially holding the old instance of it open. Unregistering the sound device should not print any such messages as it currently prints. Unregistering shouldn't fail just because some application has it open, because this can happen any time. ----system log---- Aug 8 15:53:55 sw kernel: uaudio0: <vendor 0x046d HD Pro Webcam C920, class 239/2, rev 2.00/0.11, addr 2> on usbus0 Aug 8 15:53:55 sw kernel: uaudio0: No playback. Aug 8 15:53:55 sw kernel: uaudio0: Record: 32000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. Aug 8 15:53:55 sw kernel: uaudio0: Record: 24000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. Aug 8 15:53:55 sw kernel: uaudio0: Record: 16000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. Aug 8 15:53:55 sw kernel: uaudio0: No MIDI sequencer. Aug 8 15:53:55 sw kernel: pcm3: <USB audio> on uaudio0 Aug 8 15:53:55 sw kernel: uaudio0: No HID volume keys found. ... Aug 8 15:56:38 sw kernel: ugen0.2: <vendor 0x214b USB2.0 HUB> at usbus0 (disconnected) Aug 8 15:56:38 sw kernel: uhub2: at uhub0, port 5, addr 1 (disconnected) Aug 8 15:56:38 sw kernel: ugen0.3: <vendor 0x046d HD Pro Webcam C920> at usbus0 (disconnected) Aug 8 15:56:38 sw kernel: uaudio0: at uhub2, port 1, addr 2 (disconnected) Aug 8 15:56:38 sw kernel: pcm3: unregister: mixer busy Aug 8 15:56:38 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:56:40 sw kernel: pcm3: unregister: mixer busy Aug 8 15:56:40 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:56:42 sw kernel: pcm3: unregister: mixer busy Aug 8 15:56:42 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:56:44 sw kernel: pcm3: unregister: mixer busy Aug 8 15:56:44 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:56:46 sw kernel: pcm3: unregister: mixer busy Aug 8 15:56:46 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:56:48 sw kernel: pcm3: unregister: mixer busy Aug 8 15:56:48 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:56:50 sw kernel: pcm3: unregister: mixer busy Aug 8 15:56:50 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:56:52 sw kernel: pcm3: unregister: mixer busy Aug 8 15:56:58 sw kernel: pcm3: unregister: mixer busy Aug 8 15:56:58 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:00 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:00 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:02 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:02 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:04 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:04 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:06 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:06 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:08 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:08 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:10 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:10 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:12 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:12 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:14 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:14 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:16 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:16 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:18 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:18 sw kernel: pcm3: Waiting for sound application to exit! Aug 8 15:57:20 sw kernel: pcm3: unregister: mixer busy Aug 8 15:57:20 sw kernel: pcm3: Waiting for sound application to exit! -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-usb@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"