Bug 43911

Summary: umounting microSD from USB SD adapter I got kernel panic
Product: File System Reporter: Giovanni Venturi (slacky)
Component: FAT/VFAT/MSDOSAssignee: OGAWA Hirofumi (hirofumi)
Status: CLOSED CODE_FIX    
Severity: blocking CC: arthur.titeica
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.4.4 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg log when system start
the kernel panic when shuting down the sistem after a FAT32 was unmounted
fat32 unmounting and shutdown of the system

Description Giovanni Venturi 2012-06-27 12:58:10 UTC
I have a Samsung MB-MSAGAEU 16GB MicroSD card Essential Class 6 with USB SD adapter for my e-book reader. Sometimes I plug it into the USB slot I mount it with Thunar, I copy files, then I umount by Thunar and I got a kernel panic. The filesystem is FAT32. Is it a FAT32 regression? Better use linux-3.0.x?

Steps to reproduce:
Plug a Samsung MB-MSAGAEU 16GB MicroSD card Essential Class 6 with USB SD adapter into USB slot, open Thunar (Xfce file manager), mount device, copy files, then umount device by Thunar and (not always) you got a kernel panic.

Seeing from the kernel panic screen I could see "fat32 detach" problem. Maybe the operation is different if done on a microSD, because I never had a kernel panic umounting USB mass storage.
Comment 1 OGAWA Hirofumi 2012-06-27 15:21:41 UTC
(In reply to comment #0)
> Seeing from the kernel panic screen I could see "fat32 detach" problem. Maybe
> the operation is different if done on a microSD, because I never had a kernel
> panic umounting USB mass storage.

Can you post the copy of Oops? It would be useful to debug this.
Comment 2 Giovanni Venturi 2012-06-27 16:59:34 UTC
Copy of Oops? By a cell phone photo to the screen? Or there is a log file where kernel go to write Oops?
Comment 3 Giovanni Venturi 2012-06-27 17:01:23 UTC
Created attachment 74381 [details]
dmesg log when system start
Comment 4 Giovanni Venturi 2012-06-27 17:02:07 UTC
[root@arch-laptop log]# lspci -v
00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, fast devsel, latency 0
	Memory at b0000000 (32-bit, prefetchable) [size=256M]
	Capabilities: [e4] Vendor Specific Information: Len=04 <?>
	Capabilities: [a0] AGP version 2.0
	Kernel driver in use: agpgart-intel

00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03) (prog-if 00 [Normal decode])
	Flags: bus master, 66MHz, fast devsel, latency 128
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: 00003000-00003fff
	Memory behind bridge: 90400000-904fffff
	Prefetchable memory behind bridge: 98000000-9fffffff

00:1d.0 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01) (prog-if 00 [UHCI])
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, medium devsel, latency 0, IRQ 10
	I/O ports at 48c0 [size=32]
	Kernel driver in use: uhci_hcd

00:1d.1 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01) (prog-if 00 [UHCI])
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, medium devsel, latency 0, IRQ 5
	I/O ports at 48e0 [size=32]
	Kernel driver in use: uhci_hcd

00:1d.2 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01) (prog-if 00 [UHCI])
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, medium devsel, latency 0, IRQ 5
	I/O ports at 4c00 [size=32]
	Kernel driver in use: uhci_hcd

00:1d.7 USB controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01) (prog-if 20 [EHCI])
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, medium devsel, latency 0, IRQ 5
	Memory at a0000000 (32-bit, non-prefetchable) [size=1K]
	Capabilities: [50] Power Management version 2
	Capabilities: [58] Debug port: BAR=1 offset=0080
	Kernel driver in use: ehci_hcd

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=02, subordinate=06, sec-latency=32
	I/O behind bridge: 00002000-00002fff
	Memory behind bridge: 90000000-903fffff
	Prefetchable memory behind bridge: 50000000-53ffffff

00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
	Flags: bus master, medium devsel, latency 0

00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 01) (prog-if 8a [Master SecP PriP])
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, medium devsel, latency 0, IRQ 5
	I/O ports at 01f0 [size=8]
	I/O ports at 03f4 [size=1]
	I/O ports at 0170 [size=8]
	I/O ports at 0374 [size=1]
	I/O ports at 4c40 [size=16]
	Memory at 54000000 (32-bit, non-prefetchable) [size=1K]
	Kernel driver in use: ata_piix

00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: medium devsel, IRQ 10
	I/O ports at 4c20 [size=32]
	Kernel driver in use: i801_smbus

00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, medium devsel, latency 0, IRQ 10
	I/O ports at 4000 [size=256]
	I/O ports at 4880 [size=64]
	Memory at a0200000 (32-bit, non-prefetchable) [size=512]
	Memory at a0300000 (32-bit, non-prefetchable) [size=256]
	Capabilities: [50] Power Management version 2
	Kernel driver in use: snd_intel8x0

00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01) (prog-if 00 [Generic])
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, medium devsel, latency 0, IRQ 10
	I/O ports at 4400 [size=256]
	I/O ports at 4800 [size=128]
	Capabilities: [50] Power Management version 2
	Kernel driver in use: snd_intel8x0m

