-
Bug
-
Resolution: Done
-
Major
-
jBPM 3.2.11
-
None
If 2 threads concurrently call Token#signal() and ContextThread#setVariable() on the same process instance, the following Exceptions may be thrown.
java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.get(Unknown Source)
at org.jbpm.logging.exe.LoggingInstance.addLog(LoggingInstance.java:65)
at org.jbpm.graph.exe.Token.addLog(Token.java:380)
at org.jbpm.context.exe.variableinstance.StringInstance.setObject(StringInstance.java:42)
at org.jbpm.context.exe.VariableInstance.setValue(VariableInstance.java:122)
at org.jbpm.context.exe.VariableInstance.create(VariableInstance.java:69)
at org.jbpm.context.exe.VariableContainer.setVariableLocally(VariableContainer.java:171)
at org.jbpm.context.exe.VariableContainer.setVariable(VariableContainer.java:50)
at org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:205)
at org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:196)
at sample.JbpmTest$ContextThread.run(JbpmTest.java:141)
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.jbpm.logging.exe.LoggingInstance.addLog(LoggingInstance.java:65)
at org.jbpm.graph.exe.Token.addLog(Token.java:380)
at org.jbpm.context.exe.variableinstance.StringInstance.setObject(StringInstance.java:42)
at org.jbpm.context.exe.VariableInstance.setValue(VariableInstance.java:122)
at org.jbpm.context.exe.VariableInstance.create(VariableInstance.java:69)
at org.jbpm.context.exe.VariableContainer.setVariableLocally(VariableContainer.java:171)
at org.jbpm.context.exe.VariableContainer.setVariable(VariableContainer.java:50)
at org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:205)
at org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:196)
at sample.JbpmTest$ContextThread.run(JbpmTest.java:141)
java.lang.NullPointerException
at org.jbpm.logging.exe.LoggingInstance.addLog(LoggingInstance.java:66)
at org.jbpm.graph.exe.Token.addLog(Token.java:380)
at org.jbpm.context.exe.VariableInstance.create(VariableInstance.java:66)
at org.jbpm.context.exe.VariableContainer.setVariableLocally(VariableContainer.java:171)
at org.jbpm.context.exe.VariableContainer.setVariable(VariableContainer.java:50)
at org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:205)
at org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:196)
at sample.JbpmTest$ContextThread.run(JbpmTest.java:141)
It's about the atomicity of org.jbpm.logging.exe.LoggingInstance.compositeLogStack operation.
Attached a proposal patch.