-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the dead lock when handling SYNC_RECEIPT_TIMEOUT_EXPIRES event #779
Conversation
Can you use addEventTimer() and deleteEventTimer(), rather than the *Locked() version? The lock is already held before calling the lock function. I see the lock is recursive, but I think that's a mistake - probably a workaround for some signal handler that doesn't exist. |
@christopher-s-hall - thanks for the comments! |
Hi @christopher-s-hall , as far as I can see addEventTimer and deleteEventTimer are private so I didn't use them. |
I'd say make them public. |
OK, I will give that a go. How do I proceed on this one, should I close it and create a new pull request to include all changes? |
You can add changes on top of this patch if you like. |
This change now looks correct to me. What do you think @christopher-s-hall ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks.
…mer() During testing of gPTP (daemon_cl) robustness implementation for ELVIS-2441067 dead locks were observed when calling startSyncReceiptTimer(), specifically during SYNC_RATE_INTERVAL_TIMEOUT_EXPIRED event handling. daemon_cl was blocked when entering mentioned function after new function requestFastSyncs() had been called to speed up syncs rate (after lost synchronization). Includes also removal of uninitialized 'isGM' variable from EtherPort class, as it is defined/initialized in CommonPort class. Not fixed in OpenAVnu. See discussion: Avnu/OpenAvnu#737 Fix for the dead lock was merged into OpenAVnu/open-avb-next branch as pull request #779 with more detailed description in issue #776. See: Avnu/OpenAvnu#779 commit 9b96ee647da61ffdf06dad031d06b8b13228e697 Merge: 81783f1 1cb0125 Author: andrew-elder <aelder@audioscience.com> Date: Thu May 17 15:26:34 2018 -0400 Merge pull request #779 from freddeng/freddeng-patch-1 Fix the dead lock when handling SYNC_RECEIPT_TIMEOUT_EXPIRES event commit 15fba8379f3a9e4ff0428cc3e4292aad40e485b1 Author: freddeng <freddeng78@yahoo.com.au> Date: Wed Apr 18 22:51:57 2018 +1000 Update common_port.cpp commit 1cb01252c0b64b572c9d567a7c3a145d364dd12b Author: Fred Deng <fred.deng@soundunited.com> Date: Fri Apr 27 12:56:19 2018 +1000 Change to using addEventTimer and deleteEventTimer without lock. Issue: MGUSIN-11895 Change-Id: Ic55bf317317ac44f1f98d960225a644eec39aeef [0013_daemons_gptp_linux-fix-the-dead-lock-when-handling-SYNC_RECEIPT_TIMEOUT_EXPIRES.patch] patch applied
This is to fix issue #776 by adding timer queue lock in startSyncReceiptTimer and stopSyncReceiptTimer.