Skip to content

JVM crash when closing ... #66

Open

Description

@supertick

Hello,
below is an hs_error log after the jvm crashes during some unit tests on OS - ubuntu 18.04

It looks to me that its trying to LinuxEventDevice.nClose but a native thread access violates ...
What is the appropriate way to shutdown the native thread, I checked the examples and it either isn't there or I missed it.
Thanks !

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000000001176, pid=20820, tid=21505
#
# JRE version: OpenJDK Runtime Environment (11.0.9.1+1) (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04)
# Java VM: OpenJDK 64-Bit Server VM (11.0.9.1+1-Ubuntu-0ubuntu1.18.04, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  0x0000000000001176
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /opt/jenkins-slave/workspace/myrobotlab_develop/core.20820)
#
# If you would like to submit a bug report, please visit:
#   https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
# 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: -Djava.library.path=libraries/native -Djna.library.path=libraries/native -javaagent:/root/.m2/repository/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/opt/jenkins-slave/workspace/myrobotlab_develop/target/jacoco.exec /opt/jenkins-slave/workspace/myrobotlab_develop/target/surefire/surefirebooter7907986175573742577.jar /opt/jenkins-slave/workspace/myrobotlab_develop/target/surefire/surefire8511870381451381463tmp /opt/jenkins-slave/workspace/myrobotlab_develop/target/surefire/surefire15144830964647509735tmp

Host: Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz, 8 cores, 31G, Ubuntu 18.04.4 LTS
Time: Mon May 31 10:07:38 2021 PDT elapsed time: 456.835851 seconds (0d 0h 7m 36s)

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

Current thread (0x00007efc1c482800):  JavaThread "Thread-27" daemon [_thread_in_native, id=21505, stack(0x00007efc0436a000,0x00007efc0446b000)]

Stack: [0x00007efc0436a000,0x00007efc0446b000],  sp=0x00007efc044697b8,  free space=1021k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0x0000000000001176
j  net.java.games.input.LinuxEventDevice.access$100(J)V+5
j  net.java.games.input.LinuxEventDevice$1.execute()Ljava/lang/Object;+11
j  net.java.games.input.LinuxDeviceTask.doExecute()V+6
j  net.java.games.input.LinuxDeviceThread.run()V+47
v  ~StubRoutines::call_stub
V  [libjvm.so+0x87f359]
V  [libjvm.so+0x87d49d]
V  [libjvm.so+0x926c7c]
V  [libjvm.so+0xe7b37f]
V  [libjvm.so+0xe77acf]
V  [libjvm.so+0xc1977e]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  net.java.games.input.LinuxEventDevice.nClose(J)V+0
j  net.java.games.input.LinuxEventDevice.access$100(J)V+5
j  net.java.games.input.LinuxEventDevice$1.execute()Ljava/lang/Object;+11
j  net.java.games.input.LinuxDeviceTask.doExecute()V+6
j  net.java.games.input.LinuxDeviceThread.run()V+47
v  ~StubRoutines::call_stub

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000001176

Register to memory mapping:

Activity

  1. Endolf commented on May 31, 2021

    @Endolf
    Collaborator

    The native plugin has shutdown hooks, so should clean up for you when the JVM shuts down. I've seen this before, but wasn't able to discover the cause at the time.

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

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