Skip to content

d/wmr: Reverb G1: Avoid camera buffer related hangs

nima01 requested to merge nima_wmr_reverb_g1_slam into main

Reverb G1, Monado (with Basalt SLAM enabled) will hang within a few minutes after being started. Reception of usb messages from the HMD Hololens Sensors device and/or the cameras will halt, and tracking will freeze.

Fix: Increasing the number of HMD camera transfer buffers to 4 seem to solve this problem completely. Note: I am not sure if this fix addresses the root cause (i.e. if two buffers are strictly just not enough). -Or if this is just making some threading/deadlock bug so much less likely to occur that I cannot reproduce it any longer.

Symptoms and more info:

  1. Core i5 laptop, eGPU (via TB). Issue is reproducible with all USB ports on the laptop/eGPU-enclosure/external usb hubs.

  2. Seems to be timing and resource related: Disabling the HMD screen, or adding various debug traces around the libusb calls in the wmr driver, will delay (but not prevent) these hangs.

  3. Shortly before such a hang occurs, a sequence of HMD Hololens Sensors debug messages like this can be seen:

DEBUG [hololens_handle_debug] HMD debug: TS 52.157000 seq 2926 src 3: DMA CMT ERR C1 F2340 P60822 C60814 E583
DEBUG [hololens_handle_debug] HMD debug: TS 52.665000 seq 2928 src 3: CamerasWatchdogHandler fired, frame count: 2341
DEBUG [hololens_handle_debug] HMD debug: TS 52.675000 seq 2930 src 4: OV7251StopStreaming
DEBUG [hololens_handle_debug] HMD debug: TS 52.809000 seq 2931 src 4: CamerasStartStreaming 0
DEBUG [hololens_handle_debug] HMD debug: TS 52.823000 seq 2932 src 4: OV7251StartStreaming
DEBUG [hololens_handle_debug] HMD debug: TS 52.943000 seq 2933 src 4: OV7251DisableDataReadout
DEBUG [hololens_handle_debug] HMD debug: TS 53.093000 seq 2934 src 4: OV7251EnableDataReadout
DEBUG [hololens_handle_debug] HMD debug: TS 53.100000 seq 2935 src 3: DMA CMT ERR C2 F2342 P60856 C60838 E583

DEBUG [hololens_handle_debug] HMD debug: TS 53.111000 seq 2937 src 4: CamerasDmaReset
...
DEBUG [hololens_handle_debug] HMD debug: TS 53.333000 seq 2957 src 4: CamerasDmaReset
... etc.
Edited by nima01

Merge request reports