[jboss-jira] [JBoss JIRA] (DROOLS-4565) MVELDialectRuntimeData is not thread safe
Timo Gutjahr (Jira)
issues at jboss.org
Fri Sep 27 04:56:00 EDT 2019
[ https://issues.jboss.org/browse/DROOLS-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13790033#comment-13790033 ]
Timo Gutjahr commented on DROOLS-4565:
--------------------------------------
Hi, I'm afraid we don't have a reproducer. We found the problem in our integration tests. When analyzing the problem we compared a serialized broken KB with a working KB and found that the set in MVELDialectRuntimeData contains one less element. The missing element was a MVELObjectClassFieldReader. We could make this observation with 3 different KBs. Whereby the problem occurs only very rarely.
> MVELDialectRuntimeData is not thread safe
> -----------------------------------------
>
> Key: DROOLS-4565
> URL: https://issues.jboss.org/browse/DROOLS-4565
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.16.0.Final
> Environment: Java 11.0.2
> Different OS
> Reporter: Timo Gutjahr
> Assignee: Mario Fusco
> Priority: Major
> Attachments: ForkJoinPool-1-worker-1.txt, NPE.txt, main.txt
>
>
> MVELDialectRuntimeData#mvelReaders is accessed concurrently but is not thread safe due to the usage of a HashSet. This may cause lost updates. (See [^ForkJoinPool-1-worker-1.txt] and [^main.txt] )
> If this happens and the kie base is serialized and deserialized it results in a NullPointerException at runtime. (See [^NPE.txt] )
> We observed that the entries in this Set (mvelReaders) are serialized and important for the deserialization step because they contain information about transient objects that have to be re-initialized after deserialization.
> While losing this information due to concurrent access does not cause problems during compilation, serialization and deserialization of a kie base, they may cause NullPointerExceptions at runtime when transient fields remain uninitialized.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list