RFR(XXS): 8224793: os::die() does not honor CreateCoredumpOnCrash option

Kim Barrett kim.barrett at oracle.com
Wed May 29 00:27:28 UTC 2019



> On May 28, 2019, at 7:37 PM, Daniel D. Daugherty <daniel.daugherty at oracle.com> wrote:
> 
> Resending with the bug's JBS link included...
> 
> Greetings,
> 
> While working on another bug (JDK-8188872), I happened to notice that
> the test was generating core files even though the test is run with
> the '-XX:+CreateCoredumpOnCrash' option.
> 
> After investigating, I discovered that the os::die() function does not
> honor the CreateCoredumpOnCrash option which was a surprise to me.
> 
> Webrev URL: http://cr.openjdk.java.net/~dcubed/8224793-webrev/0-for-jdk-jdk13/
> 
> Bug: JDK-8224793 os::die() does not honor CreateCoredumpOnCrash option
>      https://bugs.openjdk.java.net/browse/JDK-8224793
> 
> Testing: Mach5 Tier[1-5]
>          Included the fix in my latest round of 8153224 testing
>          on Solaris-X64 where this bug reproduces quite a bit.
> 
> Thanks, in advance, for any comments, suggestions, or questions.
> 
> Dan
> 
> 


[I assume in the description above you meant -CreateCoredumpOnCrash
rather than +CreateCoredumpOnCrash.]

Calling os::exit here seems wrong.  We may have already tried calling
os::exit and gotten here because of problems therein.  And the doc
comment for os::die says "no exit hook, no abort hook, no cleanup."

SIGABRT (signaled by ::abort) has a default action of Core, which is
the reason for the current behavior.  (And ::abort will invoke that
action if the installed action returns rather than terminating the
process.)  If no core is wanted, SIGKILL has a default action of
Terminate, and that behavior can't be replaced.  So issuing a SIGKILL
when -CreateCoredumpOnCrash seems like it should get the desired
behavior.

These various implementations of os::die() look like they could be
merged into os_posix.cpp.



More information about the hotspot-runtime-dev mailing list