RFR: 8302798: Refactor -XX:+UseOSErrorReporting for noreturn crash reporting

Kim Barrett kbarrett at openjdk.org
Tue Feb 28 07:51:04 UTC 2023


On Tue, 28 Feb 2023 07:20:00 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/share/utilities/vmError.cpp line 1448:
>> 
>>> 1446:     if (UseOSErrorReporting && log_done) {
>>> 1447:       raise_fail_fast(_siginfo, _context);
>>> 1448:     }
>> 
>> I think this bit might not be needed anymore.  I think the reason for the old code here is to deal with
>> the repeated calls to report_and_die as we walk up the Windows exception filter list and return because
>> of UseOSErrorReporting.  We don't do that anymore.  I think we could instead now not do anything here
>> and treat repeated calls "normally", reporting them as such and eventually dying, either via Windows
>> fail-fast or abort.
>
> I think we should remove this part. Otherwise concurrent threads running into faults cause the VM to end abruptly while the primary thread is its in the last stages of error reporting: after log_done is set but before os::die was called (we do some things here: JFR shutdown, NMT statistics, compiler replay file writing).
> 
> In fact, this may be an existing bug which could explain missing/corrupt replay files or JFR files if UseOSErrorReporting is set.

Yeah, I was approaching the same conclusion.  I'll remove it.

-------------

PR: https://git.openjdk.org/jdk/pull/12759


More information about the hotspot-dev mailing list