Commit b2370a0
committed
RDKEMW-15927 ,RDKEMW-15007 : [APACA/Xione DE] rbus self-deadlock in XConf privacy mode fetch causing ~188s T2 init delay
Reason for change: When UserSettings sets privacy mode to DO_NOT_SHARE during boot,
the rbus SET handler (t2PropertyDataSetHandler) runs synchronously
on the single rbus callback thread — executing deleteAllProfiles()
with pthread_join, disk I/O, and XConf client restart.
The restarted XConf thread calls appendRequestParams() which uses
getParameterValue(PRIVACYMODES_RFC) to fetch privacy mode. This
issues rbus_get() on T2's own bus handle, requiring the same rbus
callback thread that is already blocked processing the SET handler.
This creates a self-deadlock with a 15s rbus timeout per attempt,
compounded by XCONF_RETRY_TIMEOUT (180s), stalling T2 initialization.
Cascading effect: While T2 is stalled, external callers (e.g.
WPEFramework SystemServices plugin) invoking t2_event_s() block
15s each on rbus_getUint(Telemetry.OperationalStatus), delaying
the dispatch thread by ~188s and blocking sendNotify() for
EVT_ONSYSTEMPOWERSTATECHANGED.
Fix:
- xconfclient.c: Replace getParameterValue(PRIVACYMODES_RFC) with
direct getPrivacyMode() call from privacycontrol library. The
platform implementation (provided via meta layer bbappend) reads
from a local in-memory cache (PRIVACY_STATE), with fallback to
Thunder JSON-RPC (local HTTP) and persistent storage — none of
which use rbus, eliminating the self-deadlock.
`
- xconf-client/Makefile.am: Add privacycontrol include path and
build dependency when IS_PRIVACYCONTROL_ENABLED is set.
- telemetry_busmessage_sender.c: Add fast-fail file marker check
(T2_COMPONENT_READY) before rbus_getUint() in isCachingRequired()
to avoid 15s blocking timeout when T2 is not yet ready.
Test Procedure: please refer the ticket comments
Risks: Medium
Signed-off-by: Thamim Razith <ThamimRazith_AbbasAli@comcast.com>1 parent 31778cc commit b2370a0
3 files changed
Lines changed: 23 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
666 | 673 | | |
667 | 674 | | |
668 | 675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
503 | 506 | | |
504 | 507 | | |
505 | 508 | | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
522 | 516 | | |
523 | 517 | | |
524 | 518 | | |
| |||
0 commit comments