Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8176140

Crashes or timeouts during error reporting may lead to infinitely repeated error logs until ErrorLogTimeout is hit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 10
    • hotspot
    • None
    • b21

      When crashing and writing an error log, error reporting steps may hang for any number of reasons.

      JDK-8166944 (https://bugs.openjdk.java.net/browse/JDK-8166944) added the ability to interrupt hanging error reporting steps in order to allow subsequent steps to run. This works fine, but testing uncovered another bug, discovered by @Chris Plummer, where a crash or timeout happening after the error log is written and before the error reporter had a chance to run would lead to infinitely repeated error reports. This would be repeated until either the reporting thread runs out of stack space or until the ErrorLogTimeout hits.

      The reason for this is that, when a secondary error happens, VMError::report_and_die() is re-invoked from the signal handler in a new frame and error reporting is continued from the last error reporting step - if the crash happened inside VMError::report(), where the actual error reporting happens. However, if the crash happens in the caller function VMError::report_and_die() - specifically, after VMError::report() is called and before the log_done flag is set - we wil re-enter VMError::report_and_die and re-execute VMError::report.





            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: