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

Get loader-classname lock for calls to findLoadedClass #700

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

Conversation

tjwatson
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Nov 18, 2024

Test Results

  660 files  ±0    660 suites  ±0   1h 14m 51s ⏱️ - 3m 13s
2 201 tests ±0  2 154 ✅ ±0   47 💤 ±0  0 ❌ ±0 
6 747 runs  ±0  6 604 ✅ ±0  143 💤 ±0  0 ❌ ±0 

Results for commit 77990e6. ± Comparison against base commit 2815608.

♻️ This comment has been updated with latest results.

@tjwatson
Copy link
Contributor Author

I do not plan to merge this until when the development branches open for 2025-03. At that time I will need to bump the version of org.eclipse.osgi.

This is related to Open J9 issue
eclipse-openj9/openj9#20444

There is a concern that the initial call to findLoadedClass
by Equinox is not protected by the same loader-classname lock
as the later calls to findLoadedClass/defineClass
are.

There are concerns that the unprotected findLoadedClass call
could catch the JVM in an invalid state if there is another
thread in the middle of defining the class.

This change replaces the clunky way of doing loader-classname
locks with a more efficient strategy. This way we can use
this lock around the initial call to findLoadedClass
without too much concern over the performance impact.

This change also removes some of the old code that still
supported Java 6.  It is always assumed we now can register
the class loaders as parallel capable.
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