* 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
@ 2005-02-10 10:56 Olaf Hering
2005-02-10 15:07 ` [linux-usb-devel] " Alan Stern
0 siblings, 1 reply; 12+ messages in thread
From: Olaf Hering @ 2005-02-10 10:56 UTC (permalink / raw)
To: linux-usb-devel; +Cc: linux-scsi
I see a few refcount handling bugs in the scsi and/or usb layer.
With a vanilla kernel, plugging an usb stick in , and remove it a few
times:
usb 2-1: USB disconnect, address 4
Oops: kernel access of bad area, sig: 11 [#1]
NIP: CDD3E424 LR: CDD05398 SP: C9713F40 REGS: c9713e90 TRAP: 0300 Not tainted
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 00000130, DSISR: 40000000
TASK = cae312c0[6674] 'scsi_eh_2' THREAD: c9712000
Last syscall: -1
GPR00: 00010718 C9713F40 CAE312C0 00000000 CDD146D0 00000001 00000000 00009032
GPR08: CAABF078 00000000 CB604800 C2801200 44088028 00000000 C07C67B8 00000004
GPR16: C07D8B9A C07D69D0 CDD30000 C9713F90 C03B286C C03433D8 C9713FA8 CDD30000
GPR24: CAABF078 00000000 C2801200 00000000 C9713FA0 CAABF078 FFFFFFF0 C1711600
NIP [cdd3e424] bus_reset+0x64/0x134 [usb_storage]
LR [cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod]
Call trace:
[cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod]
[cdd068c4] scsi_error_handler+0x86c/0xe68 [scsi_mod]
[c0006c2c] kernel_thread+0x44/0x60
Total memory = 192MB; using 512kB for hash table (at c0500000)
Linux version 2.6.11-rc3-bk5-200502100455-usbtest (abuild@pomegranate) (gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)) #1 Thu Feb 10 05:07:02 UTC 2005
Found UniNorth memory controller & host bridge, revision: 8
Mapped at 0xfdf00000
Found a Keylargo mac-io controller, rev: 3, mapped at 0xfde80000
Processor NAP mode on idle enabled.
PowerMac motherboard: PowerBook Pismo
Found UniNorth PCI host bridge at 0xf0000000. Firmware bus number: 0->0
Found UniNorth PCI host bridge at 0xf2000000. Firmware bus number: 0->1
Found UniNorth PCI host bridge at 0xf4000000. Firmware bus number: 0->0
via-pmu: Server Mode is disabled
PMU driver 2 initialized for Core99, firmware: 0c
nvram: Checking bank 0...
nvram: gen0=172, gen1=171
nvram: Active bank is: 0
nvram: OF partition at 0x210
nvram: XP partition at 0x1220
nvram: NR partition at 0x1320
On node 0 totalpages: 49152
DMA zone: 49152 pages, LIFO batch:12
Normal zone: 0 pages, LIFO batch:1
HighMem zone: 0 pages, LIFO batch:1
Built 1 zonelists
Kernel command line: root=/dev/hda12 selinux=0 elevator=as quiet
PowerMac using OpenPIC irq controller at 0x80040000
OpenPIC Version 1.2 (4 CPUs and 64 IRQ sources) at fc62f000
OpenPIC timer frequency is 4.166666 MHz
PID hash table entries: 1024 (order: 10, 16384 bytes)
GMT Delta read from XPRAM: 60 minutes, DST: off
time_init: decrementer frequency = 24.966218 MHz
Console: colour dummy device 80x25
pmac_zilog: i2c-modem detected, id: 1
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 188000k available (2884k kernel code, 1828k data, 208k init, 0k highmem)
AGP special page: 0xcbfff000
Calibrating delay loop... 796.67 BogoMIPS (lpj=398336)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 1084k freed
NET: Registered protocol family 16
PCI: Probing PCI hardware
Can't get bus-range for /pci@f2000000/cardbus@1a, assuming it starts at 0
Registering openpic with sysfs...
Linux Plug and Play Support v0.97 (c) Adam Belay
usbcore: registered new driver usbfs
usbcore: registered new driver hub
TC classifier action (bugs to netdev@oss.sgi.com cc hadi@cyberus.ca)
Thermal assist unit using timers, shrink_timer: 2000 jiffies
audit: initializing netlink socket (disabled)
audit(1108027661.271:0): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
PCI: Enabling device 0000:00:10.0 (0086 -> 0087)
aty128fb: Invalid ROM signature 0 should be 0xaa55
aty128fb: BIOS not located, guessing timings.
aty128fb: Rage128 LF M3 AGP [chip rev 0x0] 8M 128-bit SDR SGRAM (1:1)
Console: switching to colour frame buffer device 128x48
Registered "ati" backlight controller, level: 10/15
fb0: ATY Rage128 frame buffer device on Rage128 LF M3 AGP
no framebuffer address found for /pci@f0000000/ATY,RageM3pParent@10/ATY,RageM3pB
isapnp: Write Data Register 0xa79 already used
Generic RTC Driver v1.07
Macintosh non-volatile memory driver v1.1
serial8250_init: nothing to do on this board
pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
ttyS0 at MMIO 0x80013020 (irq = 22) is a Z85c30 ESCC - Internal modem
ttyS1 at MMIO 0x80013000 (irq = 23) is a Z85c30 ESCC - Infrared port
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Floppy drive(s): fd0 is 2.88M
IN from bad port 3f4 at c01e2774
floppy0: no floppy controllers found
RAMDISK driver initialized: 16 RAM disks of 123456K size 1024 blocksize
loop: loaded (max 8 devices)
MacIO PCI driver attached to Keylargo chipset
mediabay0: Registered KeyLargo media-bay
mediabay0: powering down
mediabay0: switching to 3
mediabay0: powering up
mediabay0: enabling (kind:3)
mediabay0: waiting reset (kind:3)
mediabay0: waiting IDE reset (kind:3)
mediabay0: waiting IDE ready (kind:3)
mediabay0: up before IDE init
input: Macintosh mouse button emulation
apm_emu: APM Emulation 0.5 initialized.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
adb: starting probe task...
adb devices: [2]: 2 c3 [3]: 3 1 [7]: 7 1f
ADB keyboard at 2, handler 1
Detected ADB keyboard, type ANSI.
input: ADB keyboard on adb2:2.c3/input
input: ADB Powerbook buttons on adb7:7.1f/input
ADB mouse at 3, handler set to 4 (trackpad)
input: ADB mouse on adb3:3.01/input
adb: finished probe task...
ide0: Found Apple KeyLargo ATA-4 controller, bus ID 2, irq 19
Probing IDE interface ide0...
hda: TOSHIBA MK1016GAP, ATA DISK drive
hda: Enabling Ultra DMA 4
ide0 at 0xcd01c000-0xcd01c007,0xcd01c160 on irq 19
ide1: Found Apple KeyLargo ATA-3 controller, bus ID 1, irq 21
Probing IDE interface ide1...
ide1: Bus empty, interface released.
Registered ide1 for media bay 0
ide1: Found Apple KeyLargo ATA-3 controller, bus ID 0 (mediabay), irq 20
Probing IDE interface ide1...
hdc: LG DVD-ROM DRN-8080B, ATAPI CD/DVD-ROM drive
hdc: Enabling MultiWord DMA 2
ide1 at 0xcd01e000-0xcd01e007,0xcd01e160 on irq 20
hda: max request size: 128KiB
hda: 19640880 sectors (10056 MB), CHS=19485/16/63, UDMA(66)
hda: cache flushes not supported
hda: [mac] hda1 hda2 hda3 hda4 hda5 hda6 hda7 hda8 hda9 hda10 hda11 hda12 hda13
hdc: ATAPI 23X DVD-ROM drive, 512kB Cache, DMA
Uniform CD-ROM driver Revision: 3.20
ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
PCI: Enabling device 0001:10:18.0 (0000 -> 0002)
ohci_hcd 0001:10:18.0: OHCI Host Controller
ohci_hcd 0001:10:18.0: irq 27, pci mem 0xa0002000
ohci_hcd 0001:10:18.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
PCI: Enabling device 0001:10:19.0 (0000 -> 0002)
ohci_hcd 0001:10:19.0: OHCI Host Controller
ohci_hcd 0001:10:19.0: irq 28, pci mem 0xa0001000
ohci_hcd 0001:10:19.0: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27
NET: Registered protocol family 2
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
udev[637]: removing device node '/dev/vcs1'
udev[638]: removing device node '/dev/vcsa1'
ReiserFS: hda12: found reiserfs format "3.6" with standard journal
ReiserFS: hda12: using ordered data mode
ReiserFS: hda12: journal params: device hda12, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: hda12: checking transaction log (hda12)
ReiserFS: hda12: Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Trying to move old root to /initrd ... failed
Unmounting old root
Trying to free ramdisk memory ... okay
Freeing unused kernel memory: 208k init 4k chrp 32k prep
Adding 130560k swap on /dev/hda11. Priority:42 extents:1
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected Apple UniNorth chipset
agpgart: Maximum main memory to use for agp memory: 150M
agpgart: configuring for size idx: 4
agpgart: AGP aperture is 16M @ 0x0
Linux Kernel Card Services
options: [pci] [cardbus] [pm]
PCI: 0001:10:1a.0 has unsupported PM cap regs version (1)
Yenta: CardBus bridge found at 0001:10:1a.0 [0000:0000]
PCI: 0001:10:1a.0 has unsupported PM cap regs version (1)
yenta 0001:10:1a.0: Preassigned resource 2 busy, reconfiguring...
Yenta: Enabling burst memory read transactions
Yenta: Using CSCINT to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta TI: socket 0001:10:1a.0, mfunc 0x00000002, devctl 0x60
Yenta: ISA IRQ mask 0x0000, PCI irq 58
Socket status: 30000006
ieee1394: Initialized config rom entry `ip1394'
ohci1394: $Rev: 1223 $ Ben Collins <bcollins@debian.org>
ohci1394: fw-host0: Unexpected PCI resource length of 1000!
ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[40] MMIO=[f5000000-f50007ff] Max Packet=[2048]
ohci1394: fw-host0: SelfID received outside of bus reset sequence
ieee1394: Host added: ID:BUS[0-00:1023] GUID[003065fffeb051c8]
ieee1394: got invalid ack 252 from node 65535 (tcode 0)
sungem.c:v0.98 8/24/03 David S. Miller (davem@redhat.com)
eth0: Sun GEM (PCI) 10/100/1000BaseT Ethernet 00:30:65:b0:51:c8
PHY ID: 406212, addr: 0
eth0: Found BCM5201 PHY
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
device-mapper: 4.4.0-ioctl (2005-01-12) initialised: dm-devel@redhat.com
SCSI subsystem initialized
st: Version 20041025, fixed bufsize 32768, s/g segs 256
Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon!
ieee1394: raw1394: /dev/raw1394 device initialized
video1394: Installed video1394 module
NET: Registered protocol family 10
Disabled Privacy Extensions on device c0357410(lo)
IPv6 over IPv4 tunneling driver
PHY ID: 406212, addr: 0
eth0: Link is up at 100 Mbps, full-duplex.
eth0: Pause is disabled
i2c /dev entries driver
usb 2-1: new full speed USB device using ohci_hcd and address 2
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
Vendor: Model: Pen Drive 2.0 Rev: 1.01
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sda: 507904 512-byte hdwr sectors (260 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 507904 512-byte hdwr sectors (260 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
sda: sda1
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
usb-storage: device scan complete
usb 2-1: USB disconnect, address 2
usb 2-1: new full speed USB device using ohci_hcd and address 3
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
Vendor: Model: Pen Drive 2.0 Rev: 1.01
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sda: 507904 512-byte hdwr sectors (260 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 507904 512-byte hdwr sectors (260 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
sda: sda1
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0, type 0
usb-storage: device scan complete
usb 2-1: USB disconnect, address 3
usb 2-1: new full speed USB device using ohci_hcd and address 4
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
Vendor: Model: Pen Drive 2.0 Rev: 1.01
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sda: 507904 512-byte hdwr sectors (260 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 507904 512-byte hdwr sectors (260 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
sda: sda1
Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi2, channel 0, id 0, lun 0, type 0
usb-storage: device scan complete
sda : READ CAPACITY failed.
sda : status=0, message=00, host=7, driver=00
sda : sense not available.
sda: Write Protect is off
sda: Mode Sense: 00 00 00 00
sda: assuming drive cache: write through
usb 2-1: USB disconnect, address 4
Oops: kernel access of bad area, sig: 11 [#1]
NIP: CDD3E424 LR: CDD05398 SP: C9713F40 REGS: c9713e90 TRAP: 0300 Not tainted
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 00000130, DSISR: 40000000
TASK = cae312c0[6674] 'scsi_eh_2' THREAD: c9712000
Last syscall: -1
GPR00: 00010718 C9713F40 CAE312C0 00000000 CDD146D0 00000001 00000000 00009032
GPR08: CAABF078 00000000 CB604800 C2801200 44088028 00000000 C07C67B8 00000004
GPR16: C07D8B9A C07D69D0 CDD30000 C9713F90 C03B286C C03433D8 C9713FA8 CDD30000
GPR24: CAABF078 00000000 C2801200 00000000 C9713FA0 CAABF078 FFFFFFF0 C1711600
NIP [cdd3e424] bus_reset+0x64/0x134 [usb_storage]
LR [cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod]
Call trace:
[cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod]
[cdd068c4] scsi_error_handler+0x86c/0xe68 [scsi_mod]
[c0006c2c] kernel_thread+0x44/0x60
----- End forwarded message -----
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-02-10 10:56 2.6.11-rc3-bk5, oops in scsi_try_bus_reset Olaf Hering
@ 2005-02-10 15:07 ` Alan Stern
2005-02-14 7:20 ` Olaf Hering
2005-02-15 5:41 ` Mike Anderson
0 siblings, 2 replies; 12+ messages in thread
From: Alan Stern @ 2005-02-10 15:07 UTC (permalink / raw)
To: Olaf Hering; +Cc: linux-usb-devel, linux-scsi
On Thu, 10 Feb 2005, Olaf Hering wrote:
> I see a few refcount handling bugs in the scsi and/or usb layer.
> With a vanilla kernel, plugging an usb stick in , and remove it a few
> times:
>
>
> usb 2-1: USB disconnect, address 4
> Oops: kernel access of bad area, sig: 11 [#1]
> NIP: CDD3E424 LR: CDD05398 SP: C9713F40 REGS: c9713e90 TRAP: 0300 Not tainted
> MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DAR: 00000130, DSISR: 40000000
> TASK = cae312c0[6674] 'scsi_eh_2' THREAD: c9712000
> Last syscall: -1
> GPR00: 00010718 C9713F40 CAE312C0 00000000 CDD146D0 00000001 00000000 00009032
> GPR08: CAABF078 00000000 CB604800 C2801200 44088028 00000000 C07C67B8 00000004
> GPR16: C07D8B9A C07D69D0 CDD30000 C9713F90 C03B286C C03433D8 C9713FA8 CDD30000
> GPR24: CAABF078 00000000 C2801200 00000000 C9713FA0 CAABF078 FFFFFFF0 C1711600
> NIP [cdd3e424] bus_reset+0x64/0x134 [usb_storage]
> LR [cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod]
> Call trace:
> [cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod]
> [cdd068c4] scsi_error_handler+0x86c/0xe68 [scsi_mod]
> [c0006c2c] kernel_thread+0x44/0x60
It's hard to tell for sure, but this looks much like the SCSI midlayer bug
encountered by Srihari Vijayaraghavan in
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=110535224408095&w=2
My response (unfortunately the email thread continuity got messed up) was
http://marc.theaimsgroup.com/?l=linux-scsi&m=110537890416616&w=2
And Mike Anderson's response was
http://marc.theaimsgroup.com/?l=linux-scsi&m=110538854224319&w=2
His explanation was "Currently scsi_host_cancel being called from
scsi_remove_host appears to not do anything as scsi_forget_host removes
the devices from the list it iterates over." I don't know whether this
problem has been fixed yet.
Alan Stern
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-02-10 15:07 ` [linux-usb-devel] " Alan Stern
@ 2005-02-14 7:20 ` Olaf Hering
2005-02-14 17:07 ` Alan Stern
2005-02-15 5:41 ` Mike Anderson
1 sibling, 1 reply; 12+ messages in thread
From: Olaf Hering @ 2005-02-14 7:20 UTC (permalink / raw)
To: linux-scsi; +Cc: linux-usb-devel
On Thu, Feb 10, Alan Stern wrote:
> And Mike Anderson's response was
>
> http://marc.theaimsgroup.com/?l=linux-scsi&m=110538854224319&w=2
>
> His explanation was "Currently scsi_host_cancel being called from
> scsi_remove_host appears to not do anything as scsi_forget_host removes
> the devices from the list it iterates over." I don't know whether this
> problem has been fixed yet.
So, does anyone else know if that has been fixed, are there any patches
I can try?
Just plugging it in and out with init=/bin/bash doesnt trigger the oops.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-02-14 7:20 ` Olaf Hering
@ 2005-02-14 17:07 ` Alan Stern
2005-02-16 13:12 ` Olaf Hering
2005-02-17 18:39 ` Olaf Hering
0 siblings, 2 replies; 12+ messages in thread
From: Alan Stern @ 2005-02-14 17:07 UTC (permalink / raw)
To: Olaf Hering; +Cc: linux-scsi, linux-usb-devel
On Mon, 14 Feb 2005, Olaf Hering wrote:
> On Thu, Feb 10, Alan Stern wrote:
>
> > And Mike Anderson's response was
> >
> > http://marc.theaimsgroup.com/?l=linux-scsi&m=110538854224319&w=2
> >
> > His explanation was "Currently scsi_host_cancel being called from
> > scsi_remove_host appears to not do anything as scsi_forget_host removes
> > the devices from the list it iterates over." I don't know whether this
> > problem has been fixed yet.
>
> So, does anyone else know if that has been fixed, are there any patches
> I can try?
> Just plugging it in and out with init=/bin/bash doesnt trigger the oops.
In fact I wrote a patch back in November that ought to work around the
problem, assuming this really is the problem you are seeing. The patch
still applies with a few offsets. It's available at
https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-November/001201.html
Alan Stern
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-02-14 17:07 ` Alan Stern
@ 2005-02-16 13:12 ` Olaf Hering
2005-02-17 18:39 ` Olaf Hering
1 sibling, 0 replies; 12+ messages in thread
From: Olaf Hering @ 2005-02-16 13:12 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-scsi, linux-usb-devel
On Mon, Feb 14, Alan Stern wrote:
> On Mon, 14 Feb 2005, Olaf Hering wrote:
>
> > On Thu, Feb 10, Alan Stern wrote:
> >
> > > And Mike Anderson's response was
> > >
> > > http://marc.theaimsgroup.com/?l=linux-scsi&m=110538854224319&w=2
> > >
> > > His explanation was "Currently scsi_host_cancel being called from
> > > scsi_remove_host appears to not do anything as scsi_forget_host removes
> > > the devices from the list it iterates over." I don't know whether this
> > > problem has been fixed yet.
> >
> > So, does anyone else know if that has been fixed, are there any patches
> > I can try?
> > Just plugging it in and out with init=/bin/bash doesnt trigger the oops.
>
> In fact I wrote a patch back in November that ought to work around the
> problem, assuming this really is the problem you are seeing. The patch
> still applies with a few offsets. It's available at
>
> https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-November/001201.html
I will try this patch now. Here is another oops without this patch,
removing and adding the stick with a few seconds delay between plug/unplug.
2.6.11-rc4-bk3-200502151447-usbtest
Feb 16 13:09:50 cowberry kernel: usb 2-1: USB disconnect, address 7
Feb 16 13:09:50 cowberry udev[6257]: removing device node '/dev/sg0'
Feb 16 13:09:50 cowberry kernel: Oops: kernel access of bad area, sig: 11 [#1]
Feb 16 13:09:50 cowberry kernel: NIP: C0011544 LR: C0042884 SP: C1BF5D20 REGS: c1bf5c70 TRAP: 0300 Not tainted
Feb 16 13:09:50 cowberry kernel: MSR: 00001032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
Feb 16 13:09:50 cowberry kernel: DAR: EF1F1E40, DSISR: 40000000
Feb 16 13:09:50 cowberry kernel: TASK = c1acb160[53] 'khubd' THREAD: c1bf4000
Feb 16 13:09:50 cowberry kernel: Last syscall: 120
Feb 16 13:09:50 cowberry kernel: GPR00: 00000000 C1BF5D20 C1ACB160 CA032210 EF1F1E3C DAE403CC CA03220C 1B5C8079
Feb 16 13:09:50 cowberry kernel: GPR08: 00000000 FFFFFFFC CA42F070 CA032210 00020734 00000000 C07CF7B8 00000004
Feb 16 13:09:50 cowberry kernel: GPR16: C07DFB9A C07DD9D0 C0360000 C07DFB4C C07CF7B8 C07DD800 C07CF7A0 C07DD800
Feb 16 13:09:50 cowberry kernel: GPR24: 00000000 00000001 00000001 CA032200 CA032210 00000000 251BFC30 C946FF0C
Feb 16 13:09:50 cowberry kernel: NIP [c0011544] memcpy+0x1c/0x9c
Feb 16 13:09:50 cowberry kernel: LR [c0042884] cache_flusharray+0x74/0xdc
Feb 16 13:09:50 cowberry kernel: Call trace:
Feb 16 13:09:50 cowberry kernel: [c00429f8] kmem_cache_free+0x68/0x84
Feb 16 13:09:50 cowberry kernel: [cdcd8128] scsi_destroy_command_freelist+0x4c/0x10c [scsi_mod]
Feb 16 13:09:50 cowberry kernel: [cdcd86e8] scsi_host_dev_release+0x84/0xc0 [scsi_mod]
Feb 16 13:09:50 cowberry kernel: [c01ce37c] device_release+0x30/0x64
Feb 16 13:09:50 cowberry kernel: [c01503e8] kobject_cleanup+0xc0/0xc4
Feb 16 13:09:50 cowberry kernel: [c01514e0] kref_put+0x60/0x70
Feb 16 13:09:50 cowberry kernel: [c0150318] kobject_put+0x24/0x34
Feb 16 13:09:50 cowberry kernel: [c01ce644] put_device+0x1c/0x2c
Feb 16 13:09:50 cowberry kernel: [cdcd8624] scsi_host_put+0x14/0x24 [scsi_mod]
Feb 16 13:09:50 cowberry kernel: [cdd49384] usb_stor_release_resources+0xf4/0x144 [usb_storage]
Feb 16 13:09:50 cowberry kernel: [cdd49480] storage_disconnect+0xac/0x110 [usb_storage]
Feb 16 13:09:50 cowberry kernel: [c021add0] usb_unbind_interface+0x94/0xd4
Feb 16 13:09:50 cowberry kernel: [c01cfdbc] device_release_driver+0x98/0x9c
Feb 16 13:09:50 cowberry kernel: [c01cffb4] bus_remove_device+0xc0/0x12c
Feb 16 13:09:50 cowberry kernel: [c01ce6f8] device_del+0xa4/0x114
Feb 16 13:09:50 cowberry udev[6265]: removing device node '/dev/sdb1'
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-02-14 17:07 ` Alan Stern
2005-02-16 13:12 ` Olaf Hering
@ 2005-02-17 18:39 ` Olaf Hering
2005-02-17 19:55 ` Alan Stern
1 sibling, 1 reply; 12+ messages in thread
From: Olaf Hering @ 2005-02-17 18:39 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-scsi, linux-usb-devel
On Mon, Feb 14, Alan Stern wrote:
> https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-November/001201.html
Alan,
this patch seems to fix the crashes. Is it ready for production use, or
should I wait for a differnt patch?
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-02-17 18:39 ` Olaf Hering
@ 2005-02-17 19:55 ` Alan Stern
2005-02-17 20:02 ` Olaf Hering
2005-03-02 14:34 ` [linux-usb-devel] " Olaf Hering
0 siblings, 2 replies; 12+ messages in thread
From: Alan Stern @ 2005-02-17 19:55 UTC (permalink / raw)
To: Olaf Hering; +Cc: linux-scsi, linux-usb-devel
On Thu, 17 Feb 2005, Olaf Hering wrote:
> On Mon, Feb 14, Alan Stern wrote:
>
> > https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-November/001201.html
>
> Alan,
>
> this patch seems to fix the crashes. Is it ready for production use, or
> should I wait for a differnt patch?
It hasn't been tested very much. (Would you like to be a beta tester? :-)
Right now I'm in the middle of cleaning it up and submitting it to Matt
Dharm for official inclusion.
Alan Stern
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-02-17 19:55 ` Alan Stern
@ 2005-02-17 20:02 ` Olaf Hering
2005-03-02 14:34 ` [linux-usb-devel] " Olaf Hering
1 sibling, 0 replies; 12+ messages in thread
From: Olaf Hering @ 2005-02-17 20:02 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-scsi, linux-usb-devel
On Thu, Feb 17, Alan Stern wrote:
> It hasn't been tested very much. (Would you like to be a beta tester? :-)
Lets just throw it at the customers.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-02-17 19:55 ` Alan Stern
2005-02-17 20:02 ` Olaf Hering
@ 2005-03-02 14:34 ` Olaf Hering
2005-03-02 22:20 ` Alan Stern
1 sibling, 1 reply; 12+ messages in thread
From: Olaf Hering @ 2005-03-02 14:34 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-scsi, linux-usb-devel
On Thu, Feb 17, Alan Stern wrote:
> On Thu, 17 Feb 2005, Olaf Hering wrote:
>
> > On Mon, Feb 14, Alan Stern wrote:
> >
> > > https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-November/001201.html
> >
> > Alan,
> >
> > this patch seems to fix the crashes. Is it ready for production use, or
> > should I wait for a differnt patch?
>
> It hasn't been tested very much. (Would you like to be a beta tester? :-)
> Right now I'm in the middle of cleaning it up and submitting it to Matt
> Dharm for official inclusion.
When a device is plugged in, rmmod sd_mod fails, does that work for you?
sda is already unregistered, but rmmod is stuck like that:
rmmod D 000F4240 0 11501 11114 (NOTLB)
d7a03f1c 00000086 db8b95a0 000f4240 00000000 0001e848 a4c98fc0 000f4236
c03b58c8 df666560 df6666b4 e0dbc36c df666560 00000246 e0dbc374 c02cfcbe
00000001 df666560 c01171a0 e0dbc374 e0dbc374 c0165981 e0dbc37c e0dfdd40
Call Trace:
[<c02cfcbe>] __down+0x6e/0xd0
[<c01171a0>] default_wake_function+0x0/0x10
[<c0165981>] dput+0x21/0x180
[<c02cfe23>] __down_failed+0x7/0xc
[<c01d0430>] kobject_release+0x0/0x10
[<c02354e0>] .text.lock.driver+0x8/0x18
[<e0dba25d>] exit_sd+0x1d/0x46 [sd_mod]
[<c012ccf4>] sys_delete_module+0x154/0x170
[<c0151397>] vfs_write+0xa7/0x110
[<c01514ac>] sys_write+0x3c/0x70
[<c0102c49>] sysenter_past_esp+0x52/0x79
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-03-02 14:34 ` [linux-usb-devel] " Olaf Hering
@ 2005-03-02 22:20 ` Alan Stern
2005-03-03 12:32 ` [linux-usb-devel] " Olaf Hering
0 siblings, 1 reply; 12+ messages in thread
From: Alan Stern @ 2005-03-02 22:20 UTC (permalink / raw)
To: Olaf Hering; +Cc: linux-scsi, linux-usb-devel
On Wed, 2 Mar 2005, Olaf Hering wrote:
> When a device is plugged in, rmmod sd_mod fails, does that work for you?
> sda is already unregistered, but rmmod is stuck like that:
>
> rmmod D 000F4240 0 11501 11114 (NOTLB)
> d7a03f1c 00000086 db8b95a0 000f4240 00000000 0001e848 a4c98fc0 000f4236
> c03b58c8 df666560 df6666b4 e0dbc36c df666560 00000246 e0dbc374 c02cfcbe
> 00000001 df666560 c01171a0 e0dbc374 e0dbc374 c0165981 e0dbc37c e0dfdd40
> Call Trace:
> [<c02cfcbe>] __down+0x6e/0xd0
> [<c01171a0>] default_wake_function+0x0/0x10
> [<c0165981>] dput+0x21/0x180
> [<c02cfe23>] __down_failed+0x7/0xc
> [<c01d0430>] kobject_release+0x0/0x10
> [<c02354e0>] .text.lock.driver+0x8/0x18
> [<e0dba25d>] exit_sd+0x1d/0x46 [sd_mod]
> [<c012ccf4>] sys_delete_module+0x154/0x170
> [<c0151397>] vfs_write+0xa7/0x110
> [<c01514ac>] sys_write+0x3c/0x70
> [<c0102c49>] sysenter_past_esp+0x52/0x79
This is a known bug in the way the SCSI midlayer interacts with the driver
model core. It's not related to usb-storage or the patch you've been
trying out. You can unblock the rmmod process by unplugging the device.
Alan Stern
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-03-02 22:20 ` Alan Stern
@ 2005-03-03 12:32 ` Olaf Hering
0 siblings, 0 replies; 12+ messages in thread
From: Olaf Hering @ 2005-03-03 12:32 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-scsi, linux-usb-devel
On Wed, Mar 02, Alan Stern wrote:
> This is a known bug in the way the SCSI midlayer interacts with the driver
> model core. It's not related to usb-storage or the patch you've been
> trying out. You can unblock the rmmod process by unplugging the device.
you are right, happens also with the vanilla kernel.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
2005-02-10 15:07 ` [linux-usb-devel] " Alan Stern
2005-02-14 7:20 ` Olaf Hering
@ 2005-02-15 5:41 ` Mike Anderson
1 sibling, 0 replies; 12+ messages in thread
From: Mike Anderson @ 2005-02-15 5:41 UTC (permalink / raw)
To: Alan Stern; +Cc: Olaf Hering, linux-usb-devel, linux-scsi, Michael Christie
Alan Stern [stern@rowland.harvard.edu] wrote:
> And Mike Anderson's response was
>
> http://marc.theaimsgroup.com/?l=linux-scsi&m=110538854224319&w=2
>
> His explanation was "Currently scsi_host_cancel being called from
> scsi_remove_host appears to not do anything as scsi_forget_host removes
> the devices from the list it iterates over." I don't know whether this
> problem has been fixed yet.
>
No, this has not been fixed yet, but needs to be.
In discussing this with Mike C today he had a patch that would drain the
devices queues prior to scsi_forget_host returning which may help in this
case.
Along with Mike C's change we could remove the scsi_host_cancel code
(since it does not do anything and when it did it was racey), and shutdown
the error handler thread in scsi_remove_host (reduce possible callers into
the LLDD post scsi_remove_host).
Mike C or I will have something out soon on this.
-andmike
--
Michael Anderson
andmike@us.ibm.com
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-03-03 12:32 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-10 10:56 2.6.11-rc3-bk5, oops in scsi_try_bus_reset Olaf Hering
2005-02-10 15:07 ` [linux-usb-devel] " Alan Stern
2005-02-14 7:20 ` Olaf Hering
2005-02-14 17:07 ` Alan Stern
2005-02-16 13:12 ` Olaf Hering
2005-02-17 18:39 ` Olaf Hering
2005-02-17 19:55 ` Alan Stern
2005-02-17 20:02 ` Olaf Hering
2005-03-02 14:34 ` [linux-usb-devel] " Olaf Hering
2005-03-02 22:20 ` Alan Stern
2005-03-03 12:32 ` [linux-usb-devel] " Olaf Hering
2005-02-15 5:41 ` Mike Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox