xfs
[Top] [All Lists]

Re: Deadlock on xfs_do_force_shutdown

To: jim@xxxxxxxxxxxxxxxxxx
Subject: Re: Deadlock on xfs_do_force_shutdown
From: Tim Shimmin <tes@xxxxxxx>
Date: Mon, 25 Jul 2005 14:34:51 +1000
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <200507181447.j6IElpH9014299@xxxxxxxxxxx>; from jim@xxxxxxxxxxxxxxxxxx on Mon, Jul 18, 2005 at 03:45:52PM +0100
References: <200507181447.j6IElpH9014299@xxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
Hi Jim,

Thanks for the info.

On Mon, Jul 18, 2005 at 03:45:52PM +0100, jim@xxxxxxxxxxxxxxxxxx wrote:
> Hi,
> 
> I got a deadlock on 2.6.10 where (due to some fs corruption somewhere
> -- not the point of this e-mail) xfs_trans_delete_ail called
> xfs_do_force_shutdown holding the AIL_LOCK.  Later on,
> xfs_trans_tail_ail was called, which went for AIL_LOCK again...
> 
> The code path in question (though perhaps there are other possible ones) 
> looks like:
> xfs_trans_delete_ail holds AIL_LOCK
> -> calls xfs_do_force_shutdown
> -> calls xfs_log_force_umount
> -> calls xlog_state_sync_all
> -> calls xlog_state_release_iclog
> -> calls xlog_assign_tail_lsn
> -> calls xfs_trans_tail_ail
> -> tries to take AIL_LOCK
> 

Yes, we should be dropping the AIL_LOCK before calling xfs_force_shutdown()
(instead of afterwards).
I'll check in the fix shortly.

(I believe others are currently looking into a scenario in which the item to be
 deleted is missing from the AIL.)

--Tim


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