From owner-freebsd-multimedia@FreeBSD.ORG Mon Feb 26 05:17:34 2007 Return-Path: X-Original-To: freebsd-multimedia@FreeBSD.org Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E48416A401; Mon, 26 Feb 2007 05:17:34 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id C123313C428; Mon, 26 Feb 2007 05:17:33 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (rfri9cglg41apocm@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l1Q4o59g074016; Sun, 25 Feb 2007 20:50:05 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l1Q4o2ug074015; Sun, 25 Feb 2007 20:50:02 -0800 (PST) (envelope-from jmg) Date: Sun, 25 Feb 2007 20:50:02 -0800 From: John-Mark Gurney To: "Greg 'groggy' Lehey" Message-ID: <20070226045002.GI73385@funkthat.com> Mail-Followup-To: Greg 'groggy' Lehey , usleepless@gmail.com, freebsd-multimedia@freebsd.org References: <4E6EF7B9-703F-4D86-A86E-A0B0B7B504F0@netmusician.org> <20070224014517.GN70738@wantadilla.lemis.com> <20070224092239.6312604b.torfinn.ingolfsen@broadpark.no> <20070225022427.GB1950@wantadilla.lemis.com> <20070226035904.GA77076@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070226035904.GA77076@wantadilla.lemis.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-multimedia@FreeBSD.org Subject: Re: pvr250 and MythTV X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2007 05:17:34 -0000 Greg 'groggy' Lehey wrote this message on Mon, Feb 26, 2007 at 14:29 +1030: > > I've tried this with a PVR 250. It panics out of cxm_read with a call > > to msleep holding a mutex (IIRC). I'm having difficulty getting a > > dump of this machine, so it may take a little longer to localize. > > OK, the reason for the dump was a non-intuitive requirement of > msleep(): if you want to sleep forever, you need to be holding a > mutex. I'm trying to clarify the reasons for this, but for the moment > the following patch works around the "feature": [...] > Why has nobody else seen this? It only happens if you set the > INVARIANTS option in the kernel build. > > I have some other minor issues, but on the whole things seem to work > in my environment (PVR 250, Pentium, 6.2-STABLE). This is because w/o holding a lock, you cannot guarantee that you did not miss your wakeup, and so, you could deadlock the kernel if you slept forever (and was never woken up)... If you were holding Giant, it would be ok for a zero timo... msleep(9) documents this behavior.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."