# [solved] Kernel Panic when inserting an USB drive with NTFS

## MMMMM

Hello,

I have for the second time a kernel panic by inserting a NTFS formatted USB drive. First was a flash stick, 2nd  a 2.5" hard disk.

From the 2nd crash I have a screenshot:

[IMG]http://www8.pic-upload.de/13.06.11/myow2c7mc2.png[/IMG]

Does anyone have an idea?

Micha.

Hello,

the solution is to use a newer kernel, 2.6.39-r3 is working perfectly.  :Very Happy: 

Thanks all!Last edited by MMMMM on Sun Jul 17, 2011 4:32 pm; edited 1 time in total

----------

## Aquous

It might be USB/BIOS related - it does say 'fatal exception in interrupt'. Could you try updating your BIOS and see if that helps?

----------

## i92guboj

Hello.

I can't really be of much help (at least not for now) but I've experienced this same issue. I can't be sure when did it start, but I think it was several months ago. It happens only occasionally and I can't reproduce it consistently.

At first I thought it was the drive, but it happened with several different sticks and a couple external usb HDs. I downgraded the kernel at some point but it didn't seem to help either. 

Just as a random thing, can you tell me what mother board and chipset are you using?

My board is an ASUS M4A785TD-V EVO with a RS780/RS880 chipset. I use a 2.6.39.1 kernel and ntfs3g-2011.4.12

----------

## MMMMM

Hello,

I don't think that this is BIOS related. But maybe that helps so I've updated it. I use this BIOS since 2009 with no problem.

I have an MSI 785G-E53 board. Chipset is AMD 785G / RS780/880. CPU is Phenom II X4 3.2GHz.

Kernel: Linux X4 2.6.38-gentoo-r6 #2 SMP PREEMPT Fri Jun 3 11:41:55 CEST 2011 x86_64 AMD Phenom(tm) II X4 955 Processor AuthenticAMD GNU/Linux.

Prior to the BIOS update I had another crash, this time it was an FAT32 Stick.

Micha.

----------

## i92guboj

Interestingly enough, we share the same chipset.

----------

## virduun

I also get kernel panics when inserting USB drives sometimes, except both of my flash drives are FAT32 formatted.  I haven't tried it with my external hard drive though.  The 1GB flash drive I have almost always works (the one time it caused a panic was when the other drive was also inserted during a test), but about 8 times out of 10, my 8GB drive will cause a panic when inserted.  I made a thread about it a week or two ago but never really got any bites--of course, I really didn't know where to start, so maybe I didn't give out some useful information.  I also have an external hard drive formatted NTFS but haven't tested it.

Interestingly enough, I also have an ASUS M4A785TD-V EVO motherboard.  The manual lists my chipset as AMD 785G/SB710.

----------

## i92guboj

I don't really know if ntfs has something to do with this. I can't guarantee either that all the hard locks have been with ntfs drives because one of the things I have been trying when this happened was to format them with ext4 and fat. I am not sure what happened at this point.

If only I could find a consistent way to reproduce this, then everything would be easier and we could report this directly to the linux kernel mailing list.

----------

## Kernald

I've got the same issue (on a fresh install, 2.6.39-r1) with the same Asus MB. And everytime I plug a drive, not occasionaly ! If I can help…

----------

## i92guboj

 *Marc31boss wrote:*   

> I've got the same issue (on a fresh install, 2.6.39-r1) with the same Asus MB. And everytime I plug a drive, not occasionaly ! If I can help…

 

If you can consistently reproduce the bug, then you can probably help. Can you, please, try to get a core dump? To do so, try to do this:

```

echo "/core" > /proc/sys/kernel/core_pattern

ulimit -c unlimited
```

Then make your computer crash by pluging in the usb drive, and after rebooting see if there's a /core file in the root of your fs. If you have that, then you can report this issue in the linux kernel mailing list.

----------

## andrewthomas

