JDK-8065895 : Synchronous signals during error reporting may terminate or hang VM process
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-11-25
  • Updated: 2024-05-27
  • Resolved: 2015-02-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u311Fixed 9 b52Fixed
Related Reports
Relates :  
Relates :  
Description
When a synchronous error signal happens during error reporting (when writing the hs-err file), VM may die or hang. Secondary signal handling (which would take care of cancelling the step and continuing error reporting with the next step) does not always work correctly. This results in empty or half-empty hs-err files. 

Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk8u-dev/pull/39 Date: 2022-04-19 13:17:45 +0000
19-04-2022

Adding jdk8u-needs-pr. This fix needs to be rebased on to the current GitHub 8u-dev repository - https://github.com/openjdk/jdk8u-dev - and reviewed there before being approved and integrated.
14-04-2022

8u code review: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-July/014133.html Have been reviewed by the author @stuefe (not a jdk8u reviewer)
04-08-2021

URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/6bfc40057b3f User: lana Date: 2015-02-24 04:55:29 +0000
24-02-2015

Regression test was accidentally omitted and is being pushed via JDK-8072575.
05-02-2015

URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/6bfc40057b3f User: dholmes Date: 2015-02-05 01:43:06 +0000
05-02-2015

Some more detaols: The issues occur if the VM crashes with an error signal and, within VmError::report_and_die(), crashes again with another signal. Example: VM crashes with SIGILL (e.g. in compiled code) and again with SIGSEGV during error reporting. This will immediately abort or hang the process, depending on the OS. Cause: During VmError::report_and_die(), all signals but the original error signal are blocked. But synchronous error signals (SIGILL, SIGSEGV, SIGBUS, SIGFPE) cannot be blocked. If they are triggered while being blocked, the process will immediately die or hang. Resolution: unblock and handle all synchronous error signals in the secondary signal handler. There is a fix in work, which is currently under discussion in hotspot-runtime-dev: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2014-November/013346.html
28-11-2014

Is there a proposal to fix this? Error reporting attempts to do a whole bunch of things that are not async-signal-safe, so a secondary signal can easily lead to hangs or crashes.
25-11-2014