NMT shutdown in VMError::report_and_die()
thomas.stuefe at gmail.com
Thu Mar 13 14:45:50 UTC 2014
I am with the SAP JVM; right now I am trying to consolidate our error
handling code a bit (bringing our coding closer to OpenJDK).
I have a small question about shutting down NMT in
VMError::report_and_die() is called recursivly in case of secondary
crashes. NMT shutdown is done at the beginning of the function. If NMT
shutdown itself crashes, we will have infinite recursion, resulting in a
stack overflow and no hs-err file.
Would it not be better to do MemTracker::shutdown() only for the first
recursion level? By moving it down some lines into the "if (first_error ==
NULL && Atomic::cmpxchg_ptr(this, &first_error, NULL) == NULL)" condition?
More information about the hotspot-dev