I too have been having occasional kernel panics with 2.6.39 and the 3.0.0 git sources. 

I have a ASUS M3A32-MVP with a AMD 790FX / SB600 chipset.

It has nothing to do with ntfs, since I encounter the problem with ext4, but it is happening with a 32GB USB stick.

----------

## Kernald

I tried 6 times yesterday, 6 kernel panics, no one now… I'll try to get it  :Wink: 

----------

## ssteger

I reliably encounter this problem about 1 out of every 4 times I plug in a USB storage device (occurs with 2 flash drives and my Android phone).  The problem started occurring a few months ago, but I had trouble tracking it down at the time and I don't remember the changes that immediately preceded this kernel panic.  The only thing I can think of is the upgrade to Baselayout 2 and migrating to using udev-only (and removing HAL).  I also upgraded from kernel 2.6.37 to 2.6.38 at the same time.  

This hardware configuration ran well for more than a year before this problem started.  Removing third party binary kernel modules (VirtualBox and Nvidia graphics) doesn't change anything.

Motherboard: Asus M3N78 with GeForce 8300 chipset (BIOS version 701, which is not the latest)

CPU: AMD Phenom 9600 (quad-core)

Kernel: 2.6.38-r6

----------

## whig

I had a system freeze on plugging in a usb camera, (v?)fat formatted. Gentoo ~amd64 but c2q cpu, vanilla 2.6.39 with usb config defaults so mostly statically compiled.

----------

## doralsoral

Im just going to add to this thread to keep it alive, i have the same problem. It happens randomly on 2 different external hard drives. Im on the 790X chipset. The common denominator seems to be AMD chipsets of the 78X/79X variety.

----------

## chithanh

There was a kernel bug in 2.6.39 which caused a kernel panic on USB plug event, it should be fixed in gentoo-sources-2.6.39-r1.

----------

## doralsoral

 *Marc31boss wrote:*   

> I've got the same issue (on a fresh install, 2.6.39-r1) with the same Asus MB. And everytime I plug a drive, not occasionaly ! If I can help…

 

Also i am on kernel 2.6.38 So it doesnt sound like its the same bug.

----------

## chithanh

The OP's stack trace looks very similar to the one produced by the bug. So I think it is the same issue.

Regarding the other panics reported here, I don't see any stack trace so I can't say.

----------

## doralsoral

Mine spits out almost the exact same thing, at least the last 10-15 are the same im sure, im on kernel 2.6.38 and im pretty sure my last install i was running 2.6.39-r1 and it was still doing it. I will update to the kernel that supposedly has the fix and see if its still doing it.

----------

## chithanh

There is a different bug which affects kernel 2.6.38 and later, also see this forum thread.

----------

## i92guboj

 *chithanh wrote:*   

> The OP's stack trace looks very similar to the one produced by the bug. So I think it is the same issue.
> 
> Regarding the other panics reported here, I don't see any stack trace so I can't say.

 

Mine was the same. I haven't had a crash lately, using 2.6.39.1 from upstream (I manage the kernel outside the portage tree).

----------

## gerard27

I didn't have problems with USB sticks because I don't have any.

However I recently bought a Wacom PT tablet to use in Gimp.

And I had all kinds of probs.

I upgraded my kernel to 2.6.39-gentoo-r2 and all is ok I think.

Gerard.

----------

## nimra

can confirm problem with ASUS M3A32-MVP DELUXE, also using 790FX / SB600 combo

The problem does not seem Gentoo related though, as im on Arch Linux here...

Hope this helps...  :Wink: 

NIMRA

----------

## kimmie

Do you need a preemptible kernel? It really isn't of benefit over Voluntary Kernel Preemption for a normal desktop system, and there's a chance switching might work around your problem.

----------

## nimra

okay guys, found a little bit dirty sollution for the problem

In my case it helped to just turn off powernow CPU frequency scaling

Dont have these problems anymore.

NIMRA

----------

