Skip to content

RDKEMW-20220: Fix for the crash in "WPEWebProcess" during Deepsleep scenario#182

Merged
dp0000 merged 1 commit into
support/0.2.0_8.6from
feature/RDKEMW-20220
Jun 24, 2026
Merged

RDKEMW-20220: Fix for the crash in "WPEWebProcess" during Deepsleep scenario#182
dp0000 merged 1 commit into
support/0.2.0_8.6from
feature/RDKEMW-20220

Conversation

@dp0000

@dp0000 dp0000 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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.

@dp0000 dp0000 requested a review from a team as a code owner June 24, 2026 04:43
Copilot AI review requested due to automatic review settings June 24, 2026 04:43
@dp0000 dp0000 changed the base branch from main to support/0.2.0_8.6 June 24, 2026 04:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Comment thread externals/rdk/IIarm/DeviceIARMInterface.cpp
Comment thread externals/rdk/IIarm/DeviceIARMInterface.cpp
Comment thread externals/rdk/PlayerExternalsRdkInterface.cpp
@dp0000 dp0000 merged commit 654579d into support/0.2.0_8.6 Jun 24, 2026
10 of 11 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants