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

rewrite OutputController to use reentrant locks #918

Open
wants to merge 1 commit into
base: 1.8
Choose a base branch
from

Conversation

dimitryc
Copy link
Contributor

Attaching thread dump after deadlock reproducible with MS PowerAutomate tool installed
itw-dump.txt

The main thread:

  • PowerAutomate tool registers itself as an Assistive technology, so AWTToolkit.getToolkit() will trigger the loading of the PowerAutomate's code under the AWT lock
  • The PowerAutomate's code prints to the console. Since ITW overrides write to the console, this results in calls to OutputController.log() and an attempt to acquire the OutputController lock

The output deamon:

  • The thread calls to OutputController.consume() in a loop with the OutputController lock acquired. It calls to EQ.invokeLater and attempts to get the AWT lock

It looks like it makes sense to rewrite the OutputController to use reentrant locks to guard access to the messageQue so that the consume() is a mqLock-free method. Please review the patch. Thanks

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

Successfully merging this pull request may close these issues.

1 participant