I am trying to use com.google.cloud.logging.logback.LoggingAppender to send logs to Stackdriver. However, when I add the appender to logback.xml, Netty crashes upon initialization. It's strange that this only occurs when the appender is configured in logback.xml. If I instead manually instantiate the logger within application code, logging works and Netty doesn't crash. Please let me know how I can help resolve this.
I have created an example repo at https://github.com/stetra/minrepro
To reproduce (you might need to set GOOGLE_APPLICATION_CREDENTIALS):
1. git clone https://github.com/stetra/minrepro.git && cd minrepro
2. mvn clean compile assembly:single
3. java -jar ./target/minrepro-1.0-SNAPSHOT-jar-with-dependencies.jar
logback.xml:
<configuration>
<!-- Crash goes away if next two lines are commented out -->
<appender name="CLOUD" class="com.google.cloud.logging.logback.LoggingAppender">
</appender>
</configuration>
Crash output:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f7ef7c2ce90, pid=11025, tid=0x00007f7f42061700
#
# JRE version: OpenJDK Runtime Environment (8.0_171-b11) (build 1.8.0_171-8u171-b11-1~deb9u1-b11)
# Java VM: OpenJDK 64-Bit Server VM (25.171-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C 0x00007f7ef7c2ce90
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/steven/minrepro2/minrepro/hs_err_pid11025.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Aborted
Full crash log: hs_err_pid11025.log
I am trying to use com.google.cloud.logging.logback.LoggingAppender to send logs to Stackdriver. However, when I add the appender to
logback.xml, Netty crashes upon initialization. It's strange that this only occurs when the appender is configured in logback.xml. If I instead manually instantiate the logger within application code, logging works and Netty doesn't crash. Please let me know how I can help resolve this.I have created an example repo at https://github.com/stetra/minrepro
To reproduce (you might need to set
GOOGLE_APPLICATION_CREDENTIALS):logback.xml:
Crash output:
Full crash log: hs_err_pid11025.log