Description of problem: KieRepository is not completely thread safe, so when many threads concurrently add and remove KieModules, this can lead to a NPE. Version-Release number of selected component (if applicable): 6.2.0.ER5 How reproducible: Run IncrementalCompilationTest.testConcurrentKJarDeployment test method [1] with raised number of threads (e.g. 200). [1] https://github.com/droolsjbpm/drools/blob/a53b630f21ff8ab65de8f22d28611160ba5936d3/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L1913 Actual results: The test fails. Expected results: The test passes.
Tibor Zimányi <tzimanyi> updated the status of jira DROOLS-923 to Reopened
The NullPointerException reported by Tibor is not caused by a concurrency issue, but by the LRU cache that we introduced to workaround this other problem https://bugzilla.redhat.com/show_bug.cgi?id=1273368 That cache by default has a max size of 100 items https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieRepositoryImpl.java#L257 and increasing this size makes the NPE to disappear.
Mario Fusco <mario.fusco> updated the status of jira DROOLS-923 to Resolved