Skip to content

A fatal error has been detected by the Java Runtime Environment #9167

@liaowucisheng

Description

@liaowucisheng

我使用maven构建了一个Java grpc配置TLS的demo(代码与 https://github.com/grpc/grpc-java/blob/v1.46.0/examples/example-tls/pom.xml 相似),运行时遇到了JRE异常


#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffb74cf09d0, pid=13004, tid=7316
#
# JRE version: OpenJDK Runtime Environment JBR-11.0.11.9-1341.60-jcef (11.0.11+9) (build 11.0.11+9-b1341.60)
# Java VM: OpenJDK 64-Bit Server VM JBR-11.0.11.9-1341.60-jcef (11.0.11+9-b1341.60, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  0x00007ffb74cf09d0
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# D:\Java_code\grpc-security-demo\hs_err_pid13004.log

我尝试将JDK版本从8切换到11后,依旧存在该问题

定位BUG

问题出在 HelloWorldServerTls.getSslContextBuilder() 的

return GrpcSslContexts.configure(sslClientContextBuilder,
                SslProvider.OPENSSL);

在GrpcSslContexts.configure()中的:

if (OpenSsl.isAlpnSupported()) {
          apc = NPN_AND_ALPN;
        }

请问这是 io.grpc.netty.GrpcSslContexts 的BUG吗?
如何解决这个问题?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions