RFR: 8250637: UseOSErrorReporting times out (on Mac and Linux) [v3]
David Holmes
dholmes at openjdk.java.net
Thu Oct 29 05:07:46 UTC 2020
On Wed, 28 Oct 2020 17:11:05 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
>>
>> make UseOSErrorReporting flag Windows only
>
> src/hotspot/share/utilities/vmError.cpp line 1440:
>
>> 1438: // while searching for the exception handler. Only the first level needs
>> 1439: // to be reported.
>> 1440: if (UseOSErrorReporting && log_done) return;
>
> This has nothing to do with you patch, which is fine:
>
> But the more I look at this line the more confused I get. I am not sure what the point is. log_done means we have written the hs-err file successfully and got a signal after the call to VMError::report() but before returning from this function resp. before calling abort.
>
> That covers a whole section between lines 1545 and 1629, I am surprised how much we do there. I am almost certain some things will not behave well when secondary crashes happen and we re-enter this function, e.g.:
> 1556 JFR_ONLY(Jfr::on_vm_shutdown(true);)
> 1557
> 1558 if (PrintNMTStatistics) {
> 1559 fdStream fds(fd_out);
> 1560 MemTracker::final_report(&fds);
> 1561 }
> both should be guarded against re-entering when this function is called repeatedly and they have had their song-and-dance already. Otherwise e.g. we may see the NMT output twice if a signal occurs after line 1560.
>
> All idle musings, potentially a future cleanup.
That code was added by: https://bugs.openjdk.java.net/browse/JDK-4997835
But it is not clear how that code actually relates to that bug report! The comment indicates we will call report_and_die multiple times as we search for the exception handler - in which case we only want to report once - but I'm not seeing where these calls originate from.
-------------
PR: https://git.openjdk.java.net/jdk/pull/813
More information about the hotspot-dev
mailing list