Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8291878

NMT: Malloc limits

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • 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).

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

              Created:
              Updated:
              Resolved: