| Summary: | Race condition iterating the ksessions created from a kbase | ||
|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Mario Fusco <mfusco> |
| Component: | BRE | Assignee: | Mario Fusco <mfusco> |
| Status: | CLOSED EOL | QA Contact: | Marek Winkler <mwinkler> |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 6.3.0 | CC: | etirelli, lpetrovi, mfusco, rrajasek |
| Target Milestone: | CR1 | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-27 19:03:25 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Mario Fusco
2016-04-12 12:31:37 UTC
Fixed on master by https://github.com/droolsjbpm/drools/commit/f8e96ef7cf8070f4ceac941b7727c9dcf3455322 Cherry-picked to 6.4.x by https://github.com/droolsjbpm/drools/commit/1d91b8dd5 It seems that the ConcurrentModificationException can still appear if you iterate the list of KieSessions obtained from KieBase.getKieSessions() and dispose them, for instance:
for (KieSession kieSession : kieBase.getKieSessions()) {
kieSession.dispose();
}
Please see PR with test: https://github.com/droolsjbpm/drools/pull/761
This used to work in BxMS 6.3.0 ER1 (probably before DROOLS-1110).
There is also a workaround by copying the KieSessions collection before iterating it, such as:
Collection<KieSession> kieSessions = new ArrayList<KieSession>();
kieSessions.addAll(this.kieBase.getKieSessions());
for (KieSession kieSession : kieSessions) {
kieSession.dispose();
}
Is this change in behavior expected for 6.3 product? (If so, we must document it.)
Fixed on master by https://github.com/droolsjbpm/drools/compare/8eadcaa...a62d5e9 Cherry-picked to 6.4.x branch with https://github.com/droolsjbpm/drools/compare/58ddfd1...a1f989f |