Skip to content

(0.51) Virtual Threads: Bug fixes for JEP491 #21350

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

Merged
merged 2 commits into from
Mar 14, 2025

Conversation

babsingh
Copy link
Contributor

@babsingh babsingh commented Mar 13, 2025

Correctly derive an inflated object monitor

A null object monitor is being passed to detachMonitorInfo, which
leads to a segfault. In the inflated case, the object monitor is
correctly derived to prevent the segfault.

This fix helps the LotsOfContendedMonitorEnter test in #20705.

Correctly handle notify before wait for virtual threads

If a notify is issued before wait, then there waitingContinuations
will be NULL. In this case, the notify steps should not be executed
since there are no virtual threads waiting, and
waitingContinuations->vthread will be NULL.

Addresses point 3 in the below Github comment:
#20369 (comment).

Port of #21342.

Signed-off-by: Babneet Singh [email protected]

A null object monitor is being passed to detachMonitorInfo, which
leads to a segfault. In the inflated case, the object monitor is
correctly derived to prevent the segfault.

This fix helps the LotsOfContendedMonitorEnter test in eclipse-openj9#20705.

Signed-off-by: Babneet Singh <[email protected]>
If a notify is issued before wait, then there waitingContinuations
will be NULL. In this case, the notify steps should not be executed
since there are no virtual threads waiting, and
waitingContinuations->vthread will be NULL.

Addresses point 3 in the below Github comment:
eclipse-openj9#20369 (comment).

Signed-off-by: Babneet Singh <[email protected]>
@babsingh babsingh requested a review from tajila March 13, 2025 22:00
@tajila tajila merged commit 84b67a4 into eclipse-openj9:v0.51.0-release Mar 14, 2025
2 checks passed
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.

2 participants