We recently analyzed JDK-8291919, a jdk11u-specific regression that caused a compiler arena to explode.
A way to limit compiler arenas would have been very helpful for us: something to make the VM crash or oom-abort in the compiler allocation path when arena size reaches a certain point. We have `MallocMaxTestWords`, but that turned out to be broken since it does not de-account memory allocations on free().
(We finally managed to get a retry file by reproducing the bug locally and ulimit-ing the virtual process size, but it was annoyingly time-consuming.)
NMT is in a good position to do this sort of limiting, and we have NMT enabled in debug builds always, so I'd like to add this little feature to NMT.
As a future improvement, I would like to remove MallocMaxTestWords (apart from it not working, I also find the "words" part of this switch strange and would prefer giving memory sizes in bytes).
A way to limit compiler arenas would have been very helpful for us: something to make the VM crash or oom-abort in the compiler allocation path when arena size reaches a certain point. We have `MallocMaxTestWords`, but that turned out to be broken since it does not de-account memory allocations on free().
(We finally managed to get a retry file by reproducing the bug locally and ulimit-ing the virtual process size, but it was annoyingly time-consuming.)
NMT is in a good position to do this sort of limiting, and we have NMT enabled in debug builds always, so I'd like to add this little feature to NMT.
As a future improvement, I would like to remove MallocMaxTestWords (apart from it not working, I also find the "words" part of this switch strange and would prefer giving memory sizes in bytes).
- relates to
-
JDK-8058897 Unsafe.reallocateMemory() ignores -XX:MallocMaxTestWords setting
- Closed
-
JDK-8293292 Remove MallocMaxTestWords
- Resolved