You are not logged in.

#1 2011-06-14 07:03:28

James2k
Member
Registered: 2011-06-13
Posts: 19

Possible bad USB Port causing Kernel Panic?

Hi all,

I have modified the original post after testing out the hard drive with various different situations and have actually found it could be a combination of both the USB port/Data cable

I'm running Arch Linux on a Compaq Presario CQ60 Laptop it has three USB ports in total. Two USB ports on the right side and one on the left. One USB port on the right hand side is mostly occupied by my Nano Mouse transceiver for my Wireless Mouse, the other I usually use for external devices i.e. Pen drives, external hard drives etc. Every time I've used my USB Hard drive in Arch I'd been using the other port on the right side. Every time I tried mounting the USB hard drive with the cable described below in the original post, a kernel panic would occur, however using a different cable in the same USB port didn't lock up or kernel panic my system. Strange huh? But I then tried the other USB port on the left side of my laptop with the cable which I thought was the cause of my problems and interestingly enough the drive seems to be OK and did not crash my system. I mounted and unmounted the drive several times and it was fine.

My little testing session isn't really conclusive but maybe shows it could be partly a problem with the specific USB port on my laptop.

Not sure where I can go with this, but if anyone could give me any help on my problem, I'd be very grateful.

Original post below:

I just encountered something interesting. I have a IOMEGA 250 GB portable hard drive for College work and recently attempted to mount it in Arch Linux, as I did my laptop locked up and the caps locks light starting flashing, a lovely kernel panic. I know the hard drive itself is OK as its been mounted in various other linux distributions and Windows without fail, so on a hunch I used another USB data cable and suprisingly the drive mounted OK without causing a kernel panic.

It looks like the cable is to blame here, though I was a bit curious as to what would be wrong with it. It is fairly new, I bought it off Amazon, but its not exactly a top of the range cable, but it has worked fine in Windows since the purchase data two weeks ago:

http://www.amazon.co.uk/gp/product/B001 … ss_product

Any thoughts on why the cable is causing a kernel panic?

Thanks,

James

Last edited by James2k (2011-06-17 11:53:45)

Offline

#2 2011-06-14 09:17:54

lukaszan
Member
Registered: 2011-05-05
Posts: 117

Re: Possible bad USB Port causing Kernel Panic?

Are you sure it's the cable ? There is a known issue with certain USB devices causing kp on x86_64 machines since kernel 2.6.38, if I remember correctly.

Offline

#3 2011-06-14 12:17:41

James2k
Member
Registered: 2011-06-13
Posts: 19

Re: Possible bad USB Port causing Kernel Panic?

Well it seemed to work fine with a different USB cable. I'm running Arch 32 bit on the 2.6.39-ARCH kernel.

Offline

#4 2011-06-14 19:39:35

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: Possible bad USB Port causing Kernel Panic?

I have a USB cable that doesn't give enough power to my hard drives for them to start, but it has never caused a kernel panic.

(Edit: but I probably haven't tried with kernel 2.6.38.)
(Edit: Arch 32 bit too.)

Last edited by stqn (2011-06-14 19:41:05)

Offline

#5 2011-06-17 11:52:01

James2k
Member
Registered: 2011-06-13
Posts: 19

Re: Possible bad USB Port causing Kernel Panic?

Original Post updated with a testing session I carried out.

Hope someone can help!

Offline

#6 2011-06-17 12:37:04

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: Possible bad USB Port causing Kernel Panic?

I'm thinking both ports on the right side probably are linked internally (same controller or whatever it's called) and maybe your hard drive requires too much power, which causes problems with your transceiver thing and causes a crash.

On my desktop if I plug two HDs on USB ports that are next to each other, then sooner or later one of the HDs will disconnect itself... (Even though this mobo is supposed to provide more than enough current on each port.)

I don't think there's much you can do besides plugging stuff in a way that works, as you've found out smile.

Last edited by stqn (2011-06-17 12:37:55)

Offline

#7 2011-06-17 12:44:30

James2k
Member
Registered: 2011-06-13
Posts: 19

Re: Possible bad USB Port causing Kernel Panic?

That would certainly seems like the most logical explanation of my issue.

I did once encounter a similar situation like yourself, where by I had two external hard drives plugged in and only one was able to be read (This was in Windows mind) but the point you raise probably applies here.

I might test the hard drive in the troublesome USB port later without my Nano Wireless mouse transceiver in to see if it can stay connected without locking up my system. Though might give it a rest for a bit, having to hard power off my laptop a few times for the test exercise isn't going to be doing much good on the filesystem!

Thanks for your advice and explanation.

Offline

#8 2011-06-17 16:33:09

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,353

Re: Possible bad USB Port causing Kernel Panic?

It might be fruitful to look at the dmesg output at the time of the panic.  How, you ask? It is a trick.

Try this.

  • Edit your /etc/syslog-ng/syslog-ng.conf

  • set it up to log everything to tty12 (uncomment the last line in the stock file)

  • restart syslog-ng.

  • Verify that messages are being sent to tty12 (switch to it using Ctrl-Alt-F12)

  • Plug in the device

  • Watch the kernel scream

Maybe it will give a clue.  What I suspect is that the device starts to connect, then goes off line part way during the process.  Maybe because of a power overcurrent detect, maybe because of garbled or high bit error rates, or whatever.  The Linux kernel may be more susceptible to the error condition than are other kernels, or maybe the Linux kernel is a lot more cautious about non-deterministic conditions than other kernels.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2011-06-17 17:23:27

James2k
Member
Registered: 2011-06-13
Posts: 19

Re: Possible bad USB Port causing Kernel Panic?

Hi ewaller,

Thanks for the tip, I went ahead and following your steps.

Here's what was outputted before the kernel panic (not much from what I can tell)

kernel:  [   210.330011] usb 2-3: new high speed USB device number 4 using ehci_hcd
mtp-probe: checking bus2, device 4 "/sys/devices/pci0000:00/0000:00:04.1/usb2/2-3"
mtp-probe: bus: 2, device: 4 was not an MTP device
mtp-probe: checking 2 bus 2, device 4: "/sys/devices/pci0000:00/0000:00:04.1/usb2/2-3"
mtp-probe: bus 2, device 4 was not an MTP device
kernel:  [   210.460033 scsi5 : usb-storage 2-3:1.0

And then after the last line my laptop kernel panicked.

It actually took me a few goes to get the drive to actually cause a kernel panic but it happened eventually. Something that also happened for the first time, while in Gnome 3 I unmounted the drive via nautilus and that caused a lock up, but not a kernel panic because my caps lock light wasn't flashing, not sure if still means kernel panic but that's what happened.

Last edited by James2k (2011-06-17 17:28:37)

Offline

Board footer

Powered by FluxBB