RFR: 8302798: Refactor -XX:+UseOSErrorReporting for noreturn crash reporting
Kim Barrett
kbarrett at openjdk.org
Tue Feb 21 05:16:25 UTC 2023
On Tue, 21 Feb 2023 01:56:04 GMT, David Holmes <dholmes at openjdk.org> wrote:
> So IIUC ... the top-level crash handlers on Windows will honour `UseOSErrorReporting` by passing `ARA:Return` if needed. But all other exit paths, such as `report_vm_out_of_memory` will now never return even if UOER is true, and to try and compensate for that you call `BREAKPOINT` in that case before actually dying.
>
> In terms of behavioural change I'm not at all sure what impact that might have.
What they used to do when the option is true was return and execute the
BREAKPOINT immmediately following the call. Now they don't return, instead
executing BREAKPOINT instead. Note that on Windows BREAKPOINT => DebugBreak(),
which raises a breakpoint structured exception, which (in the absence of an
attached debugger) walks up the handler chain (trying to report along the way,
but we've already reported), until becoming an unhandled exception and
terminating. So I think the same behavior as before, just the BREAKPOINT
occurs in a slightly different place.
> I wonder if we could get @mo-beck to assess this change?
I've already emailed her, asking for help.
> src/hotspot/share/utilities/vmError.cpp line 1368:
>
>> 1366: filename, lineno, size);
>> 1367: // Shouldn't be able to get here. Die immediately if we do.
>> 1368: os::die();
>
> Should we try to report this somehow?
I don't really see how, without being significantly at risk of recursive errors.
-------------
PR: https://git.openjdk.org/jdk/pull/12651
More information about the hotspot-dev
mailing list