Bug 22602 - Oops while unmounting an USB key with a FAT filesystem
Oops while unmounting an USB key with a FAT filesystem
Status: CLOSED CODE_FIX
Product: File System
Classification: Unclassified
Component: FAT/VFAT/MSDOS
All Linux
: P1 normal
Assigned To: OGAWA Hirofumi
:
: 53431 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-10 08:57 UTC by Jean-Luc Coulon
Modified: 2013-11-18 17:55 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.36
Tree: Mainline
Regression: No


Attachments
Part of the syslog with the Oops trace (6.41 KB, application/octet-stream)
2010-11-10 08:57 UTC, Jean-Luc Coulon
Details
.config file of the running kernel (73.85 KB, application/octet-stream)
2010-11-10 08:57 UTC, Jean-Luc Coulon
Details
3.0.0-rc1 kern.log (3.87 KB, text/plain)
2011-06-09 10:55 UTC, Markku Vorne
Details
inotify loop test program (225 bytes, text/x-csrc)
2011-06-09 10:56 UTC, Markku Vorne
Details
mount / umount script (416 bytes, application/octet-stream)
2011-06-09 10:57 UTC, Markku Vorne
Details

Description Jean-Luc Coulon 2010-11-10 08:57:03 UTC
Created attachment 37032 [details]
Part of the syslog with the Oops trace

System Debian GNU/Linux x86_64
Processor Athlon 64 II, 4GB DDR3

Hi,

I've an USB key with a FAT filesystem.
What happenend:
- mounted the key
- modified a file on the key
- unmounted the key
- got the Oops

Attached the related part of the syslog and .config

Regards

Jean-Luc
Comment 1 Jean-Luc Coulon 2010-11-10 08:57:43 UTC
Created attachment 37042 [details]
.config file of the running kernel
Comment 2 OGAWA Hirofumi 2011-02-22 12:42:09 UTC
sorry for late reply.

I tried to reproduce this, but couldn't reproduce on 2.6.38-rc6.
Please re-tested on recent kernel?
Comment 3 OGAWA Hirofumi 2011-02-22 12:45:12 UTC
BTW, this seems to be not FAT specific problem. Because oops is on inotify which
is used from tracker daemon. And probably VFS passed NULL to FAT as inode pointer.
Comment 4 Herton Ronaldo Krzesinski 2011-03-22 19:19:18 UTC
It seems still can happen on recent kernels, on final 2.6.38 I saw recently a similar oops: http://launchpadlibrarian.net/66845909/OopsText.txt from http://bugs.launchpad.net/bugs/738876
Comment 5 OGAWA Hirofumi 2011-03-28 16:51:57 UTC
Um..

I can't still reproduce this. You can this reproduce always, or it happens
sometimes?

BTW, I tried:

1) startx
2) tracker-control -s
3) mount /dev/sdc1 ~/mnt
4) cp -a foo ~/mnt
5) umount ~/mnt

If you have more detail to reproduce, please let me know.
Comment 6 Herton Ronaldo Krzesinski 2011-03-28 18:47:48 UTC
I can't reproduce myself too, I just mean that I received a bug report about same issue with oops on 2.6.38. I tried here to produce a working testcase but still no success.
Comment 7 Markku Vorne 2011-06-09 10:55:34 UTC
Created attachment 61342 [details]
3.0.0-rc1 kern.log

I managed to reproduce this with the latest kernel sources. The log attached.

I can reproduce this quite easily by executing mount/umount script and testprogram executing continuously inotify_add_watch/inotify_rm_watch loop.

I will attach the script and testprogram also.

I have been able to reproduce this only in single core PC, I was not able to reproduce it in my multicore CPU.

The root cause seems to be that iput is executed after the filesystem has been already removed. iput can be executed even after unmounting, because generic_shutdown_super exits with some busy inodes left, which can be seen from the log message "VFS: Busy inodes after unmount of sda2. Self-destruct in 5 seconds.  Have a nice day..."
Comment 8 Markku Vorne 2011-06-09 10:56:32 UTC
Created attachment 61352 [details]
inotify loop test program
Comment 9 Markku Vorne 2011-06-09 10:57:41 UTC
Created attachment 61362 [details]
mount / umount script
Comment 10 Markku Vorne 2011-06-13 17:51:03 UTC
(In reply to comment #3)
> BTW, this seems to be not FAT specific problem. Because oops is on inotify
> which
> is used from tracker daemon. And probably VFS passed NULL to FAT as inode
> pointer.

You are right. I have reproduced the oops also with ext4 FS, so this should be moved to inotify instead of FAT/VFAT/MSDOS.

Could somebody update also the kernel version of this bug, since I am able to reproduce this with latest kernel. It seems I do not have rights to do that.
Comment 11 OGAWA Hirofumi 2011-06-14 07:25:13 UTC
https://lkml.org/lkml/2011/6/10/155

Update for current state. Please see the above thread.
Comment 12 Ben Hutchings 2012-08-21 02:55:21 UTC
No fix has been committed; please reopen.
Comment 13 OGAWA Hirofumi 2013-02-18 17:57:23 UTC
inotify's fixes was merged at 3.8 devlopment.
Comment 14 OGAWA Hirofumi 2013-11-18 17:55:51 UTC
*** Bug 53431 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.