xfs
[Top] [All Lists]

Re: XFS: Observed Crash followed by deadlock of khubd/sync/XFS

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: XFS: Observed Crash followed by deadlock of khubd/sync/XFS
From: Amit Sahrawat <amit.sahrawat83@xxxxxxxxx>
Date: Tue, 13 Sep 2011 21:13:58 +0530
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Yo7pjQ5cjo+zciBk7pv4irFmpi8Sj/TsVhzr5zAe/LA=; b=kPgBKPRkgIFsvkV2BrXKDP+Vg+e3OXFHjJa24pzzXp4IZrrmIVwbdYfFrdK1OCk9Vi F9nzju0Zj+a0r6sOtUJxzDbCCaUAy0dpSDpR06ad+PqcZmm9k4YqWYC6n9h2r01am6/G TP3qI7Wzy/aXR+B9JReENQh+baeo7GRzEQKsw=
In-reply-to: <20110913152607.GA21460@xxxxxxxxxxxxx>
References: <CADDb1s2QDk7y+JgMikoje35LviYQwzpgFihndUPuZx2VXYV4Ew@xxxxxxxxxxxxxx> <CADDb1s2S9R5RoaJ2NGSbCXORngx8PQVB6r3-QVJbjCUYh+B63Q@xxxxxxxxxxxxxx> <20110913152607.GA21460@xxxxxxxxxxxxx>
I am able to get it very frequent on both ARM/x86 with the same case
and same logs.
In particular just adding a msleep in unmount path before
xfs_log_sbcount to trigger this path - this will definetely help.
I am able to figure out the issue - there is an issue in callback and
unmount path not in sync.
unmount path does it work as required but there is a callback pending.
In normal case I can see xfslogd is used to execute callbacks - while
at the time of the issue the callback is called is called in the
context of 'umount' process - which leads to destroying AIL and
deallocating log and then using the same in callback path from
xfs_buf_iodone_callbacks --> xfs_buf_iodone

I have done some changes to get over this but further looking.

Thanks & Regards,
Amit Sahrawat

On Tue, Sep 13, 2011 at 8:56 PM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Thu, Sep 08, 2011 at 10:58:35PM +0530, Amit Sahrawat wrote:
>> Since this is very hard to reproduce, to make it easy to debug. This
>> can be reproduce by introducing msleep in the kernel xfs_umountfs()
>> before xfs_log_sbcount(), just add a print before this function and
>> sleep and the moment the print appear unplug the USB device, same
>> scenario will be reproduced.
>> CRASH will show the backtrace and return to normal shell, but when
>> process state is checked, khubd will be shown in TASK-UNINTERRUPTIBLE
>> state 'D'.
>> Further if sync is issued that will also get converted to 'D' state,
>> the back-trace for each of the task is same as mentioned in the
>> previous mail.
>
> I've not been able to reproduce this using that method so far.
>
>

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