Skip to content

Google Cloud PubSub 0.40 and google cloud logging logback 0.40 interferes and creates JRE fatal error #3057

Description

@sceee

I try to use both google-cloud-pubsub and google-cloud-logging-logback in the same project but if I include both dependencies
compile group: 'com.google.cloud', name: 'google-cloud-pubsub', version:'0.40.0-beta'
compile group: 'com.google.cloud', name: 'google-cloud-logging-logback', version: '0.40.0-alpha'
in the gradle build file, the JRE crashes with a fatal error at the line when I try to start the subscriber:

subscriber.startAsync();

subscriber is a com.google.cloud.pubsub.v1.Subscriber.

This is the excerpt of the JRE fatal error log:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffcf39642a0, pid=6540, tid=18088
#
# JRE version: Java(TM) SE Runtime Environment (9.0+11) (build 9.0.4+11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (9.0.4+11, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  0x00007ffcf39642a0
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  S U M M A R Y ------------

Command Line: -Dfile.encoding=UTF-8 -Duser.country=DE -Duser.language=de -Duser.variant my.package.App

Host: AMD Phenom(tm) II X4 965 Processor, 4 cores, 9G,  Windows 10 , 64 bit Build 16299 (10.0.16299.15)
Time: Sun Mar 18 20:30:58 2018 Mitteleurop�ische Zeit elapsed time: 4 seconds (0d 0h 0m 4s)

---------------  T H R E A D  ---------------

Current thread (0x000001d347449000):  JavaThread "Thread-0" [_thread_in_native, id=18088, stack(0x0000001293000000,0x0000001293100000)]

Stack: [0x0000001293000000,0x0000001293100000],  sp=0x00000012930fe238,  free space=1016k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0x00007ffcf39642a0

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  io.grpc.netty.shaded.io.netty.internal.tcnative.Library.aprMajorVersion()I+0
j  io.grpc.netty.shaded.io.netty.internal.tcnative.Library.initialize(Ljava/lang/String;Ljava/lang/String;)Z+31
j  io.grpc.netty.shaded.io.netty.internal.tcnative.Library.initialize()Z+3
j  io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.initializeTcNative()Z+0
j  io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>()V+137
v  ~StubRoutines::call_stub
j  io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider()Lio/grpc/netty/shaded/io/netty/handler/ssl/SslProvider;+0
j  io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(Lio/grpc/netty/shaded/io/netty/handler/ssl/SslContextBuilder;)Lio/grpc/netty/shaded/io/netty/handler/ssl/SslContextBuilder;+1
j  io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient()Lio/grpc/netty/shaded/io/netty/handler/ssl/SslContextBuilder;+3
j  io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder$NettyTransportFactory$DefaultNettyTransportCreationParamsFilterFactory.<init>(Lio/grpc/netty/shaded/io/grpc/netty/NettyChannelBuilder$NettyTransportFactory;Lio/grpc/netty/shaded/io/netty/handler/ssl/SslContext;)V+23
j  io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder$NettyTransportFactory$DefaultNettyTransportCreationParamsFilterFactory.<init>(Lio/grpc/netty/shaded/io/grpc/netty/NettyChannelBuilder$NettyTransportFactory;Lio/grpc/netty/shaded/io/netty/handler/ssl/SslContext;Lio/grpc/netty/shaded/io/grpc/netty/NettyChannelBuilder$1;)V+3
j  io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.<init>(Lio/grpc/netty/shaded/io/grpc/netty/NettyChannelBuilder$TransportCreationParamsFilterFactory;Ljava/lang/Class;Ljava/util/Map;Lio/grpc/netty/shaded/io/grpc/netty/NegotiationType;Lio/grpc/netty/shaded/io/netty/handler/ssl/SslContext;Lio/grpc/netty/shaded/io/netty/channel/EventLoopGroup;IIIJJZLio/grpc/internal/TransportTracer;)V+45
j  io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.buildTransportFactory()Lio/grpc/internal/ClientTransportFactory;+59
j  io.grpc.internal.AbstractManagedChannelImplBuilder.build()Lio/grpc/ManagedChannel;+6
j  com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel()Lio/grpc/ManagedChannel;+216
j  com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel()Lcom/google/api/gax/rpc/TransportChannel;+9
j  com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel()Lcom/google/api/gax/rpc/TransportChannel;+52
j  com.google.cloud.pubsub.v1.Subscriber.doStart()V+25
j  com.google.api.core.AbstractApiService$InnerService.doStart()V+4
j  com.google.common.util.concurrent.AbstractService.startAsync()Lcom/google/common/util/concurrent/Service;+33
j  com.google.api.core.AbstractApiService.startAsync()Lcom/google/api/core/ApiService;+4
j  com.google.cloud.pubsub.v1.Subscriber.startAsync()Lcom/google/api/core/ApiService;+1

If I remove the logback dependency, it works and the JRE does not crash so I assume there is a dependency conflict between the grpc-netty versions used by both.

Activity

  1. added
    type: questionRequest for information or clarification. Not an issue.
    api: pubsubIssues related to the Pub/Sub API.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Mar 19, 2018
  2. SergeyZadorozhniy commented on Nov 13, 2018

    @SergeyZadorozhniy

    I have reproduced it on google-cloud-logging-logback:0.68.0-alpha and google-cloud-pubsub:1.50.0.

  3. SergeyZadorozhniy commented on Nov 16, 2018

    @SergeyZadorozhniy

    io.grpc.netty.shaded.io.netty.internal.tcnative.Library.aprMajorVersion()I+0
    where aprMajorVersion is native method:
    private static native int aprMajorVersion();

    Related issue on Netty: netty/netty#8337

    Looks like cause of issue is in native library: grpc-netty-shaded-1.15.0.jar\META-INF\native\META-INF\native\io_grpc_netty_shaded_netty_tcnative_windows_x86_64.dll
    Somthing wrong with loading or calling.

  4. removed
    🚨 criticalP0 critical issue. Requires immediate fix
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Dec 3, 2018
  5. chingor13 commented on Dec 5, 2018

    @chingor13
    Contributor

    It looks like you're using java 9 and these libraries did not support Java 9. We will be supporting LTS versions of Java including Java 7, 8, and 11 (in our next release this week).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions