From owner-cvs-src@FreeBSD.ORG Wed Mar 19 08:59:04 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C054B106564A; Wed, 19 Mar 2008 08:59:04 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from anchor-post-37.mail.demon.net (anchor-post-37.mail.demon.net [194.217.242.87]) by mx1.freebsd.org (Postfix) with ESMTP id 6CCC18FC16; Wed, 19 Mar 2008 08:59:04 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from router.rabson.org ([80.177.232.241] helo=itchy.rabson.org) by anchor-post-37.mail.demon.net with esmtp (Exim 4.68) id 1Jbu8V-00077h-Mp; Wed, 19 Mar 2008 08:59:03 +0000 Received: from macbook.rabson.org (macbook.rabson.org [IPv6:2002:50b1:e8f2:1:21e:52ff:fe73:8011]) by itchy.rabson.org (Postfix) with ESMTP id 9B0643F90; Wed, 19 Mar 2008 08:59:02 +0000 (GMT) Message-Id: <485E42A7-7955-4E95-9887-DCAE664CD9AE@rabson.org> From: Doug Rabson To: Jeff Roberson In-Reply-To: <200803190713.m2J7DOPp083103@repoman.freebsd.org> Content-Type: multipart/signed; boundary=Apple-Mail-59--23324358; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v919.2) Date: Wed, 19 Mar 2008 08:59:02 +0000 References: <200803190713.m2J7DOPp083103@repoman.freebsd.org> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: ClamAV 0.92/6305/Wed Mar 19 07:32:53 2008 on itchy.rabson.org X-Virus-Status: Clean X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_lockf.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Mar 2008 08:59:05 -0000 --Apple-Mail-59--23324358 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 19 Mar 2008, at 07:13, Jeff Roberson wrote: > jeff 2008-03-19 07:13:24 UTC > > FreeBSD src repository > > Modified files: > sys/kern kern_lockf.c > Log: > - Fix the last of the threading bugs that were introduced as far > back as > 1.38 in 2001. Break out of the FOREACH_THREAD_IN_PROC loop when > we've > discovered a new proc in the chain. > - Increment i and check for maxlockdepth once per matching process > not > once per thread. This didn't properly terminate the loop before. > - Fix a bug which has existed potentially since rev 1.1. > waitblock->lf_next > can be NULL when a thread has been woken-up but not yet > scheduled. Check > for this condition rather than blindly dereferencing. > > Found by: libMicro > > Revision Changes Path > 1.59 +12 -6 src/sys/kern/kern_lockf.c I have completely removed all this proc tomfoolery in my perforce branch and have replaced it with a real deadlock detection system instead of this horrible code. Apart from anything else, the existing code has serious locking problems - if the deadlock loop spans two or more vnodes, it doesn't lock any but the first one. I should have a patch ready for review (along with the new kernel NFS lock manager) towards the end of this week and I hope to get the thing into -current some time next week. --Apple-Mail-59--23324358--