Tuesday, September 18, 2007

Famous Java Concurrent Library Memory Leak Bug

The famous Java concurrent library memory leak bug: 6460501 Synchronizer timed acquire still leaks memory is fixed and backported to 1.5.0_12 and 1.6.0_02. You should upgrade your Java version if you use Java concurrent library. The test code now does not show OOME on iteration.


D:\>java -showversion -Xmx16m -esa -ea Leak6
java version "1.6.0_02"Java(TM) SE Runtime Environment (build 1.6.0_02-b05)Java HotSpot(TM) Client VM (build 1.6.0_02-b05, mixed mode, sharing)

Free: 4996912
Memory used: 70104
D:\>