Skip to content

Conversation

babsingh
Copy link
Contributor

@babsingh babsingh commented Oct 3, 2025

This change addresses a race condition with spinThreads, which
may prevent blocked threads from being woken up.

Fixes: #7859

This change addresses a race condition with spinThreads, which
may prevent blocked threads from being woken up.

Fixes: eclipse-omr#7859

Signed-off-by: Babneet Singh <[email protected]>
@babsingh
Copy link
Contributor Author

babsingh commented Oct 3, 2025

jenkins build all

@babsingh
Copy link
Contributor Author

babsingh commented Oct 3, 2025

This PR provides an alternate approach to address #7859. It aligns more closely with the changes made in JamesKingdon/openj9-omr@a15cf2f.

We will perf test the changes in this PR alongside #7878. Since the client has already verified changes comparable to this PR, we will proceed with merging this PR if no performance regressions are observed in our workloads. This approach will ensure a quicker turnaround for the client.

fyi @dspath @JamesKingdon @tajila @vijaysun-omr

@JamesKingdon
Copy link
Contributor

Many thanks for doing this Babneet!
It's interesting, it's not quite the same as what I did - this change has the unblock calls under a different conditional guard to the GA code, where I was calling it unconditionally.

@babsingh
Copy link
Contributor Author

babsingh commented Oct 3, 2025

I assumed that similar effects would be observed with this change, as it reverts to the state before the spinThread optimization. However, I observed functional issues (hangs/timeouts) with this change. I have opened #7969 which is identical to what you had proposed in JamesKingdon/openj9-omr@a15cf2f. Closing this PR due to the functional issues observed.

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.

Not calling unblock from monitor exit can cause threads to block in monitor entry, potentially permanently

2 participants