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

Fix race condition in jdwp #62

Merged
merged 1 commit into from
Mar 29, 2018

Conversation

pdbain-ibm
Copy link
Contributor

Normally, the event helper thread suspends all threads, then the debug loop in
the listener thread receives a command to resume. The debugger may deadlock if
the debug loop in the listener thread starts processing commands (e.g. resume
threads) before the event helper completes the initialization (and suspends
threads).

This patch adds synchronization to ensure the event helper completes the
initialization sequence before debugger commands are processed.

@andrew-m-leonard FYI.

Signed-off-by: Peter Bain peter_bain@ca.ibm.com

@pdbain-ibm pdbain-ibm force-pushed the fix_jdwp branch 2 times, most recently from 717f41f to a7f4280 Compare March 15, 2018 19:57
Normally, the event helper thread suspends all threads, then the debug loop in
the listener thread receives a command to resume.  The debugger may deadlock if
the debug loop in the listener thread starts processing commands (e.g. resume
threads) before the event helper completes the initialization (and suspends
threads).

This patch adds synchronization to ensure the event helper completes the
initialization sequence before debugger commands are processed.

Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
@pdbain-ibm
Copy link
Contributor Author

@andrew-m-leonard @adamfarley would you kindly review this?
Thanks
-p

Copy link
Contributor

@andrew-m-leonard andrew-m-leonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@andrew-m-leonard andrew-m-leonard merged commit b8c7652 into ibmruntimes:openj9 Mar 29, 2018
@pshipton
Copy link
Member

Similar problems as ibmruntimes/openj9-openjdk-jdk9#138. @pdbain-ibm

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.

None yet

3 participants