Summary: | >sys-kernel/gentoo-sources-2.6.38-r4 Usb storage devices freeze system | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Chema <chemacg> |
Component: | [OLD] Core system | Assignee: | Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | icephoenix.nx1729+gentoo |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | linux-2.6.39.1 | ||
Package list: | Runtime testing required: | --- | |
Attachments: |
Screen just after system freeze
Screen just after system freeze |
Description
Chema
2011-05-28 17:25:29 UTC
Enable kernel logging and make sure your kernel syncs to the disk after every write, and report back with some kernel log info. Well i'll need a little help with that, i don't know how to do it. I've enabled this in the kernel: [*] Kernel debugging [*] Debug shared IRQ handlers [*] Detect Hard and Soft Lockups and [*] USB verbose debug messages [*] USB Mass Storage verbose debug and this is my /etc/fstab /dev/sda1 /boot ext2 defaults,noatime,nodiratime 1 2 /dev/sda5 / ext4 defaults,noatime,exec,nodiratime,commit=1 0 1 /dev/sda6 /var ext4 defaults,noatime,barrier=0,nodiratime,commit=1 0 1 /dev/sda7 /usr/src ext4 defaults,noatime,nodiratime,commit=1 0 1 /dev/sda8 /usr/portage ext4 defaults,noatime,nodiratime 0 1 /dev/sda9 /usr/portage/distfiles ext4 defaults,noatime,nodiratime 0 1 /dev/sda2 none swap sw 0 0 /dev/sda10 /home ext4 defaults,auto,user,rw,exec,noatime,nodiratime,commit=1 0 1 tmpfs /dev/shm tmpfs nodev,nosuid,noexec 0 0 I see USB debug messages with watch -n 0,1 "dmesg|tail -n 60" but i don't see anything wrong and i can't save it into a file. Besides, /var/log/messages don't show anything, only garbage like this ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^ Got bitten by this bug after upgrading to the newly stabled gentoo-sources-2.6.38-r6; the presence of a USB mass storage device will most of the time cause a kernel panic, whether it be present during bootup or plugged in later. I found this thread elsewhere... https://bbs.archlinux.org/viewtopic.php?id=119034 ...and like the people over there I have an AMD quad-core CPU. Reading that thread, I'm not clear on whether the finger points to that version of the kernel, udev, or both. Can you please test with vanilla-sources-2.6.38.8 or gentoo-sources-2.6.38-r7 (both of which I just committed) ? (In reply to comment #4) > Can you please test with vanilla-sources-2.6.38.8 or gentoo-sources-2.6.38-r7 > (both of which I just committed) ? gentoo-sources-2.6.38-r7 seems to solve it for me! 2.6.38-r6 would cause a kernel panic about 1 in 3 times a USB mass storage device was detected. With 2.6.38-r7, using my external hard drive and also my mobile phone and MP3 player which appear as mass storage devices, I've plugged and unplugged them several dozen times and no panic or crash has occured. Thanks, I'll roll a new 2.6.39 which also contains this fix in a few days. gentoo-sources-2.6.39-r1 released with the patch for this issue. Sorry but this isn't fixed for me, i've tried with 38-r7 and 39-r1 and it's always the same. Only with 38-r4 or less the system doesn't freeze Well, do i need to do something to get this fixed? maybe there is some kind of procedure that i'm missing in updating the kernel? Created attachment 277407 [details]
Screen just after system freeze
It says something of blk-core.c
I attached a screen of my system just after the freeze and i think i finally got something. I hope this is of some use to you. Thanks. Created attachment 277409 [details]
Screen just after system freeze
Sorry wrong content type
The solution is: # eselect kernel list Available kernel symlink targets: [1] linux-2.6.38-gentoo-r4 [2] linux-2.6.38-gentoo-r5 [3] linux-2.6.38-gentoo-r6 [4] linux-2.6.38-gentoo-r7 [5] linux-2.6.39-gentoo-r1 * # nano -w /usr/src/linux-2.6.39-gentoo-r1/drivers/scsi/scsi_sysfs.c ctrl+w: struct device_attribute dev_attr_hstate = static struct device_attribute dev_attr_hstate = ctrl+w: struct attribute_group scsi_shost_attr_group = static struct attribute_group scsi_shost_attr_group = # cd /usr/src/linux # make # make modules_install # mount /boot # make install # umount /boot # shutdown -r now This is the patch: https://patchwork.kernel.org/patch/487421/ For the next release "2.6.39-r2" seem to be included. https://lwn.net/Articles/447767/ Greetings Well, it seems that after using it a while, the problem returned then I started looking for another patch has come out and meet me with this set of patches: http://kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.39.2-rc1.gz Then apply the changes to two files scsi_scan.c scsi_sysfs.c and now I can say I made a thousand proofs of connecting and disconnecting USB sticks and so far I have not had more kernel panic. # nano -w /usr/src/linux-2.6.39-gentoo-r1/drivers/scsi/scsi_scan.c ctrl+w: sdev->request_queue->queuedata = sdev; and one line up... blk_get_queue(sdev->request_queue); # nano -w /usr/src/linux-2.6.39-gentoo-r1/drivers/scsi/scsi_sysfs.c ctrl+w: /* NULL queue means the device can't be used */ and one line up... blk_put_queue(sdev->request_queue); # cd /usr/src/linux # make # mount /boot # make install # umount /boot # shutdown -r now Greetings Oh man, i love you LOL After applying the modifications suggested by NĂ©stor A. Marchesini the bug is gone!!! |