Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Mar 2008 23:09:05 -1000 (HST)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Doug Rabson <dfr@rabson.org>
Cc:        cvs-src@FreeBSD.org, Jeff Roberson <jeff@FreeBSD.org>, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_lockf.c
Message-ID:  <20080318230824.Y910@desktop>
In-Reply-To: <485E42A7-7955-4E95-9887-DCAE664CD9AE@rabson.org>
References:  <200803190713.m2J7DOPp083103@repoman.freebsd.org> <485E42A7-7955-4E95-9887-DCAE664CD9AE@rabson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 19 Mar 2008, Doug Rabson wrote:

>
> 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.
>

Thanks very much Doug.  I'm looking forward to it!

Jeff



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080318230824.Y910>