-
Bug
-
Resolution: Done
-
Major
-
7.17.0.Final
-
None
-
2019 Week 05-07
-
2
-
NEW
-
NEW
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/04d58e7714844e73f68e6143e235bb55791c9888/drools-core/src/main/java/org/drools/core/time/impl/PseudoClockScheduler.java#L204
[2] https://github.com/kiegroup/drools/blob/04d58e7714844e73f68e6143e235bb55791c9888/drools-core/src/main/java/org/drools/core/time/impl/PseudoClockScheduler.java#L147
[3] https://github.com/kiegroup/drools/blob/2bf3c13de000864e7c45b9fd008af2f542674592/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/CepEspTest.java#L1933
- is cloned by
-
RHPAM-1852 Livelock in PseudoClockScheduler
- Closed