xfs
[Top] [All Lists]

Re: [PATCH] deadlocks on ENOSPC

To: Nathan Scott <nathans@xxxxxxx>
Subject: Re: [PATCH] deadlocks on ENOSPC
From: Andi Kleen <ak@xxxxxxx>
Date: Tue, 15 Jun 2004 22:36:30 +0200
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20040615052909.GC816@frodo>
References: <20040612040838.020a2efb.ak@suse.de> <20040615052909.GC816@frodo>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Tue, 15 Jun 2004 15:29:09 +1000
Nathan Scott <nathans@xxxxxxx> wrote:

> > 
> > My theory is that one of the ENOSPC error paths forgets to brelse a buffer 
> > which 
> > causes the semaphore to get lost and causes the deadlocks later. This is 
> > likely
> > a AGF buffer, since xfs_alloc_read_agf() and children are blocking too.
> 
> Yep, makes sense.

Unfortunately not. I noticed that even the normal path (without any errors)
does not brelse the buffers. This means they must be freed somewhere else
and the few brelses that are there are likely bogus. I just didn't find
the code who does this. I suppose they are somehow tracked in the 
transaction, which makes sense.

Also adding brelses did not stop the deadlocks i was seeing.

I added some instrumentation and all lost buffers seem to originate
from xfs_alloc_fix_freelists (with different calls). I also tried with
only a single CPU and it happens so, so it isn't an SMP race.

I will look into this more later.

-Andi


<Prev in Thread] Current Thread [Next in Thread>