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

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

tjwatson
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Nov 18, 2024

Test Results

  440 files   -   220    440 suites   - 220   51m 6s ⏱️ - 24m 29s
2 201 tests ±    0  2 153 ✅  -     1  48 💤 + 1  0 ❌ ±0 
4 498 runs   - 2 249  4 402 ✅  - 2 202  96 💤  - 47  0 ❌ ±0 

Results for commit 538db52. ± Comparison against base commit 6d5e55c.

This pull request skips 1 test.
AutomatedTests org.eclipse.osgi.tests.services.datalocation.AllTests org.eclipse.osgi.tests.services.datalocation.BasicLocationTests ‑ testUNC

♻️ 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.
@tjwatson tjwatson merged commit a74bbe6 into eclipse-equinox:master Dec 2, 2024
25 of 27 checks passed
@tjwatson tjwatson deleted the improveLoaderLock branch December 2, 2024 21:11
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