Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2347 closed bug (fixed)

usb_hid causes panic on boot

Reported by: anevilyak Owned by: mmlr
Priority: blocker Milestone: R1
Component: Drivers/USB Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

When booting, usb_hid fails with the following panic:

PANIC: _mutex_lock(): using unitialized lock 0x947e52f8 Welcome to Kernel Debugging Land... Running on CPU 0 kdebug> bt stack trace for thread 112 "AddOnMonitor"

kernel stack: 0x94749000 to 0x9474d000

user stack: 0x700c3000 to 0x70103000

frame caller <image>:function + offset 9474c5b4 (+ 48) 8004ba2d <kernel>:invoke_debugger_command + 0x00ed 9474c5e4 (+ 64) 8004b825 <kernel>:invoke_pipe_segmentFP21debugger_command_pipelPc + 0x0079 9474c624 (+ 64) 8004bb6d <kernel>:invoke_debugger_command_pipe + 0x009d 9474c664 (+ 48) 8004ca48 <kernel>:_ParseCommandPipe16ExpressionParserRi + 0x0234 9474c694 (+ 48) 8004c3fe <kernel>:EvaluateCommand16ExpressionParserPCcRi + 0x01de 9474c6c4 (+ 224) 8004de14 <kernel>:evaluate_debug_command + 0x0088 9474c7a4 (+ 64) 8004a03e <kernel>:kernel_debugger_loopFv + 0x017a 9474c7e4 (+ 48) 8004aa6f <kernel>:kernel_debugger + 0x0117 9474c814 (+ 192) 8004a94d <kernel>:panic + 0x0029 9474c8d4 (+ 64) 80031dbc <kernel>:_mutex_lock + 0x00e0 9474c914 (+ 64) 947e1c06 </boot/beos/system/add-ons/kernel/drivers/dev/input/usb_hid>:usb_hid_device_added + 0x012e 9474c954 (+ 80) 806490cf </boot/beos/system/add-ons/kernel/bus_managers/usb>:ReportDevice6DeviceP22usb_support_descriptorUlPC16usb_notify_hooksPP17usb_driver_cookiebT5 + 0x02af 9474c9a4 (+ 64) 80669e60 </boot/beos/system/add-ons/kernel/busses/usb/ohci>:ReportDevice3HubP22usb_support_descriptorUlPC16usb_notify_hooksPP17usb_driver_cookiebT5 + 0x0094 9474c9e4 (+ 64) 80647de9 </boot/beos/system/add-ons/kernel/bus_managers/usb>:InstallNotify5StackPCcPC16usb_notify_hooks + 0x00b5 9474ca24 (+ 48) 80646750 </boot/beos/system/add-ons/kernel/bus_managers/usb>:install_notifyFPCcPC16usb_notify_hooks + 0x002c 9474ca54 (+ 64) 947e203a </boot/beos/system/add-ons/kernel/drivers/dev/input/usb_hid>:init_driver + 0x0092 9474ca94 (+ 48) 80059f61 <kernel>:load_driverFP13legacy_driver + 0x0139 9474cac4 (+ 128) 8005a3d5 <kernel>:add_driverFPCcl + 0x01e9 9474cb44 (+ 32) 8005bfa4 <kernel>:legacy_driver_add + 0x0014 9474cb64 (+ 48) 8005b688 <kernel>:try_driversFRt16DoublyLinkedList2Z12driver_entryZt31DoublyLinkedListStandardGetLink1Z12driver_entry + 0x00a4 9474cb94 (+ 192) 8005bad7 <kernel>:probe_for_driversFPCc + 0x03ff 9474cc54 (+ 144) 8005c452 <kernel>:legacy_driver_probe + 0x0172 9474cce4 (+ 96) 80056345 <kernel>:scan_for_driversFP11devfs_vnode + 0x0085 9474cd44 (+ 64) 800572d9 <kernel>:devfs_lookupFP9fs_volumeP8fs_vnodePCcPx + 0x0061 9474cd84 (+ 48) 80077f65 <kernel>:lookup_dir_entryFP5vnodePCcPP5vnode + 0x0025 9474cdb4 (+ 80) 8007811c <kernel>:vnode_path_to_vnodeFP5vnodePcbiP10io_contextPP5vnodePx + 0x0144 9474ce04 (+ 48) 800783b9 <kernel>:vnode_path_to_vnodeFP5vnodePcbiT2PP5vnodePx + 0x0049 9474ce34 (+ 64) 800784b4 <kernel>:path_to_vnodeFPcbPP5vnodePxT1 + 0x00f4 9474ce74 (+ 64) 80078c68 <kernel>:fd_and_path_to_vnodeFiPcbPP5vnodePxT2 + 0x0064 9474ceb4 (+ 80) 8007c3d8 <kernel>:file_openFiPcib + 0x0044 9474cf04 (+ 64) 8008161d <kernel>:_user_open + 0x00a1 9474cf44 (+ 100) 800a4492 <kernel>:pre_syscall_debug_done + 0x0002 (nearest) iframe at 0x9474cfa8 (end = 0x9474d000)

eax 0x58 ebx 0x456be0 ecx 0x70102a40 edx 0xffff0104 esi 0x70102b28 edi 0x0 ebp 0x70102a6c esp 0x9474cfdc eip 0xffff0104 eflags 0x206 vector: 0x63, error code: 0x0

9474cfa8 (+ 0) ffff0104 70102a6c (+ 48) 0039532a <libbe.so>:SetTo10BDirectoryPCc + 0x002a 70102a9c (+ 48) 00394f71 <libbe.so>:10BDirectoryPCc + 0x0055 70102acc (+ 224) 005c86a7 <keyboard>:_RecursiveScan19KeyboardInputDevicePCc + 0x0037 70102bac (+ 48) 005c7533 <keyboard>:InitCheck19KeyboardInputDevice + 0x0037 70102bdc (+ 112) 00217742 <_APP_>:RegisterAddOn12AddOnManagerR6BEntry + 0x011e 70102c4c (+ 128) 0021ac85 <_APP_>:AddOnEnabledQ212AddOnManager25InputServerMonitorHandlerPCQ38BPrivate7Storage17add_on_entry_info + 0x0069 70102ccc (+ 528) 00221134 <_APP_>:HandlePulseQ38BPrivate7Storage19AddOnMonitorHandler + 0x0520 70102edc (+ 48) 0021f058 <_APP_>:MessageReceivedQ38BPrivate7Storage19AddOnMonitorHandlerP8BMessage + 0x002c 70102f0c (+ 48) 002d8b0f <libbe.so>:DispatchMessage7BLooperP8BMessageP8BHandler + 0x005b 70102f3c (+ 64) 002da47d <libbe.so>:task_looper7BLooper + 0x0211 70102f7c (+ 48) 002da06b <libbe.so>:_task0_7BLooperPv + 0x003f 70102fac (+ 48) 004cd770 <libroot.so>:_get_next_team_info + 0x005c (nearest) 70102fdc (+ 0) 70102fec 3542:AddOnMonitor_112_stack@0x700c3000 + 0x3ffec kdebug>

Change History (3)

comment:1 by anevilyak, 11 years ago

Forgot to mention, the only device on the USB bus is a logitech wireless kb/mouse hub with a mouse using it.

comment:2 by mmlr, 11 years ago

Resolution: fixed
Status: newclosed

Well that's not so surprising as the one (re-)writing that driver blatantly ignored to initialize the mutex before using it... Fixed in hrev25830.

comment:3 by anevilyak, 11 years ago

That was quick, thanks! :)

Note: See TracTickets for help on using tickets.