Skip to content

JVM crashes with Illegal threadstate encountered: 4 #3044

@shahbaz-dev

Description

@shahbaz-dev

What version of OR-Tools and what language are you using?
Version: ortools-java-8.2.8710.jar
Language: Java

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
Routing Solver

What operating system (Linux, Windows, ...) and version?
Ubuntu - 16.04

What did you do?
We are solving CVRP with time window, capacity constraint ad pickup and deliveries constraint. It is running in production, but intermittently JVM crashes

What did you expect to see
I did not expect JVM to crash

What did you see instead?
JVM crashed

Make sure you include information that can help us debug (full error message, model Proto).

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (safepoint.cpp:712), pid=17315, tid=0x00007fa6ee74f700
#  fatal error: Illegal threadstate encountered: 4
#
# JRE version: Java(TM) SE Runtime Environment (8.0_161-b12) (build 1.8.0_161-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.161-b12 mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# 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.
#

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

Current thread (0x00007fa708108000):  JavaThread "Finalizer" daemon [_thread_in_native, id=17321, stack(0x00007fa6ee64f000,0x00007fa6ee750000)]

Stack: [0x00007fa6ee64f000,0x00007fa6ee750000],  sp=0x00007fa6ee74d9e0,  free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xacf94a]  VMError::report_and_die()+0x2ba
V  [libjvm.so+0x5000c9]  report_fatal(char const*, int, char const*)+0x59
V  [libjvm.so+0x9c4aa2]  SafepointSynchronize::block(JavaThread*)+0xb2
V  [libjvm.so+0xa7a00d]  JavaThread::check_safepoint_and_suspend_for_native_trans(JavaThread*)+0x29d
V  [libjvm.so+0x6ed243]  jni_DeleteGlobalRef+0x93
C  [libjniortools.so+0x10e68e]  std::_Sp_counted_ptr_inplace<GlobalRefGuard, std::allocator<GlobalRefGuard>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()+0x18

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.google.ortools.constraintsolver.mainJNI.delete_RoutingModel(J)V+0
j  com.google.ortools.constraintsolver.RoutingModel.delete()V+25
j  com.google.ortools.constraintsolver.RoutingModel.finalize()V+1
J 22930% C2 java.lang.ref.Finalizer$FinalizerThread.run()V (55 bytes) @ 0x00007fa6fa028f80 [0x00007fa6fa028cc0+0x2c0]
v  ~StubRoutines::call_stub

JVM crash log:
jvm_crash.txt

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions