Bug #159

Deadlock in the SimpleDriver when Exception is thrown

Added by Stefano Lenzi almost 6 years ago. Updated almost 6 years ago.

Status:Closed Start date:10/23/2012
Priority:Urgent Due date:
Assignee:Stefano Lenzi % Done:


Category:zigbee.CC2530.driver Spent time: -
Target version:org.aaloa.zb4osgi.zigbee.CC2530.driver-1.X
Has a patch:No Has license agreement signed:No


If an exception is thrown between a waitAndLock3WayConversation(ZToolPacket) and unLock3WayConversation(ZToolPacket) the next thread trying to acquire the lock for the same type of ZToolPacket will go in starvation, because the first thread who didn't catch the exception left the method without unlocking the resource by invoking unLock3WayConversation(ZToolPacket).

The best solution will be to include all the couple in a try .. catch all statement but most of the time the exception is generated inside the sendSynchrouns(HWHighLevelDriver,ZToolPacket) method thus we catch the exception there and we return null value because the communication failed and there is no ZToolPacket to handle

Related issues

related to Bug #151: Identify attribute value problem Closed 10/22/2012

Associated revisions

Revision 564
Added by Stefano Lenzi almost 6 years ago

Better log messages for identifying deadlocks
Fixed deadlock issue when exception thrown by sendSynchrouns method ( refs #159 )


#1 Updated by Stefano Lenzi almost 6 years ago

  • Status changed from In Progress to Closed

The fix seems to be working

Also available in: Atom PDF