Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Potential bug: combi of instructions causes java crash

  • 1.  Potential bug: combi of instructions causes java crash

    Posted 10/27/15 01:51 PM

    Originally posted by: JorisK


    A specific set of instructions in a Java CP model causes a fatal crash. Please find attached a minimal working example. For demonstration purposes, I made some minor modifications to the class Facility.java, which is shipped by default as one of the example classes in CP optimizer. I've marked the lines of code I've changed/added.

    CP version: 12.6.2, Linux 64bit (default, unmodified libraries)

    Java version: 1.8.0_66

    Running the attached code results in:

    # A fatal error has been detected by the Java Runtime Environment:
    #  SIGSEGV (0xb) at pc=0x00007f4150c1dc59, pid=8054, tid=139918371522304
    # JRE version: Java(TM) SE Runtime Environment (8.0_66-b17) (build 1.8.0_66-b17)
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.66-b17 mixed mode linux-amd64 compressed oops)
    # Problematic frame:
    # C  [libcp_wrap_cpp_java1262.so+0xb65c59][thread 139917199922944 also had an error]
    [thread 139918388307712 also had an error]
      IlcCPOConflictAggregatorI::getConflictVar(IlcCPOIntVarI*)+0x79
    

    Cause of crash: I'm not entirely sure what the root cause is. At least the following "ingredients" seem to be required:

    -a variable which is not used in any of the constraints/objective

    -an IloSearchPhase

    -invocation of the 'exportModel' function.

    Admittedly, the attached example is rather artificial, but accidentally having an unused variable in your model is not uncommon, for example if, due to some bug, the indexing of a variable array is off by one.

     

    Please let me know whether you are able to reproduce the issue and/or whether you need more information.


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Potential bug: combi of instructions causes java crash

    Posted 11/02/15 09:50 AM

    Originally posted by: Petr Vilím


    Hello Joris,

    yes, it is a bug. You nailed the ingredients exactly. Variables that are used only in a search phase can cause a crash if the search phase is added after calling exportModel or dumpModel. I'm working on a fix.

    Thanks for the report! Nice minimalistic example. It will be fixed in the next version.

    Cheers, Petr


    #CPOptimizer
    #DecisionOptimization