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 #698

Closed
wants to merge 2 commits into from

Conversation

tjwatson
Copy link
Contributor

No description provided.

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.
Copy link

github-actions bot commented Nov 15, 2024

Test Results

  663 files  + 3    663 suites  +3   1h 17m 15s ⏱️ -49s
2 211 tests +10  2 162 ✅ + 8   47 💤 ±0  2 ❌ +2 
6 777 runs  +30  6 628 ✅ +24  143 💤 ±0  6 ❌ +6 

For more details on these failures, see this check.

Results for commit beb4c97. ± Comparison against base commit 2815608.

♻️ This comment has been updated with latest results.

The following methods can stop throwing IllegalStateExceptions

Bundle.uninstall
BundleContext.createFilter
BundleContext.getBundle
BundleContext.getProperty
BundleContext.removeServiceListener
BundleContext.removeBundleListener
BundleContext.removeFrameworkListener
BundleContext.ungetService
ServiceObjects.ungetService
ServiceRegistration.unregister
@tjwatson
Copy link
Contributor Author

Closing this PR to create a new one. Something got mixed up with the branches. I tried to force push back to the original, but still has the Stop throwing IllegalStateException commit here.

@tjwatson tjwatson closed this Nov 18, 2024
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