From owner-freebsd-multimedia@FreeBSD.ORG Sun Apr 25 23:40:06 2010 Return-Path: Delivered-To: freebsd-multimedia@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15100106564A for ; Sun, 25 Apr 2010 23:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DED378FC14 for ; Sun, 25 Apr 2010 23:40:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o3PNe5Ya070579 for ; Sun, 25 Apr 2010 23:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3PNe5D8070578; Sun, 25 Apr 2010 23:40:05 GMT (envelope-from gnats) Date: Sun, 25 Apr 2010 23:40:05 GMT Message-Id: <201004252340.o3PNe5D8070578@freefall.freebsd.org> To: freebsd-multimedia@FreeBSD.org From: Garrett Cooper Cc: Subject: Re: kern/146031: [snd_hda] race condition when kldunload snd_hda sound called X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Cooper List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2010 23:40:06 -0000 The following reply was made to PR kern/146031; it has been noted by GNATS. From: Garrett Cooper To: Garrett Cooper Cc: Alexander Best , bug-followup@freebsd.org Subject: Re: kern/146031: [snd_hda] race condition when kldunload snd_hda sound called Date: Sun, 25 Apr 2010 16:34:53 -0700 Sorry... forgot to answer the questions. On Sun, Apr 25, 2010 at 4:31 PM, Garrett Cooper wrote: > On Sun, Apr 25, 2010 at 4:26 AM, Alexander Best wrote: >> running >> >> sh -c 'i=1; while [ 1 ] ; do echo "Try $i"; kldload snd_hda; kldunload snd_hda >> sound; : $(( i += 1 )); done' >> >> complains about sound.ko not being loaded, since unloading snd_hda.ko also >> unloads sound.ko. is this what you got too? Yes, because it's kldunload(2) unloads all dependent modules for snd_hda.ko not in use (in this case sound.ko). >> i'm not sure this logic is correct. loading snd_hda.ko also loads sound.ko, >> since it depends on it. however i don't see why unloading snd_hda.ko also >> unloads sound.ko, since sound.ko has no dependencies and can exist without any >> snd_*.ko module. The point was that there's a race condition if the time between both snd_hda.ko and sound.ko was done, s.t. not all of the pieces were cleaned up and/or communicated in the kernel. >> i wasn't able to trigger the panic however (command cancelled with i=350 or >> so). >> >> i'm running 9-CURRENT (r207154). Ok. This might have been fixed in a later revision that hasn't been MFCed from HEAD, but I really don't want to have to take down my server to test this... Thanks, -Garrett