[
http://jira.jboss.com/jira/browse/JBPM-1071?page=comments#action_12383167 ]
Jiri Pechanec commented on JBPM-1071:
-------------------------------------
Hi,
the exception throws is
org.jbpm.JbpmException: couldn't execute org.jbpm.command.SignalCommand@715c2843
at org.jbpm.command.impl.CommandServiceImpl.execute(CommandServiceImpl.java:73)
at org.jpbm.exploratory.Signalist.run(Signalist.java:30)
Caused by: org.jbpm.JbpmException: couldn't signal token 'Token(/)' : node
'EndState(end-state1)' doesn't have a default transition
at org.jbpm.graph.exe.Token.signal(Token.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$9af9b4e6.signal(<generated>)
at org.jbpm.command.SignalCommand.execute(SignalCommand.java:91)
at org.jbpm.command.impl.CommandServiceImpl.execute(CommandServiceImpl.java:71)
... 1 more
Which means that other threads are isgnalling process when it is in the end state.
But this is not a problem I am trying to point out.
The problem is that the same node is executed 4 times from different threads and all
changes made are successfully comitted.
IMHO the correct semantics is that only one thread executes each action (each node). The
rest of threads will either throw something like concurrent access exception or will be
used to signal in the next wait states.
According to content of the exception I can pretty accurately suppose that
4 threads executed Action 2, commited
3 threads executed transition to end state, probably committed
13 threads failed as there is no next transition
What I suppose is to have
1 thread executed Action 2, commited
3 thread executed Action 2, fail and rollback
1 thread executed transition to end state, committed
2 threads executed transition to end state, fail and rollback
13 threads failed as there is no next transition
or
1 thread executed Action 2, commited
1 thread executed transition to end state, committed
18 threads failed as there is no next transition
Possible problem in concurrent signalling from multiple threads
---------------------------------------------------------------
Key: JBPM-1071
URL:
http://jira.jboss.com/jira/browse/JBPM-1071
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM jPDL 3.2.2
Environment: Linux 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 14:56:37 EDT 2007 x86_64
x86_64 x86_64 GNU/Linux
MySQL 5.0.22
Reporter: Jiri Pechanec
Assigned To: Tom Baeyens
Priority: Critical
Attachments: expl.tar.gz
Attached is a simple test case that
1) Deploys process definition with two nodes
2) Starts the process instance that will go to the wait state on first node
3) Starts 20 threads that tries concurrently signal the same process instance
4) The second node writes a record to the database
The test case needs to be executed multiple times to see the incorrect behaviour.
This is an example of run output
Isol 8
Action 1
Action 2
Action 2
Action 2
Action 2
Action 2 1
Action 2 1
Action 2 1
Action 2 1
Signalist 5
Signalist 6
Signalist 8
Signalist 12
Signalist 7
Signalist 13
Signalist 14
Signalist 15
Signalist 9
Signalist 16
Signalist 17
Signalist 18
Signalist 4
Success 7
Failure 13
Explanation of the outcome
4 threads successfully executed the node action including database operation. All
database opeartion were comitted (4 new records were created)
3 threads successfully executed the signal operation but no real action was performed
13 threads attempted to execute the signal operation but ended with an exception
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira