Blair Zajac <bl...@orcaware.com> writes:

> On 1/27/11 1:35 AM, Philip Martin wrote:
>> Philip Martin<philip.mar...@wandisco.com>  writes:
>>
>>> It appears that the kernel deadlock detection sometimes produces false
>>> positives
>>
>> I believe I was mistaken when I assumed that fcntl() would block just
>> the thread making the call; rereading the man page I think it is the
>> whole process that blocks.  That means this is not a false positive.
>
> I believe your first inclination was correct, that fcntl() just blocks
> the calling thread.  How could one system call block other threads
> from doing work?

I'm not sure.  The kernel knows which threads are part of the process so
it could block them all.

> I'm guessing the kernel doesn't look if the process is multithreaded
> and if its making progress, it just assumes it is single threaded,
> which is why it has to return EDEADLK.

A little experimenting on my Linux box shows that when one thread of
svnserve is blocked in fcntl() during a commit other threads still
respond.  So this probably does count as a false positive deadlock.

-- 
Philip

Reply via email to