NMT: Malloc limits

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 20
    • Affects Version/s: 20
    • Component/s: hotspot
    • b12

      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).

            Assignee:
            Thomas Stuefe
            Reporter:
            Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: