[jboss-jira] [JBoss JIRA] (DROOLS-4413) fireUntilHalt continues to block after session disposed

Mario Fusco (Jira) issues at jboss.org
Fri Aug 9 11:38:01 EDT 2019


    [ https://issues.jboss.org/browse/DROOLS-4413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13769158#comment-13769158 ] 

Mario Fusco commented on DROOLS-4413:
-------------------------------------

Ok, I've reproduced the problem. This is caused by the fact that also the halt is processed on a separated thread but in the meanwhile the marshalling process somewhat interfere with it preventing it to arrive to complete halt state. I'll keep investigating this, but if you need a quick fix/workaround adding another short sleep immediately after the halt works for me (I tried with 1,000+ runs, but please confirm that this works also for you). 

> fireUntilHalt continues to block after session disposed
> -------------------------------------------------------
>
>                 Key: DROOLS-4413
>                 URL: https://issues.jboss.org/browse/DROOLS-4413
>             Project: Drools
>          Issue Type: Bug
>    Affects Versions: 7.25.0.Final
>         Environment: Local build of 7.24.0.Final with Oracle JDK 8
>            Reporter: Jesse White
>            Assignee: Mario Fusco
>            Priority: Major
>         Attachments: WhatsWrongWithMeTest.java, halt_log.txt, intellij-test-failure.png
>
>
> See attached test case that reproduces the problem.
> I'm expecting that a thread calling fireUntilHalt will exit after the session is halted and disposed, but it continues to block. If the code block that performs the marshalling is ignored, then the thread exists as expected.
> Stack is:
> {code:java}
> "Thread-1" #14 daemon prio=5 os_prio=0 tid=0x00007f5a7c683000 nid=0x1c028 in Object.wait() [0x00007f5acc170000]
>    java.lang.Thread.State: WAITING (on object monitor)
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <0x00000000ecfc67b0> (a org.drools.core.phreak.SynchronizedPropagationList)
> 	at java.lang.Object.wait(Object.java:502)
> 	at org.drools.core.phreak.SynchronizedPropagationList.waitOnRest(SynchronizedPropagationList.java:128)
> 	- locked <0x00000000ecfc67b0> (a org.drools.core.phreak.SynchronizedPropagationList)
> 	at org.drools.core.common.DefaultAgenda$RestHandler$FireUntilHaltRestHandler.handleRest(DefaultAgenda.java:1133)
> 	- locked <0x00000000ecfc67b0> (a org.drools.core.phreak.SynchronizedPropagationList)
> 	at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1074)
> 	at org.drools.core.common.DefaultAgenda.internalFireUntilHalt(DefaultAgenda.java:991)
> 	at org.drools.core.common.DefaultAgenda.fireUntilHalt(DefaultAgenda.java:983)
> 	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:1369)
> 	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:1348)
> 	at org.drools.compiler.integrationtests.WhatsWrongWithMeTest.lambda$canReturnWhenHalted$0(WhatsWrongWithMeTest.java:78)
> 	at org.drools.compiler.integrationtests.WhatsWrongWithMeTest$$Lambda$60/994541328.run(Unknown Source)
> 	at java.lang.Thread.run(Thread.java:748)
> {code}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list