Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-12201

Drools engine hangs on shutdown

    XMLWordPrintable

    Details

    • Sprint:
      Horizon 2019 - July 31st, Horizon 2019 - August 7th

      Description

      Customer reported a case where a Drools engine used in the correlator would hang on shutdown.

      Stack for the thread invoking the shutdown looks like:

      "RMI TCP Connection(42)-127.0.0.1" #10606 daemon prio=9 os_prio=0 tid=0x00007fdbc472a790 nid=0x6f1d in Object.wait() [0x00007fdba65e1000]
         java.lang.Thread.State: WAITING (on object monitor)
      	at java.lang.Object.wait(Native Method)
      	at java.lang.Object.wait(Object.java:502)
      	at org.drools.core.common.DefaultAgenda$ExecutionStateMachine.waitInactive(DefaultAgenda.java:1380)
      	at org.drools.core.common.DefaultAgenda$ExecutionStateMachine.waitAndEnterExecutionState(DefaultAgenda.java:1373)
      	at org.drools.core.common.DefaultAgenda$ExecutionStateMachine.dispose(DefaultAgenda.java:1473)
      	- locked <0x000000052a235040> (a java.lang.Object)
      	at org.drools.core.common.DefaultAgenda.dispose(DefaultAgenda.java:1224)
      	at org.drools.core.impl.StatefulKnowledgeSessionImpl.dispose(StatefulKnowledgeSessionImpl.java:497)
      	at org.opennms.netmgt.correlation.drools.DroolsCorrelationEngine.marshallStateToDisk(DroolsCorrelationEngine.java:328)
      	- locked <0x0000000531fc09d8> (a org.opennms.netmgt.correlation.drools.DroolsCorrelationEngine)
      	at org.opennms.netmgt.correlation.drools.DroolsCorrelationEngine.tearDown(DroolsCorrelationEngine.java:294)
      	at org.opennms.netmgt.correlation.Correlator.onStop(Correlator.java:167)
      

      Thread for the engine calling fireUntilHalt looks like:

      "FireTask" #269 prio=5 os_prio=0 tid=0x00007fdbc3860b30 nid=0x3c39 in Object.wait() [0x00007fdbb83ce000]
         java.lang.Thread.State: WAITING (on object monitor)
      	at java.lang.Object.wait(Native Method)
      	at java.lang.Object.wait(Object.java:502)
      	at org.drools.core.common.DefaultAgenda$ExecutionStateMachine.waitInactive(DefaultAgenda.java:1380)
      	at org.drools.core.common.DefaultAgenda$ExecutionStateMachine.waitAndEnterExecutionState(DefaultAgenda.java:1373)
      	at org.drools.core.common.DefaultAgenda$ExecutionStateMachine.toFireUntilHalt(DefaultAgenda.java:1341)
      	- locked <0x000000052a235040> (a java.lang.Object)
      	at org.drools.core.common.DefaultAgenda$RestHandler$FireUntilHaltRestHandler.handleRest(DefaultAgenda.java:1144)
      	at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1079)
      	at org.drools.core.common.DefaultAgenda.internalFireUntilHalt(DefaultAgenda.java:996)
      	at org.drools.core.common.DefaultAgenda.fireUntilHalt(DefaultAgenda.java:988)
      	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:1347)
      	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:1326)
      	at org.opennms.netmgt.correlation.drools.DroolsCorrelationEngine.lambda$initialize$3(DroolsCorrelationEngine.java:246)
      	at org.opennms.netmgt.correlation.drools.DroolsCorrelationEngine$$Lambda$146/1854387890.run(Unknown Source)
      	at java.lang.Thread.run(Thread.java:748)
      

        Attachments

          Activity

            People

            • Assignee:
              j-white Jesse White
              Reporter:
              j-white Jesse White
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: