-
Bug
-
Resolution: Fixed
-
P3
-
16, 17
-
b05
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8263283 | 16.0.2 | Aleksey Shipilev | P3 | Resolved | Fixed | b01 |
JDK-8262870 | 16.0.1 | Aleksey Shipilev | P3 | Resolved | Fixed | b08 |
This manifests on the following tests:
runtime/ErrorHandling/ErrorFileRedirectTest.java
runtime/ErrorHandling/SecondaryErrorTest.java
runtime/memory/ReadFromNoaccessArea.java
runtime/Unsafe/InternalErrorTest.java
runtime/Safepoint/TestAbortVMOnSafepointTimeout.java
00:17:25 # Internal Error (/home/shade/trunks/jdk/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp:94), pid=739632, tid=739633
00:17:25 # Error: ShouldNotCall()
address os::Posix::ucontext_get_pc(const ucontext_t* uc) {
ShouldNotCallThis(); <---- crash here
return NULL; // silence compile warnings
}
I believe the generification inJDK-8255711 applies to Zero awkwardly.
Zero is awkward in the sense it is too generic for its own good. It does not have any access to crash context decoders, and that is why ucontext_* are ShouldNotCallThis()-ed. BeforeJDK-8255711, Zero error reporting code was specially crafted to avoid this, apparently.
There are at least two problems:
1. ucontext_get_pc in unimplemented, so we can special-case those for Zero. Instead of returning a bogus value from Zero implementation, I decided to just special-case at its critical use in error reporting.
2. generic VMError::report_and_die circles back at Zero's unimplemented os::fetch_frame_from_context. BeforeJDK-8255711, Zero did fatal() that avoided this trouble. The patch ignores the context to match that behavior.
runtime/ErrorHandling/ErrorFileRedirectTest.java
runtime/ErrorHandling/SecondaryErrorTest.java
runtime/memory/ReadFromNoaccessArea.java
runtime/Unsafe/InternalErrorTest.java
runtime/Safepoint/TestAbortVMOnSafepointTimeout.java
00:17:25 # Internal Error (/home/shade/trunks/jdk/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp:94), pid=739632, tid=739633
00:17:25 # Error: ShouldNotCall()
address os::Posix::ucontext_get_pc(const ucontext_t* uc) {
ShouldNotCallThis(); <---- crash here
return NULL; // silence compile warnings
}
I believe the generification in
Zero is awkward in the sense it is too generic for its own good. It does not have any access to crash context decoders, and that is why ucontext_* are ShouldNotCallThis()-ed. Before
There are at least two problems:
1. ucontext_get_pc in unimplemented, so we can special-case those for Zero. Instead of returning a bogus value from Zero implementation, I decided to just special-case at its critical use in error reporting.
2. generic VMError::report_and_die circles back at Zero's unimplemented os::fetch_frame_from_context. Before
- backported by
-
JDK-8262870 Zero error reporting is broken after JDK-8255711
- Resolved
-
JDK-8263283 Zero error reporting is broken after JDK-8255711
- Resolved
- relates to
-
JDK-8294211 Zero: Decode arch-specific error context if possible
- Resolved
-
JDK-8255711 Fix and unify hotspot signal handlers
- Resolved
- links to
-
Commit openjdk/jdk16u/bb285ce5
-
Commit openjdk/jdk/bb247b02
-
Review openjdk/jdk16u/62
-
Review openjdk/jdk/1980
(3 links to)