]
Tibor Zimányi updated DROOLS-3573:
----------------------------------
Issue Type: Bug (was: Enhancement)
Livelock in PseudoClockScheduler
--------------------------------
Key: DROOLS-3573
URL:
https://issues.jboss.org/browse/DROOLS-3573
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.17.0.Final
Reporter: Tibor Zimányi
Assignee: Tibor Zimányi
Priority: Major
When running test with pseudo clock and fireUntilHalt, it could end up in a livelock,
where a while loop never ends [1]. The main problem in [1] is the isCancel() if statement.
Current synchronization doesn't block cancelling the item during ongoing
runCallBacksAndIncreaseTimer method call with [2]. That causes a livelock, because new
item is not read in the loop, therefore it iterates over the same item again and again.
This can be tested by running CepEspTest.testEventExpirationInSlidingWindow [3] more times
in a row till it fails (it always fails after some time).
I will create a PR for this.
[1]
https://github.com/kiegroup/drools/blob/04d58e7714844e73f68e6143e235bb557...
[2]
https://github.com/kiegroup/drools/blob/04d58e7714844e73f68e6143e235bb557...
[3]
https://github.com/kiegroup/drools/blob/2bf3c13de000864e7c45b9fd008af2f54...