Repository navigation
Fix: Prevent UPS Lockup on '0 HID Objects' by Reconnecting on Stale Data - #2671
Conversation
Signed-off-by: Michał Bogdziewicz <michal@bogdziewicz.xyz>
|
❌ Build nut 2.8.2.2327-master failed (commit fc9e96e6c3 by @michal4132) |
Interesting how will this fix affect also in my case issue when |
Wouldn't surprise me with the more recent problems and investigations in #2347. |
|
✅ Build nut 2.8.2.2347-master completed (commit 14a21d5ad6 by @jimklimov) |
…ome devices [networkupstools#2671] * Grew from https://github.com/user-attachments/files/17646606/0001-apc-fix.patch.txt proposed at networkupstools#2644 (comment) Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…e the feature with optional `interrupt_pipe_no_events_tolerance` setting [networkupstools#2681] Signed-off-by: Jim Klimov <jimklimov@gmail.com>
|
Field datapoints from two brand-new Back-UPS BX750MI-GR units (051d:0002, mfr date 2025-11) that extend what's described here — including a lockup state that goes beyond the interrupt pipe. Unit 1, bench-polled via usbhid-ups 2.8.5 (macOS/arm64, libusb 1.0.30, default pollinterval 2 s): from the first minutes, intermittent control-transfer failures every few seconds (
Unit 2, production-monitored via usbhid-ups 2.8.1 (Debian 13, Intel): same error signature at default polling — ~115 Minor additional observation from the macOS bench: usbhid-ups 2.8.5 exited with SIGSEGV twice in the device-loss path (immediately after logging |
|
Thanks for the analysis, I wonder if hardware-side lock-ups in the "bench test" build up due to reconnections - e.g. controller is busy/leaking/etc., and new connections overwhelm it even further? Or it needs some cooldown time between connection attempts (broken, add "sleep X", reconnect)?.. As for SIGSEGV, there was #3550 fixed recently - may be it. |
|
Checked our bench driver logs to answer the buildup question — within a single driver run, causality ran the other way. The log covering one of the lockups shows an established connection with only the intermittent single At the level of the whole bench session, though, the idea is harder to rule out: that evening involved far more connection setups than a production host would ever see (several driver restarts, a full HID descriptor walk, cable replugs), while the production unit sits on one long-lived connection — and only the bench unit ever wedged. If connection/enumeration stress is what accumulates in the controller, that asymmetry fits. A cooldown between reconnect attempts looks harmless-to-useful either way, though on this evidence it wouldn't have prevented the initial hang. On the SIGSEGV: #3550 matches exactly — the bench ran v2.8.5 (the regression's first release), and both crash logs end precisely at the |
This PR addresses an issue where the UPS would stop responding and become "stuck" with a status of "0 HID objects" requiring a driver restart to recover.
Related to #2644
It might be worth looking more into why this happens in the first place. In my opinion, this is just a workaround for the real issue, or maybe there’s actually a firmware bug in the APC BX###M series.