[crac] RFR: Fix crash after shm_open failure [v2]
Dan Heidinga
heidinga at openjdk.java.net
Wed Jun 8 15:50:03 UTC 2022
On Wed, 8 Jun 2022 15:46:00 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
>> When `_restore_parameters` is not set (e.g. after shm_open failure[0]), VM may crash on NULL dereference [1]. The change makes _restore_parameter always valid.
>>
>> [0] https://github.com/openjdk/crac/blob/b2783c90a8ad81f6a8564e6cacf97a1ea0190ccd/src/hotspot/os/linux/os_linux.cpp#L6142
>> [1] https://github.com/openjdk/crac/blob/b2783c90a8ad81f6a8564e6cacf97a1ea0190ccd/src/hotspot/os/linux/os_linux.cpp#L415
>>
>>
>> shm_open: Function not implemented
>> shm_open (ignoring new args): Function not implemented
>> #
>> # A fatal error has been detected by the Java Runtime Environment:
>> #
>> # SIGSEGV (0xb) at pc=0x00007f85bce8ad37, pid=131, tid=146
>> #
>> # JRE version: OpenJDK Runtime Environment (17.0) (build 17-internal+0-adhoc..crac)
>> # Java VM: OpenJDK 64-Bit Server VM (17-internal+0-adhoc..crac, mixed mode, tiered, compressed oops, compressed class ptrs, serial gc, linux-amd64)
>> # Problematic frame:
>> # V [libjvm.so+0xc47d37] os::Linux::checkpoint(bool, JavaThread*)+0x107
>> #
>> # Core dump will be written. Default location: /tmp/core.%e.131
>> #
>> # An error report file with more information is saved as:
>> # /tmp/hs_err_pid131.log
>> #
>> # If you would like to submit a bug report, please visit:
>> # https://bugreport.java.com/bugreport/crash.jsp
>> #
>
> Anton Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>
> Handle read_from returning NULL
lgtm
-------------
Marked as reviewed by heidinga (Committer).
PR: https://git.openjdk.java.net/crac/pull/23
More information about the crac-dev
mailing list