SegFault when calling ObjectiveValue or hasObjective #2984
Replies: 3 comments
-
I think our current wrapper implementation is not robust to "multiple solves" in the same process when using Java... do you know which JDK is installed on your machine ? also v7.7 seems quite old did you try the last v8.0 release ? |
Beta Was this translation helpful? Give feedback.
-
can be related to #2091 |
Beta Was this translation helpful? Give feedback.
-
The JDK I run on is 14. Interesting. I run it sequentially in a loop where in each step of the loop a new problem gets loaded, the solver is run and the result is collected. Would that still cause issues with the GC? I'll try to upgrade to V8.0 as well. (I am using Maven, so I hope it gets uplaoded to Maven Central soon!) |
Beta Was this translation helpful? Give feedback.
-
What version of OR-tools and what language are you using?
Version: v7.7.7810
Language: Java
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
Routing
What operating system (Linux, Windows, ...) and version?
MacOS
I am not sure what is going on. I am running the library on a dozen or so datasets and at some point it crashes due to a SegFault. It always happens when I do
assignment.objectiveValue()
as is evident by the JVM crash log:Note that this is after OR-Tools is done solving so
assignment
is nevernull
. While this is odd I try to be more cautious and add ahasObjective()
check before retrieving the objective. That however seems to cause the following crash:I have only taken the top part of the crash for brevity, but I can attach the full log if desired.
It is hard for me reproduce as it doesn't occur consequently with a single dataset. Rather, whilst running for several datasets sequentially, it crashes somewhere along the line. When I then try to reproduce it using that specific dataset, it runs just fine.
Also based on my observations this somehow only occurs when I run it locally and doesn't occur when I run it on a linux machine as part of our CI/CD, so far at least.
Is there a bug somewhere that cause this crash to happen locally and only when calling
hasObjective()
orobjectiveValue()
?Beta Was this translation helpful? Give feedback.
All reactions