-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
FinalizableReferenceQueue might keep ClassLoaders around #3086
Comments
After running
|
@YuryYaroshevich please clarify (a) what version of Guava you're using and (b) what test failures you're seeing; this might be a completely separate issue. |
@jrtom ,
|
Based on #92, in 2012 we made sure that using
FinalizableReferenceQueue
didn't stopClassLoader
s from being destroyed once they were no longer used.Testing this behavior in JDK 9 revealed some strange failures.
FinalizableReferenceQueueClassLoaderUnloadingTest
has three tests:testUnloadableWithoutSecurityManager
testUnloadableWithSecurityManager
testUnloadableInStaticFieldIfClosed
(3) fails in JDK 9, but the others pass. During testing, we tried ignoring (3) in JDK 9. Then, (2) fails in JDK 9 but (1) passes. If we ignore (2) and (3) in JDK 9, then (1) fails.
Tracking down stray references to
ClassLoader
s for this behavior is difficult, and this heisenbug-like behavior will make it even more difficult.Since Guava v10,
MapMaker
no longer usesFinalizableReferenceQueue
, and we believe it to be infrequently used in general. Because of that, we're going to ignore all of these tests in JDK 9 and treat this as a known, but low-priority, bug.Please comment here if you are impacted by this bug.
Please also feel free to work on tracking down the underlying issue. If you fix it, we would welcome a PR.
The text was updated successfully, but these errors were encountered: