From nobody Fri Jul 30 00:57:42 2021 X-Original-To: gnome@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8E2CF12B203E for ; Fri, 30 Jul 2021 00:57:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GbTX61YN5z3DkJ for ; Fri, 30 Jul 2021 00:57:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B0CE1BE9E for ; Fri, 30 Jul 2021 00:57:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 16U0vgth056625 for ; Fri, 30 Jul 2021 00:57:42 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 16U0vgLH056624 for gnome@FreeBSD.org; Fri, 30 Jul 2021 00:57:42 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: gnome@FreeBSD.org Subject: [Bug 194727] uaudio device gets disconnected, and hangs usb until everything using /dev/mixer* is closed Date: Fri, 30 Jul 2021 00:57:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: theron.tarigo@gmail.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: hselasky@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: GNOME for FreeBSD -- porting and maintaining List-Archive: https://lists.freebsd.org/archives/freebsd-gnome List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-gnome@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194727 --- Comment #57 from Theron Tarigo --- I started hacking on this today, and I see two options for fixing the kernel side: 1. allow pcm_unregister to forcibly close and destroy the device file. The kernel already does something like this for block storage devices removed w= hile in use. Applications may respond badly but it's better than what we have n= ow, and pulseaudio and virtual_oss should already handle this. 2. unhook uaudio instance destruction from device detach. This allows the = pcm device to persist independently of the usb device, ready to clean up when it can. (2) seems the better option, as it provides the opportunity to reattach pcm device when the USB device is reattached, or after resume from suspend.=20 However I'm unsure how to proceed with this option. Are there any other drivers capable of persisting independently of their bus devices' detaching= to use as an example? As for the kernel resource "leak": I'm well aware option (2) leads right in= to this. However unless implemented incorrectly these resources are still tie= d to a user process: recovery of the exhausted resource by action taken from wit= hin userspace (killing the offending and leaky application, as we already do for low memory, too many tabs playing audio, etc.) remains sufficient. --=20 You are receiving this mail because: You are on the CC list for the bug.=