Opened 2 years ago

Closed 3 months ago

#13403 closed bug (fixed)

Deadbeef page fault in usb_disk_close

Reported by: pulkomandy Owned by: nobody
Priority: normal Milestone: R1/beta2
Component: Drivers/USB/XHCI Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Started happenning after an update on my desktop machine.

Attachments (1)

image%3A12185 (1.5 MB) - added by pulkomandy 2 years ago.

Download all attachments as: .zip

Change History (11)

Changed 2 years ago by pulkomandy

Attachment: image%3A12185 added

comment:1 Changed 2 years ago by pulkomandy

Has a Patch: set

comment:2 Changed 2 years ago by pulkomandy

Has a Patch: unset

comment:3 Changed 2 years ago by pulkomandy

Component: Drivers/DiskDrivers/USB/XHCI

This happens only when my mouse is connected to an XHCI port. I have moved it back to an EHCI one and the issue is not reproductible then.

comment:4 Changed 10 months ago by pulkomandy

Ok, so I'm still running into this. Sometimes the machine is very stable, but today it PANIC'ed 2 or 3 times in a row, seconds after booting.

This (desktop) machine has a multi-card reader plugged to internal USB3 ports. It may be relevant that this device has 4 LUNs (one for each type of card you can connect).

Apparently this does not work reliably, the XHCI driver will frequently detect it as a "new device" and complain: new device on a port that is already in use.

It will still proceed and load the driver. I guess it will close the previous instance.

When it gets to usb_disk_close, it attempts to get the device from the cookie (which points to one of the 4 LUNs). However, the device (or the LUN?) has already been freed and erased with deadbeef, apparently.

Freeing normally happens in usb_device_free, which I expect would normally happen only after closing.

comment:5 Changed 7 months ago by pulkomandy

I should note that Windows complains about a broken USB device on that machine. So there is an underlying hardware problem, but still we should not end up in KDL no matter what.

comment:6 Changed 7 months ago by pulkomandy

Milestone: UnscheduledR1/beta2

comment:7 Changed 3 months ago by CodeforEvolution

Just wanted to check in, though is this still an issue with all the recent XHCI changes?

comment:8 Changed 3 months ago by pulkomandy

Waddlesplash told me not to test yet :) I will attempt to reconnect the USB card reader next time I use that machine.

comment:9 Changed 3 months ago by waddlesplash

Yes, please do retest now. It's possible that the changes which fixed #12929 also fixed this.

comment:10 Changed 3 months ago by waddlesplash

Resolution: fixed
Status: newclosed
1:36 PM <PulkoMandy> seems to work ok after an update
2:06 PM <waddlesplash> you can read off SD cards?
2:23 PM <PulkoMandy> yes, SD card works, no complaints from xhci in syslog, everything fine
2:38 PM <waddlesplash> yay!
Note: See TracTickets for help on using tickets.