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

ChibiOS USB driver: prevent deadlock with CONSOLE_ENABLE = yes #12472

Merged
merged 1 commit into from
Apr 10, 2021

Conversation

stapelberg
Copy link
Contributor

Description

Before this commit, attaching an ARM-based (i.e. ChibiOS-based) keyboard that
uses CONSOLE_ENABLE = yes and produces debug messages would deadlock the
keyboard unless one was running hid_listen.

With this commit, dead-locking writes to the queue are detected and prevented.

fixes #5631

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Before this commit, attaching an ARM-based (i.e. ChibiOS-based) keyboard that
uses CONSOLE_ENABLE = yes and produces debug messages would deadlock the
keyboard unless one was running hid_listen.

With this commit, dead-locking writes to the queue are detected and prevented.

fixes qmk#5631
@github-actions github-actions bot added the core label Apr 3, 2021
@drashna drashna requested review from fauxpark, tzarc and a team April 3, 2021 18:09
@JonasGessner
Copy link

This may also be a fix for #1149, although it's not quite clear what that issue is even exactly about. See my comment on there.

@stapelberg
Copy link
Contributor Author

This should be ready to merge

@tzarc tzarc requested a review from a team April 10, 2021 09:53
@zvecr zvecr merged commit 7d95333 into qmk:master Apr 10, 2021
@stapelberg stapelberg deleted the consolehang branch April 10, 2021 15:03
@zvecr
Copy link
Member

zvecr commented Apr 10, 2021

Thanks!

@purdeaandrei
Copy link
Contributor

Hello everyone, please review my improved fix for this issue here:
#12576
This current implementation has some issues which are described in my PR/commit messages.

makenova pushed a commit to makenova/qmk_firmware that referenced this pull request Apr 26, 2021
…2472)

Before this commit, attaching an ARM-based (i.e. ChibiOS-based) keyboard that
uses CONSOLE_ENABLE = yes and produces debug messages would deadlock the
keyboard unless one was running hid_listen.

With this commit, dead-locking writes to the queue are detected and prevented.

fixes qmk#5631
rizo pushed a commit to rizo/qmk_firmware that referenced this pull request May 10, 2021
…2472)

Before this commit, attaching an ARM-based (i.e. ChibiOS-based) keyboard that
uses CONSOLE_ENABLE = yes and produces debug messages would deadlock the
keyboard unless one was running hid_listen.

With this commit, dead-locking writes to the queue are detected and prevented.

fixes qmk#5631
toddyamakawa pushed a commit to toddyamakawa/qmk_firmware that referenced this pull request May 19, 2021
…2472)

Before this commit, attaching an ARM-based (i.e. ChibiOS-based) keyboard that
uses CONSOLE_ENABLE = yes and produces debug messages would deadlock the
keyboard unless one was running hid_listen.

With this commit, dead-locking writes to the queue are detected and prevented.

fixes qmk#5631
HokieGeek pushed a commit to HokieGeek/qmk_firmware that referenced this pull request Jul 11, 2021
…2472)

Before this commit, attaching an ARM-based (i.e. ChibiOS-based) keyboard that
uses CONSOLE_ENABLE = yes and produces debug messages would deadlock the
keyboard unless one was running hid_listen.

With this commit, dead-locking writes to the queue are detected and prevented.

fixes qmk#5631
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
…2472)

Before this commit, attaching an ARM-based (i.e. ChibiOS-based) keyboard that
uses CONSOLE_ENABLE = yes and produces debug messages would deadlock the
keyboard unless one was running hid_listen.

With this commit, dead-locking writes to the queue are detected and prevented.

fixes qmk#5631
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All ARM Keyboards do not work on Ubuntu 18.04
5 participants