Bug 60620

Summary: [JRE] Memory leak found in java.util.concurrent.ForkJoinPool
Product: Tomcat 8 Reporter: Konstantin Kolinko <knst.kolinko>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 8.0.39   
Target Milestone: ----   
Hardware: PC   
OS: All   

Description Konstantin Kolinko 2017-01-21 08:45:28 UTC
Filing a bug for an already fixed issue, to summarize discussions spawned across different mailing lists, and for better changelog.


See "Tomcat 8, 8.5 and 9 returning another apps environment with context.lookup() from a .parallelStream()", 2017-01-08 on users@
http://markmail.org/message/qcy6rqhw52sspyv7

See "Memory leak found in java.util.concurrent.ForkJoinPool", 2017-01-09 on dev@
http://markmail.org/message/7w5wspqeayx7dr5x
Comment 1 Konstantin Kolinko 2017-01-21 09:22:34 UTC
A workaround for this Oracle JRE bug was added to memory leaks protection code in Tomcat 7.0.74 (r1778068), 8.5.11 (r1778065), 9.0.0.M17 (r1778061)

The fix has not been applied to Tomcat 8.0 yet.

Note that compilation of SafeForkJoinWorkerThreadFactory requires Java 7 and later. People who use two separate Eclipse projects for Tomcat 7 (separating code that requires java 6 and java 7 into different projects) need to update their include / exclude patterns.

The sample projects were updated in r1779707, to be in 7.0.76.
Comment 2 Konstantin Kolinko 2017-01-21 09:26:33 UTC
Moving the issue to Tomcat 8.0, as the fix has not been applied there yet.

As a variant, we can add the helper class but keep the protection feature off by default. This may wait a while, to get more feedback.
Comment 3 Mark Thomas 2017-01-25 20:45:30 UTC
Fixed in r1780268 for 8.0.42 onwards.