RDKEMW-20220: Fix for the crash in "WPEWebProcess" during Deepsleep scenario#182
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent a deep-sleep wakeup crash/unresponsiveness by ensuring HDMI/HDCP event handling does not block the IARM dispatch thread, and by hardening DRM/GStreamer decryption paths against missing/invalid caps during negotiation.
Changes:
- Adds synchronization to wait briefly for negotiated sink caps before decrypting, and guards decrypt calls when caps are unavailable.
- Introduces a mutex to prevent concurrent
SetHDMIStatus()execution and adds power-transition gating for HDMI event handling. - Adds a null check before treating
GstCaps*as a valid caps object in the OCDM decrypt adapter.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| gst-plugins/drm/gst/gstcdmidecryptor.h | Adds a condition variable used to coordinate sink caps availability. |
| gst-plugins/drm/gst/gstcdmidecryptor.cpp | Initializes/clears the new condvar; signals on caps update; waits briefly for caps and avoids decrypt when caps are null. |
| externals/rdk/PlayerExternalsRdkInterface.h | Adds <mutex> include and a mutex member to serialize SetHDMIStatus(). |
| externals/rdk/PlayerExternalsRdkInterface.cpp | Uses try-lock to avoid re-entrant HDMI status updates; adds DeInitialize() attempt in an exception path. |
| externals/rdk/IIarm/DeviceIARMInterface.cpp | Adds power transition gating; dispatches HDMI/HDCP handling via detached worker threads. |
| drm/ocdm/OcdmGstSessionAdapter.cpp | Prevents calling caps APIs when caps is null. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
447
to
+452
| pInstance->SetHDMIStatus(); | ||
|
|
||
| // Dispatch to detached worker thread — do NOT block IARM dispatch thread | ||
| std::thread([pInstance]() { | ||
| pInstance->SetHDMIStatus(); | ||
| }).detach(); |
sankarimuthu
approved these changes
Jun 24, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Update done to fix the crash that happens in deep sleep wakeup scenario , where the webprocess is unresponsive.
Once the HDMI hotplug event arrived, Instead of blocking the IARM thread with SetHDMIStatus() → dsDisplayInit → broken D-Bus, the callback would have returned immediately.
The spawned worker thread would have blocked on the broken IARM Bus, but this would NOT have caused the WPE watchdog to trigger SIGFPE, because the WebProcess main thread would have remained responsive.
This is the most impactful single fix for preventing the crash scenario observed.