google / or-tools

Google's Operations Research tools:
https://developers.google.com/optimization/
Apache License 2.0
10.84k stars 2.09k forks source link

SIGSEGV - A fatal error has been detected by the Java Runtime Environment - docker #2330

Closed aravind-bizongo closed 2 years ago

aravind-bizongo commented 3 years ago

What version of OR-tools and what language are you using? Version: v8.1 Language: Java Distro : Docker Alpine linux

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

What operating system (Linux, Windows, ...) and version? Inside a docker container in linux host

What did you do? I just ran the algorithm after integrating it into maven spring application using a REST Api. this is working completely fine in tomcat server environment but not when i deploy it to a docker container

Here is the log file that I got

A fatal error has been detected by the Java Runtime Environment:

 SIGSEGV (0xb) at pc=0x00000000003a2ee6, pid=1, tid=0x00007efd93fa3b10

 JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
 Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
 Derivative: IcedTea 3.12.0
 Distribution: Custom build (Sat May  4 17:33:35 UTC 2019)
 Problematic frame:
 C  0x00000000003a2ee6

 Core dump written. Default location: //core or core.1

 If you would like to submit a bug report, please include
 instructions on how to reproduce the bug and visit:
   https://icedtea.classpath.org/bugzilla
 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 (0x00005653b3b40000):  JavaThread "http-nio-8080-exec-4" daemon [_thread_in_native, id=38, stack(0x00007efd93ea3000,0x00007efd93fa3ad0)]

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

Registers:
RAX=0x0000000000000000, RBX=0x00005653b311aee0, RCX=0x0000000000000000, RDX=0x2d4c4bff5b4a5741
RSP=0x00007efd93f9fa78, RBP=0x00005653b0f56c40, RSI=0x0000000000000001, RDI=0x00005653b0f56c78
R8 =0xfefefefefefefeff, R9 =0x8080808080808080, R10=0x0000000000000000, R11=0x000000000fba4984
R12=0x00005653b311aee0, R13=0x00005653b2d80f20, R14=0x0000000000000001, R15=0x0000000000000003
RIP=0x00000000003a2ee6, EFLAGS=0x0000000000010202, CSGSFS=0x0000000000000033, ERR=0x0000000000000014
  TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007efd93f9fa78)
0x00007efd93f9fa78:   00007efd919e52a8 00005653b347bb60
0x00007efd93f9fa88:   c4f936d24a8e8998 00005653af83f520
0x00007efd93f9fa98:   00007efd919e0985 00005653b311ae08
0x00007efd93f9faa8:   c4f936d24a8e8998 0000000000000001
0x00007efd93f9fab8:   00005653b311aee0 0000000000000001
0x00007efd93f9fac8:   00007efd91a704ae 00005653b2d80b20
0x00007efd93f9fad8:   00005653b2d80b20 00005653b2d7faa0
0x00007efd93f9fae8:   00005653b311aee0 00005653b2d80f20
0x00007efd93f9faf8:   00007efd919d1b28 0000000000000001
0x00007efd93f9fb08:   0000000000000008 00005653b2d81320
0x00007efd93f9fb18:   00005653b0f54900 0000000000000003
0x00007efd93f9fb28:   00007efd919d1b3d 00005653b2d81320
0x00007efd93f9fb38:   00007efd91bc0f6e 00005653b2d813a0
0x00007efd93f9fb48:   00005653b3251bc0 00005653b2d81320
0x00007efd93f9fb58:   00005653b0f56c40 00007efd930e8b48
0x00007efd93f9fb68:   00005653b0f56c40 00007efd93f9fed0
0x00007efd93f9fb78:   00005653b2d81320 00005653b0f54900
0x00007efd93f9fb88:   00007efd919e7325 00005653b0f56c40
0x00007efd93f9fb98:   00005653b0f54900 00005653b2d81320
0x00007efd93f9fba8:   00007efd93f9fc50 00007efd93f9fc68
Instructions: (pc=0x00000000003a2ee6)                                                                                                                  
0x00000000003a2ec6:                                                                                                                                    
[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xb]                                               

Register to memory mapping:                                                                                                                            

