RFR: 8250637: UseOSErrorReporting times out (on Mac and Linux)

Gerard Ziemski gziemski at openjdk.java.net
Thu Oct 22 17:31:18 UTC 2020


hi all,

Please review this fix for POSIX platforms, which addresses a time out that occurs while handling a crash with UseOSErrorReporting ON

The timeout was caused by the crash handling code looping infinitively because code incorrectly assumed that the signal handlers were reset to their defaults, while what really was happening was that the code was resetting the signal handlers to our default signal handlers.

To avoid similar confusion in the future I did the following:

- renamed the VMError::reset_signal_handlers() to VMError:: rearm_signal_handlers()
- introduced a new API VMError::clear_signal_handlers() which is implemented in PosixSignals

PosixSignals::clear_signal_handlers() is where the actual fix is done and it simply resets all signal handlers to their system defaults.

A similar problem occurs on Windows, with the only difference being that before a process times out (takes 2 minutes) it runs out of stack space in about 250 loops, so that's the only reason it doesn't linger for that long. Windows issue is tracked separately by https://bugs.openjdk.java.net/browse/JDK-8250782

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

Commit messages:
 - reset signal handlers to their system defaults if handling crash with UseOSErrorReporting

Changes: https://git.openjdk.java.net/jdk/pull/813/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=813&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8250637
  Stats: 39 lines in 6 files changed: 30 ins; 0 del; 9 mod
  Patch: https://git.openjdk.java.net/jdk/pull/813.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/813/head:pull/813

PR: https://git.openjdk.java.net/jdk/pull/813


More information about the hotspot-dev mailing list