RFR (s) 8059100: SIGSEGV VirtualMemoryTracker::remove_released_region

Christian Tornqvist christian.tornqvist at oracle.com
Fri Oct 10 18:47:52 UTC 2014


Hi Coleen, 

This looks good, thanks for fixing this.

Thanks,
Christian

-----Original Message-----
From: hotspot-runtime-dev
[mailto:hotspot-runtime-dev-bounces at openjdk.java.net] On Behalf Of Coleen
Phillimore
Sent: Friday, October 10, 2014 10:17 AM
To: hotspot-runtime-dev
Subject: RFR (s) 8059100: SIGSEGV
VirtualMemoryTracker::remove_released_region

Summary: Disallow increasing native memory tracking level

There was support in the code for increasing NMT reporting level, which
causes inconsistencies when called by multiple threads.  There was also a
shutdown() call in final_report() which turned NMT off while other threads
could be running.  The final_report() function modified the running baseline
in place but other threads calling NMT while it is running could see the
wrong data.

Made final_report() snapshot a baseline which is safe enough during error
handling and not call shutdown().  Removed the reset() function because it's
unnecessary at best, and at worst, dangerous to do to the running baseline.

Also if final_report calls shutdown() it can hang getting the malloc site
table lock if the error reported is in the malloc site table, while holding
the lock.

Tested with an aurora ad-hoc (thanks George) and linux-x64 testbase, jck and
jtreg tests.  All with nmt=detail and PrintNMTStatistics.

open webrev at http://cr.openjdk.java.net/~coleenp/8059100/
bug link https://bugs.openjdk.java.net/browse/JDK-8059100

Thanks,
Coleen




More information about the hotspot-runtime-dev mailing list