01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Radeon RV250 [Mobility FireGL 9000] (rev 01) (prog-if 00 [VGA controller])
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, stepping, 66MHz, medium devsel, latency 128, IRQ 10
	Memory at 98000000 (32-bit, prefetchable) [size=128M]
	I/O ports at 3000 [size=256]
	Memory at 90400000 (32-bit, non-prefetchable) [size=64K]
	[virtual] Expansion ROM at 90420000 [disabled] [size=128K]
	Capabilities: [58] AGP version 2.0
	Capabilities: [50] Power Management version 2
	Kernel driver in use: radeon

02:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev 80) (prog-if 10 [OHCI])
	Subsystem: VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller
	Flags: bus master, medium devsel, latency 128, IRQ 10
	Memory at 90200000 (32-bit, non-prefetchable) [size=2K]
	I/O ports at 2400 [size=128]
	Capabilities: [50] Power Management version 2
	Kernel driver in use: firewire_ohci

02:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 20)
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, medium devsel, latency 128, IRQ 10
	I/O ports at 2000 [size=256]
	Memory at 90300000 (32-bit, non-prefetchable) [size=256]
	Capabilities: [50] Power Management version 2
	Kernel driver in use: 8139cp

02:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG [Calexico2] Network Connection (rev 05)
	Subsystem: Intel Corporation Device 2701
	Flags: bus master, medium devsel, latency 128, IRQ 5
	Memory at 90000000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [dc] Power Management version 2
	Kernel driver in use: ipw2200

02:04.0 CardBus bridge: ENE Technology Inc CB1410 Cardbus Controller (rev 01)
	Subsystem: Compaq Computer Corporation Device 0860
	Flags: bus master, medium devsel, latency 168, IRQ 5
	Memory at 90100000 (32-bit, non-prefetchable) [size=4K]
	Bus: primary=02, secondary=03, subordinate=06, sec-latency=176
	Memory window 0: 50000000-53ffffff (prefetchable)
	Memory window 1: 58000000-5bffffff
	I/O window 0: 00002800-000028ff
	I/O window 1: 00002c00-00002cff
	16-bit legacy interface ports at 0001
	Kernel driver in use: yenta_cardbus

[root@arch-laptop log]# uname -a
Linux arch-laptop 3.4.4-2-ARCH #1 SMP PREEMPT Sun Jun 24 17:28:37 UTC 2012 i686 GNU/Linux


[root@arch-laptop log]# cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 9
model name	: Intel(R) Pentium(R) M processor 1500MHz
stepping	: 5
microcode	: 0x5
cpu MHz		: 600.000
cache size	: 1024 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 tm pbe up bts est tm2
bogomips	: 1196.96
clflush size	: 64
cache_alignment	: 64
address sizes	: 32 bits physical, 32 bits virtual
power management:
Comment 5 OGAWA Hirofumi 2012-06-27 18:17:03 UTC
(In reply to comment #2)
> Copy of Oops? By a cell phone photo to the screen? Or there is a log file
> where
> kernel go to write Oops?

If possible, photo of screen would work. And yes, if Oops was not critical problem
logs of kernel goes into syslog.

BTW, there was no Oops in the syslog you attached.
Comment 6 Giovanni Venturi 2012-10-26 08:02:21 UTC
Can you fix this bug for kernel 3.7?
My syslog do not report panic.
Comment 7 OGAWA Hirofumi 2012-10-26 08:18:51 UTC
I can't see what happened on your system without any panic logs.
I suspect it might be the bug of inoitfy though.
Comment 8 Giovanni Venturi 2012-10-26 13:56:34 UTC
Yes, but I can't break my file system because of a kernel panic.
Try to buy a Samsung MB-MSAGAEU 16GB MicroSD card Essential Class 6 with USB SD
adapter to verify this issue.
Comment 9 Giovanni Venturi 2013-01-18 09:40:46 UTC
Created attachment 91451 [details]
the kernel panic when shuting down the sistem after a FAT32 was unmounted
Comment 10 Giovanni Venturi 2013-01-18 09:53:46 UTC
Created attachment 91461 [details]
fat32 unmounting and shutdown of the system

here the image is bigger enough.
Comment 11 OGAWA Hirofumi 2013-01-18 11:27:55 UTC
(In reply to comment #10)
> Created an attachment (id=91461) [details]
> fat32 unmounting and shutdown of the system
> 
> here the image is bigger enough.

This log doesn't include FAT at all. The oops looks like the bug of netfilter.
Comment 12 Giovanni Venturi 2013-01-18 16:15:39 UTC
Mmm... it's happened when I unmounted the FAT32 mass storage and then I powered off the system. If it's netfilter than it should be happen each time I poweroff the system...
Comment 13 OGAWA Hirofumi 2013-01-18 16:50:44 UTC
IOW, if you mount/unmount FAT32 and then poweroff, you can reproduce this?
Otherwise, I can't see relation to FAT.
Comment 14 OGAWA Hirofumi 2013-02-18 06:01:40 UTC
Several inotify bugs was fixed at 3.8. Please try to reproduce on 3.8.
Comment 15 Giovanni Venturi 2013-02-18 17:16:44 UTC
I can't reproduce it in 3.7 I hope no regression back in 3.8 .