genodelabs / genode

Genode OS Framework
https://genode.org/
Other
1.04k stars 246 forks source link

rpi_usb_host_drv: illegal READ at address with run/usb_hid_raw #5126

Open chelmuth opened 4 months ago

chelmuth commented 4 months ago

As discovered in #4958, the test above fails on rpi like follows.

[init -> usb_drv -> usb_drv] usb 1-1.3: USB disconnect, device number 63
[init -> usb_hid_drv] usb usb-1-63: USB disconnect, device number 63
[init -> usb_hid_drv] Disconnected device: input118
[init -> usb_hid_drv] Disconnected device: input119
Error: illegal READ at address 0x148ab58 by pager_object: pd='init -> usb_drv -> usb_drv' thread='ep' ip=0x106dea4

Note, it may take quite a lot of unplug-plug cycles to reproduce (hinted by usb-device index 63).

   dwc_otg_hcd_clear_tt_buffer_complete():
   ../contrib/rpi_linux-9910b548f79f794c793cc0639c8a91cb324e2ab6/src/linux/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c:1073
    106de80:       e92d4030        push    {r4, r5, lr}
   ../contrib/rpi_linux-9910b548f79f794c793cc0639c8a91cb324e2ab6/src/linux/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c:1078
    106de84:       e5914020        ldr     r4, [r1, #32]
   ../contrib/rpi_linux-9910b548f79f794c793cc0639c8a91cb324e2ab6/src/linux/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c:1073
    106de88:       e24dd00c        sub     sp, sp, #12
   ../contrib/rpi_linux-9910b548f79f794c793cc0639c8a91cb324e2ab6/src/linux/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c:1079
    106de8c:       e3540000        cmp     r4, #0
    106de90:       0a00000c        beq     106dec8 <_ZN9Component9constructERN6Genode3EnvE+0x6dec8>
   hcd_to_dwc_otg_hcd():
   ../contrib/rpi_linux-9910b548f79f794c793cc0639c8a91cb324e2ab6/src/linux/drivers/usb/host/dwc_otg/dwc_otg_hcd.h:641
    106de94:       e5905148        ldr     r5, [r0, #328]  @ 0x148
   dwc_otg_hcd_clear_tt_buffer_complete():
   ../contrib/rpi_linux-9910b548f79f794c793cc0639c8a91cb324e2ab6/src/linux/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c:1082
    106de98:       e28d1004        add     r1, sp, #4
    106de9c:       e59500d0        ldr     r0, [r5, #208]  @ 0xd0
    106dea0:       ebff92d0        bl      10529e8 <_ZN9Component9constructERN6Genode3EnvE+0x529e8>
   ../contrib/rpi_linux-9910b548f79f794c793cc0639c8a91cb324e2ab6/src/linux/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c:1083
->  106dea4:       e5d43058        ldrb    r3, [r4, #88]   @ 0x58
    106dea8:       e3c33001        bic     r3, r3, #1
    106deac:       e5c43058        strb    r3, [r4, #88]   @ 0x58
   ../contrib/rpi_linux-9910b548f79f794c793cc0639c8a91cb324e2ab6/src/linux/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c:1085
    106deb0:       e595300c        ldr     r3, [r5, #12]
    106deb4:       e3130002        tst     r3, #2
    106deb8:       1a000004        bne     106ded0 <_ZN9Component9constructERN6Genode3EnvE+0x6ded0>
chelmuth commented 1 month ago

The error happened last 2024-05-06 in the CI, but I could not spot any relevant source-code change since then. I'll keep an eye on it.