RFR  8160513: ClassNotFoundException sun.misc.GC when running Tomcat 9 with JDK 9
chris.hegarty at oracle.com
Wed Jul 27 15:27:54 UTC 2016
On 27/07/16 16:13, Mark Sheppard wrote:
> Hi Chris,
> change looks good to me.
Thanks for looking at this Mark.
> just to clarify, the ClassNotFoundException in this instance is due to
> the migration of
> sun.misc.GC to sun.rmi.transport.GC.
> from a more general scope,
> the change to the latter is to relieve JreMemoryLeakPreventionListener
> of the need to
> perform reflective access on this GC class, and hence mitigates any
> potential memory leak JDK-8157570
> posed in the Daemon thread of sun.rmi.transport.GC
Correct. Once this change is in JDK 9 I will contact Tomcat and
propose that they remove the reflective access to sun.misc.GC, in
their JDK 9 trunk.
> On 26/07/2016 16:24, Chris Hegarty wrote:
>> The GC.Daemon thread has no need of any user defined class loader,
>> so should set its context class loader to null before starting, so as to
>> not inadvertently retain a reference to the creating thread’s context
>> class loader.
>> P.S. I added a detailed comment the JIRA issue, for those wondering
>> why Tomcat is running into this.
More information about the core-libs-dev