Opened 16 years ago

Closed 16 years ago

#2610 closed bug (fixed)

USB mouse dies when input_server is restarted.

Reported by: bga Owned by: korli
Priority: normal Milestone: R1
Component: Servers/input_server Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Restarting the input_server results in my USB mouse not coming back to life. Maybe it is not being correctly reset?

Change History (10)

comment:1 by mmlr, 16 years ago

Do you have any debug output from that? Does it work to unplug and replug the mouse?

comment:2 by bga, 16 years ago

I tried it again with "input_server -q" and got a crash. Funny thiunk is that I was sent to the userland debugger but them it filled the entire screen just like if it was KDL. Anyway, here is what I got on syslog:

KERN: vm_soft_fault: va 0xe418a000 not covered by area in address space

KERN: vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0xe418a400, ip 0x3db602, write 0, user 1, thread 0x6c

KERN: vm_page_fault: thread "input_server" (108) in team "input_server" (108) tried to read address 0xe418a400, ip 0x3db602 ("???" +0x3db602)

KERN: debug_server: Thread 108 entered the debugger: Segment violation

KERN: stack trace, current PC 0x3db602 ItemAtC5BListl + 0x16:

KERN: (0x7ffeea1c) 0x21bc82 StopMonitoringDevice13DeviceManagerP14_BDeviceAddOn_PCc + 0xfe

KERN: (0x7ffeeadc) 0x2163b0 StopMonitoringDevice18BInputServerDevicePCc + 0x2c

KERN: (0x7ffeeb0c) 0x5d8529 _._16MouseInputDevice + 0x31

KERN: (0x7ffeeb3c) 0x218945 UnregisterAddOns12AddOnManager + 0x145

KERN: (0x7ffeebcc) 0x21768b SaveState12AddOnManager + 0x1f

KERN: (0x7ffeebfc) 0x211c79 QuitRequested11InputServer + 0x71

KERN: (0x7ffeec2c) 0x2dba80 _QuitRequested7BLooperP8BMessage + 0x30

KERN: (0x7ffeecac) 0x2da052 DispatchMessage7BLooperP8BMessageP8BHandler + 0x46

KERN: (0x7ffeecdc) 0x2d13bd DispatchMessage12BApplicationP8BMessageP8BHandler + 0x401

KERN: (0x7ffeeecc) 0x2db9d5 task_looper7BLooper + 0x211

KERN: (0x7ffeef0c) 0x2cfb2d Run12BApplication + 0x75

KERN: (0x7ffeef4c) 0x215c0e main + 0x6e

KERN: (0x7ffeef7c) 0x210837 _start + 0x5b

KERN: (0x7ffeefac) 0x1008ea (runtime_loader_seg0ro + 0x8ea)

comment:3 by bga, 16 years ago

Tried another time. This time without a crash. Nothing relevant on syslog (except for the message that the keyboard was found. Nothing about mouse).

Unplugging the mouse and plugging it again makes it start working.

comment:4 by axeld, 16 years ago

If a GUI server crashes, the console mode is used as a fallback (because if the input_server is missing, it can't be used for keyboard input, obviously).

comment:5 by axeld, 16 years ago

BTW, please use \ and \ for preformatted text, that's a lot better to read :-)

comment:6 by korli, 16 years ago

Resolution: fixed
Status: newclosed

Should be fixed in hrev27092.

comment:7 by bga, 16 years ago

Resolution: fixed
Status: closedreopened

Sorry for taking this long to check this but it is still not working. when the input_server restarts the mouse is dead. Again, unplugging and pluging it again make it start working. No messages in syslog whatsoever.

comment:8 by bga, 16 years ago

Onw think I noticed is that when I have a PS/2 mouse, restarting the input_serve shows a message saying that a PS/2 mouse was found.

When I have the USB mouse instead, no message to that effect shows in syslog. Maybe the input_server is not even trying to use the USB mouse when it is restarted for some reason?

in reply to:  8 comment:9 by korli, 16 years ago

Replying to bga:

Onw think I noticed is that when I have a PS/2 mouse, restarting the input_serve shows a message saying that a PS/2 mouse was found.

When I have the USB mouse instead, no message to that effect shows in syslog. Maybe the input_server is not even trying to use the USB mouse when it is restarted for some reason?

I tested restarting input_server with Qemu. It seems the mouse device addon keeps running. It doesn't exit because it has a call to usb_hid still running.

MouseDevice::Stop is wrong in this respect: it should close the fd before waiting for its service thread to exit.

comment:10 by korli, 16 years ago

Resolution: fixed
Status: reopenedclosed

Should be fixed in hrev27310

Note: See TracTickets for help on using tickets.