[rules-users] Potential Deadlock using fireUntilHalt and signalEvent

mardo mardo at abicola.de
Tue May 18 08:23:50 EDT 2010


Hi there,

I am facing the following situation: In a few words, I have the following
separate Threads running:

- a fireUntilHalt() on the StatefulKnowledgeSession --> Thread-1 in the
picture
- a recurrent insertion of events into the knowledge base --> Thread-main in
the picture
- a custom asynchroneous WorkItemHandler, which does some fake work and then
signalizes completion to the flow engine (Threads 3&4 in the picture).


It is often the case that my program runs into a deadlock. 

My impression is, that fireUntilHalt() (Thread1) gets the synchronized
monitor on AbstractWorkingMemory.actionQueue in line 1411 , while the
WorkItemManager (Thread3) gets the monitor on NamedEntryPoint in line 120.

When fireUntilHalt() then tries to get the monitor on NamedEntryPoint in
line 260, while the WorkItemManager tries to get the monitor on
AbstractWorkingMemory.actionQueue in line 1411, we have a deadlock.


Please correct me if there is any misunderstanding from my side regarding
the synchronization concepts.

Thanks and best 

Markus


 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100518/c1ab9f75/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic.jpg
Type: image/jpeg
Size: 174476 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20100518/c1ab9f75/attachment.jpg 


More information about the rules-users mailing list