RFR(xxs): 8227035: JVM::printFlags fails in native OOM situations

Thomas Stüfe thomas.stuefe at gmail.com
Mon Jul 1 17:14:22 UTC 2019


Hi Gerard,

thanks for the quick review!

Easy to reproduce by setting an ulimit -d or -v and letting the VM run
against it.

I was looking at a hotspot jtreg test
(runtime/memory/RunUnitTestsConcurrently.java) which sporadically allocates
a lot of memory and gets killed by the OOM killer. Since that is useless
for analysis I set an ulimit -d. That causes malloc or mmap etc to fail
with ENOMEM, which calls our error handler. Then I tried to get a detailed
NMT report at that point and ran into many problems, one of them this.

Cheers, Thomas




On Mon, Jul 1, 2019 at 6:46 PM gerard ziemski <gerard.ziemski at oracle.com>
wrote:

> hi Thomas,
>
> Looks good, thank you for fixing this.
>
> Can you please share any details, in what situation you ran into a
> problem with this code? I'd like to know, so in the future I could maybe
> test out such a scenario on my own?
>
>
> cheers
>
>
> On 7/1/19 11:09 AM, Thomas Stüfe wrote:
> > Hi all,
> >
> > JVM::printFlags crashed on me in a native OOM situation. That was
> > unnecessary.
> >
> > small and simple fix:
> >
> > issue: https://bugs.openjdk.java.net/browse/JDK-8227035
> > webrev:
> >
> http://cr.openjdk.java.net/~stuefe/webrevs/8227035-jvmflags-printflags-shall-not-allocate/webrev.00/webrev/
> >
> > Thank you!
> >
> > ..Thomas
> >
>
>


More information about the hotspot-runtime-dev mailing list