Skip to main content

deadlock avoidance

3 replies [Last post]
cing
Offline
Joined: 2006-03-06
Points: 0

as we known when deadlocks happend discribed in http://forums.java.net/jive/thread.jspa?messageID=119619, i found that deadlocks may happen when child sbb incrise or decrease attachmentCounts. may be we can think about some way to aboid this:
1.add a deadlock prevention system
2.deliver events using same queue excutor for all the sbb in one sbb tree
3.modify the attachmentCount, not accessed serial

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
eduardomartins
Offline
Joined: 2005-10-10
Points: 0

I was not aware of the specified deadlock problem, a deep root sbb entity analysis is needed to detect why it happened, I can identify some dangerous code there like thread sleeping, ACI saving in CMPs, reentrant sbbs (root->child->root) but as I "said" a complete debug is needed. SLEE serializes events for the same root sbb entity so if an event handling blocks to much ...

Regarding your claims of creating another deadlock situation, can you please explain better?

Eduardo Martins
PT Inovação

cing
Offline
Joined: 2006-03-06
Points: 0

sorry for my bad explan, but the deadlock happend too rerely, i even cannot let the same deadlock appear the second time. i found when child sbbs incrementAttachmentCount or decrementAttachmentCount, it also need to entrant root sbb to let the root also incre or decre its attachment count. this is like root->child->root. since the events in a serivce always process serial, maybe we make it serial does not block so much if we enlarge the EXECUTOR_POOL_SIZE.

ivelin
Offline
Joined: 2003-07-13
Points: 0

I think I understand the problem and know how to fix it. Thanks for everyone's input. Follow issue 129:
https://mobicents.dev.java.net/issues/show_bug.cgi?id=129