RAX=0x0000000000000000 is an unknown value                                                                                                             
RBX=0x00005653b311aee0 is an unknown value                                                                                                             
RCX=0x0000000000000000 is an unknown value                                                                                                             
RDX=0x2d4c4bff5b4a5741 is an unknown value                                                                                                             
RSP=0x00007efd93f9fa78 is pointing into the stack for thread: 0x00005653b3b40000                                                                       
RBP=0x00005653b0f56c40 is an unknown value                                                                                                             
RSI=0x0000000000000001 is an unknown value                                                                                                             
RDI=0x00005653b0f56c78 is an unknown value                                                                                                             
R8 =0xfefefefefefefeff is an unknown value                                                                                                             
R9 =0x8080808080808080 is an unknown value                                                              
R10=0x0000000000000000 is an unknown value                                                                                                             
R11=0x000000000fba4984 is an unknown value                                                          
R12=0x00005653b311aee0 is an unknown value                                                          
R13=0x00005653b2d80f20 is an unknown value                                                          
R14=0x0000000000000001 is an unknown value                                                              
R15=0x0000000000000003 is an unknown value                                                              

Stack: [0x00007efd93ea3000,0x00007efd93fa3ad0],  sp=0x00007efd93f9fa78,  free space=1010k     
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)                     
C  0x00000000003a2ee6                                                                                   

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)                                          
j  com.google.ortools.constraintsolver.mainJNI.RoutingModel_solveWithParameters(JLcom/google/ortools/constraintsolver/RoutingModel;[B)J+0
j  com.google.ortools.constraintsolver.RoutingModel.solveWithParameters(Lcom/google/ortools/constraintsolver/RoutingSearchParameters;)Lcom/google/ortools/constraintsolver/Assignment;+9
j  com.bizongo.logistics.services.ConsolidationServiceImpl.createConsolidation(Ljava/util/Map;)Ljava/lang/String;+514                                                                   
j  com.bizongo.logistics.controllers.ConsolidationController.optimise(Ljava/util/Map;)Lorg/springframework/http/ResponseEntity;+8                                                       
v  ~StubRoutines::call_stub                                                                                                                                                             
J 2458  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (0 bytes) @ 0x00007efdb3188ab7 [0x00007efdb3188a40+0x77]
J 2457 C1 sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (104 bytes) @ 0x00007efdb318f8d4 [0x00007efdb318e700+0x11d4]                     
J 5702 C2 java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (62 bytes) @ 0x00007efdb32789d4 [0x00007efdb3278920+0xb4]                                    
j  org.springframework.web.method.support.InvocableHandlerMethod.doInvoke([Ljava/lang/Object;)Ljava/lang/Object;+16                                                                             
j  org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(Lorg/springframework/web/context/request/NativeWebRequest;Lorg/springframework/web/method/support/ModelAndViewContainer;[L
j  org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(Lorg/springframework/web/context/request/ServletWebRequest;Lorg/springframework/web/method/support/Mo
j  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/springframewor
j  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/springframework/web
j  org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/Object;)Lorg/springframework/web
j  org.springframework.web.servlet.DispatcherServlet.doDispatch(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+257                                                       
j  org.springframework.web.servlet.DispatcherServlet.doService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+212                                                        
j  org.springframework.web.servlet.FrameworkServlet.processRequest(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+71                                                     
j  org.springframework.web.servlet.FrameworkServlet.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3                                                              
j  javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+149                                                                             
j  org.springframework.web.servlet.FrameworkServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+33   

Can you help me figure out which library is causing this

lperron commented 3 years ago

Library ? com.google.ortools.constraintsolver.mainJNI.RoutingModel_solveWithParameters

Can you try with 8.1 ?

aravind-bizongo commented 3 years ago

Actually I am using this third party dependancy build of or-tools, a plugin for my spring application https://github.com/panavis/google-or-tools-maven

<dependency>
   <groupId>com.panavis.open-source</groupId>
   <artifactId>google-ortools-java</artifactId>
   <version>7.8.7961</version>
</dependency>

<dependency>
   <groupId>com.panavis.open-source</groupId>
   <artifactId>ortools-linux-x86-64</artifactId>
   <version>7.8.7959</version>
</dependency>
aravind-bizongo commented 3 years ago

Library ? com.google.ortools.constraintsolver.mainJNI.RoutingModel_solveWithParameters

Can you try with 8.1 ?

I tried with 8.1 also still facing same error, I am facing this only in docker environment

Mizux commented 3 years ago

Which docker base image did you use ?

we already test against "few distro": https://github.com/google/or-tools/actions?query=workflow%3A%22Docker+CMake%22

aravind-bizongo commented 3 years ago

Which docker base image did you use ?

we already test against "few distro": https://github.com/google/or-tools/actions?query=workflow%3A%22Docker+CMake%22

I am using Docker( alpine Java)