#1167 closed bug (fixed)
USB stack built for BONE crashes in UHCI finish thread
Reported by: | jonas.kirilla | Owned by: | mmlr |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Drivers/USB | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
Feedback as per requested in the last paragraph: http://haiku-os.org/blog/mmlr/2007-04-20/using_the_haiku_usb_stack
" Problems in uhci finish thread : segment violation address: 0x80233070, op: 1 pc: 0x00175563, tmid: 2 thid: 10 kernel debugger: Welcome to Kernel Debugging Land...
eax 00000000 ebp 0122c944 cs 0008 | area 004b3768 (kernel_intel_text) ebx 00000040 esp 0122c8f8 ss 0010 | addr 00100000 size 00086000 ecx 00000040 edi 300f6600 ds 0010 | edx 00000000 esi 80233070 es 0010 | Thread: uhci finish thread eip 00175563 flag 00010246 fs 0000 | Team: kernel_team
trap 0000000e err 00000000 gs 0000 | Stack Trace follows:
00000000 00175563 memcpy_pIII+0047 0122c944 0021a012 CreateFilledTransfer4UHCIP8TransferPP7uhci_tdPP7uhci_qh+00aa 0122c984 002196ef FinishTransfers4UHCI+0387 0122c9e4 0021935f FinishThread4UHCIPv+001f "
This is on R5/Bone, at the very start of copying a 233MB file from /boot to a USB flash drive. I can't try the same thing in Haiku as the umass (usb_scsi) driver hasn't been adapted to Haiku, IIRC.
The CPU is a P4/Celeron, the motherboard is an Asus P4-XP (IIRC) with the intel 845 chipset. The only other USB device connected, that I know of, is a USB mouse by Microsoft.
I can read from the USB flash media without problems, but writing to it KDLs. I get the feeling that creating folders and small files is less likely to crash than is creating large files.
The media is in FAT format.
The full syslog will be uploaded shortly.
A thought: memcpy_pIII, P4-class CPU? Another one: Is too much memory allocated by the USB driver for the transfer?
Attachments (1)
Change History (11)
by , 18 years ago
Attachment: | Bone USB KDL syslog.txt added |
---|
comment:1 by , 18 years ago
Status: | new → assigned |
---|
Replying to jonas.kirilla:
A thought: memcpy_pIII, P4-class CPU?
There weren't really P4 CPUs when the optimized memcpy routines were written I suppose. It's normal to get memcpy_pIII and it shouldn't be a problem. The error indicates that the the UHCI module tried to read or write to unallocated memory.
Another one: Is too much memory allocated by the USB driver for the transfer?
There can't really be too much memory allocated for a transfer as the USB stack has it's own memory allocator with only a few hundred kilobytes available. If too much memory was allocated you would get output in the syslog stating that the allocator ran out of memory.
It seems that you only have USB 1.1 controllers there or the device used is USB 1.1 only as the UHCI module is used at all. Can you provide some info about the device you used (using usb_dev_info from Haiku or USBDeskbarView/USBCommander)?
comment:2 by , 18 years ago
This is what USBDeskbarView says on R5/Bone (+native USB stack)
Product : USB Mass Storage Device Manufacturer : SerialNumber : c2d276643ea124 Class : 0 Subclass : 0 Protocol : 0 VendorID : 4719 ProductID : 353 Version : 256 + Configuration : 0 + Interface : 0 Class : 8 (Mass storage) SubClass : 6 (?) Protocol : 80 (?) + EndPoint : 0 MaxPacketSize= 64 Interval= 1 Bulk Direction= Output + EndPoint : 1 MaxPacketSize= 64 Interval= 1 Bulk Direction= Input + EndPoint : 2 MaxPacketSize= 64 Interval= 8 Interrupt Direction= Input
comment:3 by , 18 years ago
usb_dev_info in Haiku:
[Device] Class .................. 0 Subclass ............... 0 Protocol ............... 0 Max Endpoint 0 Packet .. 64 USB Version ............ 0x0200 Vendor ID .............. 0x126f Product ID ............. 0x0161 Product Version ........ 0x0100 Manufacturer String .... "" Product String ......... "USB Mass Storage Device" Serial Number .......... "c2d276643ea124" [Configuration 0] Configuration String . "" [Interface 0] Class .............. 8 Subclass ........... 6 Protocol ........... 80 Interface String ... "" [Endpoint 0] MaxPacketSize .... 64 Interval ......... 1 Type ............. Bulk Direction ........ Output [Endpoint 1] MaxPacketSize .... 64 Interval ......... 1 Type ............. Bulk Direction ........ Input [Endpoint 2] MaxPacketSize .... 64 Interval ......... 8 Type ............. Interrupt Direction ........ Input
comment:4 by , 18 years ago
Haiku listdev:
device Bridge (Host bridge) [6|0|0] vendor 8086: Intel Corporation device 1a30: 82845 845 (Brookdale) Chipset Host Bridge device Bridge (PCI bridge, Normal decode) [6|4|0] vendor 8086: Intel Corporation device 1a31: 82845 845 (Brookdale) Chipset AGP Bridge device Display controller (VGA compatible controller, VGA) [3|0|0] vendor 10de: nVidia Corporation device 0326: NV34 [GeForce FX 5500] device Bridge (PCI bridge, Normal decode) [6|4|0] vendor 8086: Intel Corporation device 244e: 82801 PCI Bridge device Serial bus controller (USB Controller, UHCI) [c|3|0] vendor 1106: VIA Technologies, Inc. device 3038: VT82xxxxx UHCI USB 1.1 Controller device Serial bus controller (USB Controller, UHCI) [c|3|0] vendor 1106: VIA Technologies, Inc. device 3038: VT82xxxxx UHCI USB 1.1 Controller device Serial bus controller (USB Controller, EHCI) [c|3|20] vendor 1106: VIA Technologies, Inc. device 3104: USB 2.0 device Multimedia controller (Multimedia audio controller) [4|1|0] vendor 1102: Creative Labs device 0002: SB Live! EMU10k1 device Input device controller [9|80|0] vendor 1102: Creative Labs device 7002: SB Live! Game Port device Network controller (Ethernet controller) [2|0|0] vendor 10ec: Realtek Semiconductor Co., Ltd. device 8139: RTL-8139/8139C/8139C+ device Communication controller (Serial controller, 16550) [7|0|2] vendor 14d2: Titan Electronics Inc device 8020: VScom 200L 1 port serial adaptor device Bridge (ISA bridge) [6|1|0] vendor 8086: Intel Corporation device 2440: 82801BA ISA Bridge (LPC) device Mass storage controller (IDE interface) [1|1|80] vendor 8086: Intel Corporation device 244b: 82801BA IDE U100 device [0|0] vendor ST312002 model 6A type Direct Access device [0|0] vendor _NEC model DVD_RW ND-3520A type CDROM device Serial bus controller (USB Controller, UHCI) [c|3|0] vendor 8086: Intel Corporation device 2442: 82801BA/BAM USB (Hub #1) device Serial bus controller (USB Controller, UHCI) [c|3|0] vendor 8086: Intel Corporation device 2444: 82801BA/BAM USB (Hub #2) device Multimedia controller (Multimedia audio controller) [4|1|0] vendor 8086: Intel Corporation device 2445: 82801BA/BAM AC'97 Audio
comment:5 by , 18 years ago
R5/Bone listdev:
ISA bus, device #0: Communication Device (Serial) [7|0|2] Current configuration: irq [4] io range: min 3f8 max 3f8 align 0 len 8 4 configurations Possible configuration #0: irq [4] io range: min 3f8 max 3f8 align 0 len 8 Possible configuration #1: irq [3] io range: min 2f8 max 2f8 align 0 len 8 Possible configuration #2: irq [4] io range: min 3e8 max 3e8 align 0 len 8 Possible configuration #3: irq [10] io range: min 2e8 max 2e8 align 0 len 8 Bus-dependent information: CSN 0 LDN 0 ISA bus, device #1: Mass Storage Controller (Floppy) [1|2|0] Current configuration: irq [6] dma [2] io range: min 3f2 max 3f2 align 0 len 4 1 configurations Possible configuration #0: irq [6] dma [2] io range: min 3f2 max 3f2 align 0 len 4 Bus-dependent information: CSN 5 LDN 0 ISA bus, device #2: Memory Controller (RAM) [5|0|0] Current configuration: mem range: min 0 max 0 align 0 len a0000 mem range: min 100000 max 100000 align 0 len 1ff00000 mem range: min e8000 max e8000 align 0 len 8000 mem range: min f0000 max f0000 align 0 len 4000 mem range: min f4000 max f4000 align 0 len 4000 mem range: min f8000 max f8000 align 0 len 8000 mem range: min cf400 max cf400 align 0 len c00 mem range: min fff80000 max fff80000 align 0 len 80000 1 configurations Possible configuration #0: mem range: min 0 max 0 align 0 len a0000 mem range: min 100000 max 100000 align 0 len 1ff00000 mem range: min e8000 max e8000 align 0 len 8000 mem range: min f0000 max f0000 align 0 len 4000 mem range: min f4000 max f4000 align 0 len 4000 mem range: min f8000 max f8000 align 0 len 8000 mem range: min cf400 max cf400 align 0 len c00 mem range: min fff80000 max fff80000 align 0 len 80000 Bus-dependent information: CSN 9 LDN 0 ISA bus, device #3: Generic System Peripheral (PIC) [8|0|1] Current configuration: irq [2] io range: min 20 max 20 align 0 len 2 io range: min a0 max a0 align 0 len 2 io range: min 4d0 max 4d0 align 0 len 2 1 configurations Possible configuration #0: irq [2] io range: min 20 max 20 align 0 len 2 io range: min a0 max a0 align 0 len 2 io range: min 4d0 max 4d0 align 0 len 2 Bus-dependent information: CSN a LDN 0 ISA bus, device #4: Generic System Peripheral (Timer) [8|2|1] Current configuration: irq [0] io range: min 40 max 40 align 0 len 4 1 configurations Possible configuration #0: irq [0] io range: min 40 max 40 align 0 len 4 Bus-dependent information: CSN b LDN 0 ISA bus, device #5: Generic System Peripheral (RTC) [8|3|1] Current configuration: irq [8] io range: min 70 max 70 align 0 len 2 1 configurations Possible configuration #0: irq [8] io range: min 70 max 70 align 0 len 2 Bus-dependent information: CSN c LDN 0 ISA bus, device #6: Input Device (Keyboard) [9|0|0] Current configuration: irq [1] io range: min 60 max 60 align 0 len 1 io range: min 64 max 64 align 0 len 1 1 configurations Possible configuration #0: irq [1] io range: min 60 max 60 align 0 len 1 io range: min 64 max 64 align 0 len 1 Bus-dependent information: CSN d LDN 0 ISA bus, device #7: CPU (486) [b|1|0] Current configuration: irq [13] io range: min f0 max f0 align 0 len 1 1 configurations Possible configuration #0: irq [13] io range: min f0 max f0 align 0 len 1 Bus-dependent information: CSN e LDN 0 ISA bus, device #8: Generic System Peripheral (DMA) [8|1|1] Current configuration: dma [4] io range: min 0 max 0 align 0 len 10 io range: min 80 max 80 align 0 len 11 io range: min 94 max 94 align 0 len c io range: min c0 max c0 align 0 len 1f 1 configurations Possible configuration #0: dma [4] io range: min 0 max 0 align 0 len 10 io range: min 80 max 80 align 0 len 11 io range: min 94 max 94 align 0 len c io range: min c0 max c0 align 0 len 1f Bus-dependent information: CSN f LDN 0 ISA bus, device #9: Generic System Peripheral (Other) [8|80|0] Current configuration: io range: min 61 max 61 align 1 len 1 1 configurations Possible configuration #0: io range: min 61 max 61 align 1 len 1 Bus-dependent information: CSN 10 LDN 0 ISA bus, device #10: Bridge Device (PCI-PCI) [6|4|0] Current configuration: io range: min cf8 max cf8 align 0 len 8 1 configurations Possible configuration #0: io range: min cf8 max cf8 align 0 len 8 Bus-dependent information: CSN 11 LDN 0 ISA bus, device #11: Generic System Peripheral (Other) [8|80|ff] Current configuration: io range: min 290 max 290 align 0 len 8 io range: min 3f0 max 3f0 align 0 len 2 io range: min e400 max e400 align 0 len 80 io range: min ec00 max ec00 align 0 len 40 1 configurations Possible configuration #0: io range: min 290 max 290 align 0 len 8 io range: min 3f0 max 3f0 align 0 len 2 io range: min e400 max e400 align 0 len 80 io range: min ec00 max ec00 align 0 len 40 Bus-dependent information: CSN 12 LDN 0 PCI bus, device #0: Bridge Device (Host) [6|0|0] Current configuration: mem range: min f8000000 max f8000000 align 0 len 4000000 1 configurations Possible configuration #0: mem range: min f8000000 max f8000000 align 0 len 4000000 Bus-dependent information: vendor id: 8086, device id: 1a30 PCI bus, device #1: Bridge Device (PCI-PCI) [6|4|0] Current configuration: 1 configurations Possible configuration #0: Bus-dependent information: vendor id: 8086, device id: 1a31 PCI bus, device #2: Display Controller (VGA/8514) [3|0|0] Current configuration: irq [11] mem range: min ee000000 max ee000000 align 0 len 1000000 mem range: min f0000000 max f0000000 align 0 len 8000000 1 configurations Possible configuration #0: irq [11] mem range: min ee000000 max ee000000 align 0 len 1000000 mem range: min f0000000 max f0000000 align 0 len 8000000 Bus-dependent information: vendor id: 10de, device id: 326 PCI bus, device #3: Bridge Device (PCI-PCI) [6|4|0] Current configuration: 1 configurations Possible configuration #0: Bus-dependent information: vendor id: 8086, device id: 244e PCI bus, device #4: Serial Bus Controller (USB) [c|3|0] Current configuration: irq [10] io range: min d800 max d800 align 0 len 20 1 configurations Possible configuration #0: irq [10] io range: min d800 max d800 align 0 len 20 Bus-dependent information: vendor id: 1106, device id: 3038 PCI bus, device #5: Serial Bus Controller (USB) [c|3|0] Current configuration: irq [12] io range: min d400 max d400 align 0 len 20 1 configurations Possible configuration #0: irq [12] io range: min d400 max d400 align 0 len 20 Bus-dependent information: vendor id: 1106, device id: 3038 PCI bus, device #6: Serial Bus Controller (USB) [c|3|20] Current configuration: irq [3] mem range: min ed800000 max ed800000 align 0 len 100 1 configurations Possible configuration #0: irq [3] mem range: min ed800000 max ed800000 align 0 len 100 Bus-dependent information: vendor id: 1106, device id: 3104 PCI bus, device #7: Multimedia Device (Audio) [4|1|0] Current configuration: irq [9] io range: min d000 max d000 align 0 len 20 1 configurations Possible configuration #0: irq [9] io range: min d000 max d000 align 0 len 20 Bus-dependent information: vendor id: 1102, device id: 2 PCI bus, device #8: Input Device (Other) [9|80|0] Current configuration: io range: min b800 max b800 align 0 len 8 1 configurations Possible configuration #0: io range: min b800 max b800 align 0 len 8 Bus-dependent information: vendor id: 1102, device id: 7002 PCI bus, device #9: NIC (Ethernet) [2|0|0] Current configuration: irq [7] io range: min b400 max b400 align 0 len 100 mem range: min ed000000 max ed000000 align 0 len 100 1 configurations Possible configuration #0: irq [7] io range: min b400 max b400 align 0 len 100 mem range: min ed000000 max ed000000 align 0 len 100 Bus-dependent information: vendor id: 10ec, device id: 8139 PCI bus, device #10: Communication Device (Serial) [7|0|2] Current configuration: irq [5] io range: min b000 max b000 align 0 len 8 io range: min a800 max a800 align 0 len 8 io range: min a400 max a400 align 0 len 8 io range: min a000 max a000 align 0 len 8 mem range: min ec800000 max ec800000 align 0 len 40 1 configurations Possible configuration #0: irq [5] io range: min b000 max b000 align 0 len 8 io range: min a800 max a800 align 0 len 8 io range: min a400 max a400 align 0 len 8 io range: min a000 max a000 align 0 len 8 mem range: min ec800000 max ec800000 align 0 len 40 Bus-dependent information: vendor id: 14d2, device id: 8020 PCI bus, device #11: Bridge Device (ISA) [6|1|0] Current configuration: 1 configurations Possible configuration #0: Bus-dependent information: vendor id: 8086, device id: 2440 PCI bus, device #12: Mass Storage Controller (IDE) [1|1|80] Current configuration: irqs [14][15] io range: min 1f0 max 1f0 align 0 len 8 io range: min 3f4 max 3f4 align 0 len 4 io range: min 170 max 170 align 0 len 8 io range: min 374 max 374 align 0 len 4 io range: min 9800 max 9800 align 0 len 10 1 configurations Possible configuration #0: irqs [14][15] io range: min 1f0 max 1f0 align 0 len 8 io range: min 3f4 max 3f4 align 0 len 4 io range: min 170 max 170 align 0 len 8 io range: min 374 max 374 align 0 len 4 io range: min 9800 max 9800 align 0 len 10 Bus-dependent information: vendor id: 8086, device id: 244b PCI bus, device #13: Serial Bus Controller (USB) [c|3|0] Current configuration: irq [3] io range: min 9400 max 9400 align 0 len 20 1 configurations Possible configuration #0: irq [3] io range: min 9400 max 9400 align 0 len 20 Bus-dependent information: vendor id: 8086, device id: 2442 PCI bus, device #14: Serial Bus Controller (USB) [c|3|0] Current configuration: irq [9] io range: min 9000 max 9000 align 0 len 20 1 configurations Possible configuration #0: irq [9] io range: min 9000 max 9000 align 0 len 20 Bus-dependent information: vendor id: 8086, device id: 2444 PCI bus, device #15: Multimedia Device (Audio) [4|1|0] Current configuration: irq [10] io range: min 8800 max 8800 align 0 len 100 io range: min 8400 max 8400 align 0 len 40 1 configurations Possible configuration #0: irq [10] io range: min 8800 max 8800 align 0 len 100 io range: min 8400 max 8400 align 0 len 40 Bus-dependent information: vendor id: 8086, device id: 2445
comment:6 by , 18 years ago
As I see you have an EHCI controller in that system. Any reason why you do not use the USB 2.0 interface (EHCI) with that device. Or did you intentionally test on USB 1.1 only ports?
comment:7 by , 18 years ago
I didn't know I had USB 2.0 ports, and I didn't think about EHCI = USB2.0. I just picked one.
Anyway, this is what EHCI looks like:
Problems in ehci finish thread : segment violation address: 0x8024e610, op: 1 pc: 0x00175563, tmid: 2 thid: 6 kernel debugger: Welcome to Kernel Debugging Land... eax 00000000 ebp 0121af84 cs 0008 | area 004b3768 (kernel_intel_text) ebx 00001000 esp 0121af38 ss 0010 | addr 00100000 size 00086000 ecx 00001000 edi 300ff000 ds 0010 | edx 00003000 esi 8024e610 es 0010 | Thread: ehci finish thread eip 00175563 flag 00010206 fs 0000 | Team: kernel_team trap 0000000e err 00000000 gs 0000 | Stack Trace follows: 00000000 00175563 memcpy_pIII+0047 0121af84 0020c347 FillQueueWithData__4EHCIP8TransferP7ehci_qhPP8ehci_qtdPb+008f 0121afc4 0020bd09 FinishTransfers__4EHCI+03e1 0121b044 0020b91f FinishThread__4EHCIPv+001f
comment:8 by , 18 years ago
I have the same problem with the EHCI driver when i drag and drop a 30 Mo file on a mass storage device (same call stack as above). It occurs less often when copying small files.
Here is my devices list :
device Bridge (Host bridge) [6|0|0] vendor 10de: nVidia Corporation device 00d1: nForce3 Host Bridge device Bridge (ISA bridge) [6|1|0] vendor 10de: nVidia Corporation device 00d0: nForce3 LPC Bridge device Serial bus controller (SMBus) [c|5|0] vendor 10de: nVidia Corporation device 00d4: nForce3 SMBus device Serial bus controller (USB Controller, OHCI) [c|3|10] vendor 10de: nVidia Corporation device 00d7: nForce3 USB 1.1 device Serial bus controller (USB Controller, OHCI) [c|3|10] vendor 10de: nVidia Corporation device 00d7: nForce3 USB 1.1 device Serial bus controller (USB Controller, EHCI) [c|3|20] vendor 10de: nVidia Corporation device 00d8: nForce3 USB 2.0 device Multimedia controller (Multimedia audio controller) [4|1|0] vendor 10de: nVidia Corporation device 00da: nForce3 Audio device Communication controller (Modem, Generic) [7|3|0] vendor 10de: nVidia Corporation device 00d9: nForce3 Audio device Mass storage controller (IDE interface) [1|1|8a] vendor 10de: nVidia Corporation device 00d5: nForce3 IDE device [0|0] vendor IC25N080 model ATMR04-0 type Direct Access device [0|0] vendor MATSHITA model DVD-RAM UJ-820S type CDROM device Bridge (PCI bridge, Normal decode) [6|4|0] vendor 10de: nVidia Corporation device 00dd: nForce3 PCI Bridge device Network controller (Ethernet controller) [2|0|0] vendor 14e4: Broadcom Corporation device 169c: NetXtreme BCM5788 Gigabit Ethernet device Bridge (CardBus bridge) [6|7|0] vendor 104c: Texas Instruments device ac44: PCI4510 PC card Cardbus Controller device Serial bus controller (FireWire (IEEE 1394), OHCI) [c|0|10] vendor 104c: Texas Instruments device 8029: PCI4510 IEEE-1394 Controller device Network controller [2|80|0] vendor 14e4: Broadcom Corporation device 4320: BCM4306 802.11b/g Wireless LAN Controller device Bridge (PCI bridge, Normal decode) [6|4|0] vendor 10de: nVidia Corporation device 00d2: nForce3 AGP Bridge device Display controller (VGA compatible controller, VGA) [3|0|0] vendor 10de: nVidia Corporation device 0348: NV36 [GeForce FX Go5700] device Bridge (Host bridge) [6|0|0] vendor 1022: Advanced Micro Devices [AMD] device 1100: K8 [Athlon64/Opteron] HyperTransport Technology Configuration device Bridge (Host bridge) [6|0|0] vendor 1022: Advanced Micro Devices [AMD] device 1101: K8 [Athlon64/Opteron] Address Map device Bridge (Host bridge) [6|0|0] vendor 1022: Advanced Micro Devices [AMD] device 1102: K8 [Athlon64/Opteron] DRAM Controller device Bridge (Host bridge) [6|0|0] vendor 1022: Advanced Micro Devices [AMD] device 1103: K8 [Athlon64/Opteron] Miscellaneous Control
follow-up: 10 comment:9 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in hrev21059.
Bone USB KDL syslog