FS#22979 - [kernel26] Oops on plugging of usb-storage with kernel26 + crash on boot with last kernel upgrade

Attached to Project: Arch Linux
Opened by Claude Viallet (cmv) - Sunday, 20 February 2011, 18:17 GMT
Last edited by Andrea Scarpino (BaSh) - Tuesday, 03 May 2011, 22:21 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture x86_64
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

On sony VAIO/VPCZ13C5E:
Oops on plugging of usb-storage with kernel26 2.6.37.1-1
(2.6.37-ARCH (tobias@T-POWA-LX) #1 SMP PREEMPT Mon Jan 24 18:15:58 CET 2011)
since last full upgrade,
and crash on boot with
2.6.37-ARCH (tobias@T-POWA-LX) #1 SMP PREEMPT Fri Feb 18 18:32:16 CET 2011
Also with 2.6.32-lts (tobias@T-POWA-LX) #1 SMP Sat Feb 19 17:33:02 CET 2011


Additional info:
I append the dmesg part, for the usb-storage crash with kernel26 2.6.37.1-1

.....
usb 2-1.5: new high speed USB device using ehci_hcd and address 4
Initializing USB Mass Storage driver...
scsi6 : usb-storage 2-1.5:1.0
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver uas
scsi 6:0:0:0: Direct-Access SanDisk U3 Titanium 4.06 PQ: 0 ANSI: 2
sd 6:0:0:0: Attached scsi generic sg3 type 0
sd 6:0:0:0: [sdc] 7856128 512-byte logical blocks: (4.02 GB/3.74 GiB)
scsi 6:0:0:1: CD-ROM SanDisk U3 Titanium 4.06 PQ: 0 ANSI: 2
sd 6:0:0:0: [sdc] Write Protect is off
sd 6:0:0:0: [sdc] Mode Sense: 03 00 00 00
sd 6:0:0:0: [sdc] Assuming drive cache: write through
sr1: scsi3-mmc drive: 8x/40x writer xa/form2 cdda tray
sr 6:0:0:1: Attached scsi CD-ROM sr1
sr 6:0:0:1: Attached scsi generic sg4 type 5
sd 6:0:0:0: [sdc] Assuming drive cache: write through
BUG: unable to handle kernel NULL pointer dereference at 00000000000002d1
IP: [<ffffffffa03809a0>] last_sector_hacks.clone.1+0x70/0x120 [usb_storage]
PGD 0
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1d.0/usb2/product
CPU 0
Modules linked in: uas usb_storage ipv6 ext2 snd_hda_codec_hdmi usbhid hid qcserial usb_wwan btusb bluetooth usbserial uvcvideo videodev v4l1_compat v4l2_compat_ioctl32 joydev snd_seq_dummy arc4 snd_seq_oss snd_hda_codec_realtek ecb i915 snd_seq_midi_event drm_kms_helper iwlagn snd_seq snd_hda_intel drm iwlcore snd_seq_device snd_hda_codec mac80211 snd_pcm_oss snd_mixer_oss snd_hwdep cfg80211 sony_laptop tpm_tis sdhci_pci ehci_hcd snd_pcm sdhci i2c_algo_bit tpm_infineon snd_timer tpm intel_agp rfkill wmi sg usbcore serio_raw mmc_core ac thermal intel_ips snd processor button i2c_i801 battery psmouse intel_gtt iTCO_wdt video shpchp tpm_bios evdev soundcore e1000e i2c_core output iTCO_vendor_support pcspkr snd_page_alloc pci_hotplug ext4 mbcache jbd2 crc16 sr_mod cdrom sd_mod ahci libahci libata scsi_mod

Pid: 2122, comm: usb-storage Not tainted 2.6.37-ARCH #1 VAIO/VPCZ13C5E
RIP: 0010:[<ffffffffa03809a0>] [<ffffffffa03809a0>] last_sector_hacks.clone.1+0x70/0x120 [usb_storage]
RSP: 0018:ffff880126819d88 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000028
RDX: ffff8801524ec000 RSI: ffff88013f16d85c RDI: ffff88013f16d858
RBP: ffff880126819d90 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000051 R11: 0000000000000000 R12: ffff8801524ec000
R13: ffff88013f16d6c0 R14: ffff88013f16d7e8 R15: ffff880126819e80
FS: 0000000000000000(0000) GS:ffff880093200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00000000000002d1 CR3: 000000000154b000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process usb-storage (pid: 2122, threadinfo ffff880126818000, task ffff880135b93e70)
Stack:
ffff88013f16d670 ffff880126819e50 ffffffffa038104c 7fffffffffffffff
000000003f16d7d0 0000000000000001 ffff880135b93e70 ffff880126819e50
ffff88013f16d670 ffff880126819e40 ffffffff813a599d ffff88013f16d678
Call Trace:
[<ffffffffa038104c>] usb_stor_invoke_transport+0xbc/0x440 [usb_storage]
[<ffffffff813a599d>] ? __mutex_lock_slowpath+0x22d/0x310
[<ffffffffa037ff19>] usb_stor_transparent_scsi_command+0x9/0x10 [usb_storage]
[<ffffffffa0381d6a>] usb_stor_control_thread+0x16a/0x280 [usb_storage]
[<ffffffffa0381c00>] ? usb_stor_control_thread+0x0/0x280 [usb_storage]
[<ffffffffa0381c00>] ? usb_stor_control_thread+0x0/0x280 [usb_storage]
[<ffffffff81077826>] kthread+0x96/0xa0
[<ffffffff8100cd24>] kernel_thread_helper+0x4/0x10
[<ffffffff81077790>] ? kthread+0x0/0xa0
[<ffffffff8100cd20>] ? kernel_thread_helper+0x0/0x10
Code: 00 4d 85 d2 74 2e 89 d8 45 0f b6 c9 45 0f b6 db c1 e0 18 41 c1 e1 10 45 0f b6 c0 44 09 c8 41 c1 e0 08 44 09 d8 44 09 c0 83 c0 01 <49> 3b 82 80 02 00 00 74 27 84 c9 74 06 c7 06 00 00 00 00 5b c9
RIP [<ffffffffa03809a0>] last_sector_hacks.clone.1+0x70/0x120 [usb_storage]
RSP <ffff880126819d88>
CR2: 00000000000002d1
---[ end trace f7a68a799f8f12dd ]---



This task depends upon

Closed by  Andrea Scarpino (BaSh)
Tuesday, 03 May 2011, 22:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  kernel26 2.6.38.5-1
Comment by Chris Brasington (raylinth) - Monday, 21 February 2011, 21:09 GMT
This worked for me. Same issue, USB devices stopped working. USB harddrives did not show properly in /dev and even USB mouse quit working.

Fix Source: https://wiki.archlinux.org/index.php/Mkinitcpio#mkinitcpio_hangs_on_.27autodetect.27_during_kernel_upgrade
mkinitcpio hangs on 'autodetect' during kernel upgrade:
This bug sometimes causes mkinitcpio to hang when upgrading the kernel. It has been noted that certain usb devices and pata hard drives/chipsets may irritate the issue, but the actual cause is currently unknown (2010-03-01). The best known method to circumvent this bug is to edit '/etc/mkinitcpio.conf' and remove 'autodetect' from the HOOKS parameter. Once removed, force reinstall the kernel with 'pacman -Sf kernel26', and mkinitcpio should process cleanly.
Reboot the system, and then add 'autodetect' back to the HOOKS parameter, and force reinstall the kernel again to complete this workaround. While running on the new kernel, 'autodetect' seems to process successfully.
NOTE: Be very careful modifying 'etc/mkinitcpio.conf'. Review the procedures BEFORE modifying, and make a backup. Some systems may need another hook for pata/ide, or sata if the respective hook is not yet present. If mkinitcpio fails during a kernel upgrade, and the issue is not resolved before a reboot is executed, this will most likely result in a kernel panic/nonfunctioning system!

Description:
On Macbook 2,1 with Arch Linux x86_64, 2.6.37-ARCH

Additional info:
dmesg at the time of hangup:
...
USB Mass Storage support registered.
usbcore: registered new interface driver uas
scsi 4:0:0:0: Direct-Access B&N NOOK 0322 PQ: 0 ANSI: 2
sd 4:0:0:0: Attached scsi generic sg2 type 0
sd 4:0:0:0: [sdb] Attached SCSI removable disk
sd 4:0:0:0: [sdb] 2681062 512-byte logical blocks: (1.37 GB/1.27 GiB)
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sd 4:0:0:0: [sdb] Assuming drive cache: write through
BUG: unable to handle kernel NULL pointer dereference at 00000000000002d1
IP: [<ffffffffa01a79a0>] last_sector_hacks.clone.1+0x70/0x120 [usb_storage]
PGD 0
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/serial
CPU 0
Modules linked in: uas usb_storage cryptd aes_x86_64 aes_generic ipv6 sbs sbshc coretemp btusb bluetooth ext2 hid_apple usbhid hid appletouch snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss i915 snd_hda_codec_idt arc4 ecb snd_hda_intel drm_kms_helper vboxdrv ath9k snd_hda_codec drm uvcvideo mac80211 ath9k_common ath9k_hw snd_hwdep i2c_algo_bit firewire_ohci iTCO_wdt joydev videodev uhci_hcd v4l1_compat ath snd_pcm firewire_core applesmc cfg80211 ehci_hcd rfkill iTCO_vendor_support usbcore v4l2_compat_ioctl32 i2c_i801 battery pcspkr input_polldev snd_timer crc_itu_t intel_agp evdev snd intel_gtt ac i2c_core soundcore sg video button output mbp_nvidia_bl processor sky2 snd_page_alloc fuse ext4 mbcache jbd2 crc16 uvesafb cn sd_mod sr_mod cdrom ata_piix pata_acpi libata scsi_mod

Pid: 4106, comm: usb-storage Not tainted 2.6.37-ARCH #1 Mac-F4208CAA/MacBook2,1
RIP: 0010:[<ffffffffa01a79a0>] [<ffffffffa01a79a0>] last_sector_hacks.clone.1+0x70/0x120 [usb_storage]
RSP: 0018:ffff88004f9fdd88 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000028
RDX: ffff880078b75800 RSI: ffff88001dd8185c RDI: ffff88001dd81858
RBP: ffff88004f9fdd90 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000051 R11: 0000000000000000 R12: ffff880078b75800
R13: ffff88001dd816c0 R14: ffff88001dd817e8 R15: ffff88004f9fde80
FS: 0000000000000000(0000) GS:ffff88007d600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00000000000002d1 CR3: 000000000154b000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process usb-storage (pid: 4106, threadinfo ffff88004f9fc000, task ffff88004f991bc0)
Stack:
ffff88001dd81670 ffff88004f9fde50 ffffffffa01a804c 7fffffffffffffff
000000001dd817d0 0000000000000001 ffff88004f991bc0 ffff88004f9fde50
ffff88001dd81670 ffff88004f9fde40 ffffffff813a582d ffff88001dd81678
Call Trace:
[<ffffffffa01a804c>] usb_stor_invoke_transport+0xbc/0x440 [usb_storage]
[<ffffffff813a582d>] ? __mutex_lock_slowpath+0x22d/0x310
[<ffffffffa01a6f19>] usb_stor_transparent_scsi_command+0x9/0x10 [usb_storage]
[<ffffffffa01a8d6a>] usb_stor_control_thread+0x16a/0x280 [usb_storage]
[<ffffffffa01a8c00>] ? usb_stor_control_thread+0x0/0x280 [usb_storage]
[<ffffffff813a43d0>] ? preempt_schedule+0x40/0x60
[<ffffffffa01a8c00>] ? usb_stor_control_thread+0x0/0x280 [usb_storage]
[<ffffffff810777c6>] kthread+0x96/0xa0
[<ffffffff8100cce4>] kernel_thread_helper+0x4/0x10
[<ffffffff81077730>] ? kthread+0x0/0xa0
[<ffffffff8100cce0>] ? kernel_thread_helper+0x0/0x10
Code: 00 4d 85 d2 74 2e 89 d8 45 0f b6 c9 45 0f b6 db c1 e0 18 41 c1 e1 10 45 0f b6 c0 44 09 c8 41 c1 e0 08 44 09 d8 44 09 c0 83 c0 01 <49> 3b 82 80 02 00 00 74 27 84 c9 74 06 c7 06 00 00 00 00 5b c9
RIP [<ffffffffa01a79a0>] last_sector_hacks.clone.1+0x70/0x120 [usb_storage]
RSP <ffff88004f9fdd88>
CR2: 00000000000002d1
---[ end trace 03d2cb8cd92421bb ]---
usb 1-1: USB disconnect, address 8
Comment by Fabian Melters (xx4h) - Tuesday, 01 March 2011, 23:11 GMT
edit: forgot about having a /boot/boot partition -.- above mention should solve the issue
Comment by Taras Shpot (mrshpot) - Thursday, 03 March 2011, 17:42 GMT
I get the exact same Oops with 2.6.37.1 and 2.6.37.2.
The workaround (remove `autodetect', reinstall, reboot, add `autodetect', reinstall, reboot) did not work for me.
The Oops does not happen on 2.6.37 when I roll back, but happens with the newer two.
I jave just upgraded the whole system, so everything is up-to-date.
Do we report the bug to upstream?
Comment by Taras Shpot (mrshpot) - Wednesday, 09 March 2011, 08:08 GMT
The problem for me was caused by a stale initrd in /boot/boot which was used instead of the one in /boot.
After fixing the bootloader options to use the initrd in /boot, the oops went away.
Comment by Jelle van der Waa (jelly) - Thursday, 14 April 2011, 21:20 GMT
is this still an issue?
Comment by JM (fijam) - Tuesday, 03 May 2011, 09:21 GMT
Original submitter hasn't replied, commenters seem to have resolved the issue. Candidate for closing?
Comment by Claude Viallet (cmv) - Tuesday, 03 May 2011, 10:00 GMT

The issue with usb plugging is apparently solved by removing permanently 'autodetect' from HOOKS parameters, which is ok, if not completely satisfactory. The crash on boot still there for one out of three the kernel upgrades (present kernel 26 fine).
Comment by JM (fijam) - Tuesday, 03 May 2011, 11:04 GMT
Is it still required to remove 'autodetect' with current packages?
Comment by Claude Viallet (cmv) - Tuesday, 03 May 2011, 20:19 GMT
I just installed kernel26-2.6.38.5-1 with autodetect back in /etc/mkinitcpio.conf.
It went all right this time.

Loading...