RFR(S): 8074354: tests that intentionally crash the VM can timeout creating a core file
Staffan Larsen
staffan.larsen at oracle.com
Wed Mar 11 19:31:02 UTC 2015
> On 11 mar 2015, at 17:07, Yumin Qi <yumin.qi at oracle.com> wrote:
>
> Thomas,
>
> Thanks for the review.
>
> On 3/11/2015 3:47 AM, Thomas Stüfe wrote:
>> Hi Yumin,
>>
>> There is also test/runtime/ErrorHandling/SecondaryErrorTest.java - could you please add "-XX:-CreateCoredumpOnCrash" ? Thank you!
>>
> Sure.
>> Beyond that, as I wrote in the bug report comments:
>>
>> "This is also a problem on Windows - MiniDumpWriteDump() may hang infinitly. And on Windows this is worse than under UNIX because we create the Dump before writing the hs-err file, so if the Dump hangs, we get no error log. I would like to revert the order: create the minidump after writing the error log, the same way Unix does it. We did this in our JVM (SAP) because for us, error logs are more useful than minidumps. "
>>
>> So, I would like to see os::abort on Windows call MiniDumpWriteDump(), and thus the mini dump writing moved after the error log writing. This would also make the code way cleaner because the control flow would be the same on all platforms.
>>
>> I understand that this may be out of scope for your change, but I would like to know what others think about this.
>>
> As in Staffan L's comments, we need to have a discuss and make final decision for it --- tradeoff.
Given that core files on other platforms are useful even after we write the hotspot error logs, it would probably make sense to have the same mechanism on all platforms as Thomas points out. I haven’t been debugging many windows failures lately so perhaps someone who does can chime in here?
> Personally I prefer a full dump when VM crashes on Windows, which is more helpful. I found minidump not very helpful in most of the cases.
Windows calls all crash dumps “minidumps”. They can however be configured to include more or less information, but even with all the information it is still called a “minidump” (or at least the API for creating them is called that).
/Staffan
>
> Thanks
> Yumin
>> Kind regards, Thomas
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Mar 11, 2015 at 8:02 AM, Yumin Qi <yumin.qi at oracle.com <mailto:yumin.qi at oracle.com> <mailto:yumin.qi at oracle.com <mailto:yumin.qi at oracle.com>>> wrote:
>>
>> Please review:
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8074354 <https://bugs.openjdk.java.net/browse/JDK-8074354>
>> webrev: http://cr.openjdk.java.net/~minqi/8074354/webrev01/ <http://cr.openjdk.java.net/~minqi/8074354/webrev01/>
>> <http://cr.openjdk.java.net/%7Eminqi/8074354/webrev01/ <http://cr.openjdk.java.net/%7Eminqi/8074354/webrev01/>>
>>
>> Summary: Tests timed out when VM crashes and dumping core file
>> which in the test case is not needed. To make core not created,
>> the fix changed CreateMinidumpOnCrash to CreateCoredumpOnCrash,
>> the former is only used on Windows and the latter for all
>> platforms. When VM crashes on non Windows, core file generated as
>> default if OS sets core dump allowed. Default value of
>> CreateCoredumpOnCrash set to 'true' to keep same behavior on non
>> Windows platforms, but changed for Windows --- original is false,
>> not create minidump on Windows. With CreateCoredumpOnCrash turned
>> off, no core file will be generated. CreateMinidumpOnCrash still
>> can be used on commandline but only as alias for the new flag.
>>
>> Tests: JPRT, manual tests setting CreateMinidumpOnCrash on
>> commandline to verify flag change as alias.
>>
>> Thanks
>> Yumin
More information about the hotspot-runtime-dev
mailing list