Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libusb: do not freeze when device vanishs #5434

Closed
skalk opened this issue Jan 22, 2025 · 0 comments
Closed

libusb: do not freeze when device vanishs #5434

skalk opened this issue Jan 22, 2025 · 0 comments

Comments

@skalk
Copy link
Member

skalk commented Jan 22, 2025

When working on issue #5401 I was stumbling upon much error messages from our libusb port resp. binding, whenever the related USB device vanished. Therefore, I changed it to warn once and freeze. As it turned out: there are use-cases of this library, where a component using the libusb implements another service. When the USB device of this component vanishs, it shall get restarted, but first it's clients have to gracefully close their sessions to the component. Therefore, the component must not freeze in the first place, when the USB device vanishs.

Alternatively, we should propagate an appropriated error code of the libusb to the API clients.

@skalk skalk added the cleanup label Jan 22, 2025
skalk added a commit to skalk/genode that referenced this issue Jan 23, 2025
Instead of freezing, return corresponding libusb error code if the
USB device got disconnected. Therefore, components using the library
can continue to work otherwise.

Fix genodelabs#5434
@skalk skalk added the fixed label Jan 23, 2025
chelmuth pushed a commit that referenced this issue Jan 23, 2025
Instead of freezing, return corresponding libusb error code if the
USB device got disconnected. Therefore, components using the library
can continue to work otherwise.

Fix #5434
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant