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