Repository navigation
RDKB-67307 - rbus-wanmanger deadlock fix - #234
Open
dhaneesh663 wants to merge 1 commit into
Open
dhaneesh663 wants to merge 1 commit into
dhaneesh663 wants to merge 1 commit into
Conversation
RDKB-67307 [MAP-T][COX]MAP-T Device Transitions to Dual-Stack Following DHCPv6 Renewal fix: Implementing trylock and retry for deadlock
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Retry exhaustion discards connectivity updates, leaving stale status that can affect WAN failover decisions.
1 open issue
What changed in this PR
This PR addresses a WanManager/RBUS deadlock associated with MAP-T transitions after DHCPv6 renewal.
Changes:
- Replaces blocking mutex acquisition in alias lookup with bounded try-lock retries.
- Adds retry limits, delays, and a warning on exhaustion.
| File | Description |
|---|---|
| source/WanManager/wanmgr_data.c | Adds bounded mutex retries to virtual-interface alias lookup. |
Review effort: Balanced
| { | ||
| CcspTraceWarning(("%s %d: gDataMutex busy after %d retries, skipping (Alias=%s)\n", | ||
| __FUNCTION__, __LINE__, attempts, Alias)); | ||
| return NULL; |
guto86
requested changes
Oct 19, 2026
| { | ||
| if (++attempts >= GDATAMUTEX_TRYLOCK_MAX_RETRIES) | ||
| { | ||
| CcspTraceWarning(("%s %d: gDataMutex busy after %d retries, skipping (Alias=%s)\n", |
| #include "wanmgr_dslite.h" | ||
| #endif | ||
|
|
||
| #define GDATAMUTEX_TRYLOCK_MAX_RETRIES 80 |
Contributor
There was a problem hiding this comment.
This values need to be tested. We need to take RBUS timeout in consideration.
S-Parthiban-Selvaraj
requested changes
Oct 20, 2026
| #endif | ||
|
|
||
| #define GDATAMUTEX_TRYLOCK_MAX_RETRIES 80 | ||
| #define GDATAMUTEX_TRYLOCK_RETRY_DELAY_US 50000 |
Contributor
There was a problem hiding this comment.
4 seconds may not be enough, it is possible other process hold mutex more than 4 seconds.
| int lockRc; | ||
|
|
||
| if(pthread_mutex_lock(&gWanMgrDataBase.gDataMutex) == 0) | ||
| while ((lockRc = pthread_mutex_trylock(&gWanMgrDataBase.gDataMutex)) == EBUSY) |
Contributor
There was a problem hiding this comment.
We have to check how this lock failure may affect the events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

RDKB-67307 [MAP-T][COX]MAP-T Device Transitions to Dual-Stack Following DHCPv6 Renewal fix: Implementing try-lock and retry for deadlock