RFR for JDK-8029346 LowMemoryTestConcMarkSweepGC.sh fails intermittently with timeout

Tristan Yan tristan.yan at oracle.com
Thu Dec 12 09:12:17 PST 2013


Hi Everyone
I am working on bug https://bugs.openjdk.java.net/browse/JDK-8029346

Root cause for this bug is in CMS mode; gc could happen when 
AllocatorThread is allocating spaces. in that case. objectPool won't be 
added two object arrays as it's supposed to have. Also in that case. no 
clear and gc will be invoked in SweepThread. Which means memory used is 
still bigger than threshold. According the java doc. Subsequent crossing 
of the usage threshold value does not cause further notification until 
the memory usage has returned to become less than the usage threshold 
value. That's the reason why next notification will never comes.

Suggested fix is making below change in doTask, make sure in every loop 
two object arrays are added objectPool and gc will be invoked in 
SweepThread.
change
while (!listenerInvoked) {
into
while (!listenerInvoked || mpool.getUsage().getUsed() < 
mpool.getUsageThreshold()) {

Please let me know if you have any comments or suggestions.

Thank you

Tristan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20131213/c9c69fc0/attachment.html 


More information about the serviceability-dev mailing list