Skip to content

[DCV] Fix Xdcv segfault on RHEL9 and Rocky9 caused by DCV attempting GL initialization when GPU acceleration is not supported.#3156

Open
gmarciani wants to merge 1 commit intoaws:developfrom
gmarciani:wip/mgiacomo/3160/fix-dcv-g5g-0331-1
Open

[DCV] Fix Xdcv segfault on RHEL9 and Rocky9 caused by DCV attempting GL initialization when GPU acceleration is not supported.#3156
gmarciani wants to merge 1 commit intoaws:developfrom
gmarciani:wip/mgiacomo/3160/fix-dcv-g5g-0331-1

Conversation

@gmarciani
Copy link
Copy Markdown
Contributor

@gmarciani gmarciani commented Mar 31, 2026

Description of changes

Disable DCV-GL on instance types not supporting GPU acceleration.
Before this change we used to keep DCV-GL always-on in DCV configuration even for instance types not supporting GPIU acceleration, such as g5g. In certain OSs. This was causing intermittent failures in the setup of dcv connection
Fix Xdcv segfault on RHEL9 and Rocky9 caused by DCV attempting GL initialization when GPU acceleration is not supported. We did it by explicitly disabling dcv-gl in dcv.conf on instances where GPU acceleration is not supported, preventing Xdcv from segfaulting during GLX initialization. The fix is applied to all OSs, because it is correct to keep dcv-gl disabledeven if on other OSs it seems that

Tests

  • PR checks (include tests covering this change)
  • ONGOING test_dcv_configuration executed on all OSs

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@gmarciani gmarciani added the 3.x label Mar 31, 2026
@gmarciani gmarciani marked this pull request as ready for review April 10, 2026 18:54
@gmarciani gmarciani requested review from a team as code owners April 10, 2026 18:55
@gmarciani gmarciani force-pushed the wip/mgiacomo/3160/fix-dcv-g5g-0331-1 branch 2 times, most recently from b559c73 to c7e5c79 Compare April 10, 2026 19:02
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.65%. Comparing base (25ced25) to head (c7e5c79).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3156   +/-   ##
========================================
  Coverage    75.65%   75.65%           
========================================
  Files           24       24           
  Lines         2481     2481           
========================================
  Hits          1877     1877           
  Misses         604      604           
Flag Coverage Δ
unittests 75.65% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

# second that are sent to the client. A higher value consumes more bandwidth
# and resources. By default it is set to 25. Set to 0 for no limit
#target-fps = 30
<% unless node['cluster']['dcv']['is_graphic_instance'] %>
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.

IS this an attribute we set, i cant find it being mentioned anywhere so we add these display-encodes for all instances regardless it is GPU or not? Or is this an ExtraChefAttribute?

it { should be_mode 0755 }

unless instance.graphic? && instance.nvidia_installed? && instance.dcv_gpu_accel_supported?
its('content') { should match /enable-gl-in-virtual-sessions\s*=\s*"always-off"/ }
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.

Can you also add the check for display-encoders?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Addressed

…GL initialization even when GPU acceleration is not supported.

To prevent Xdcv from segfaulting during GLX initialization, we disabled in dcv.conf the use of dcv-gl (parameter enable-gl-in-virtual-sessions) and hardware encoding (parameter display-encoders) for instances where GPU acceleration is not supported.
@gmarciani gmarciani force-pushed the wip/mgiacomo/3160/fix-dcv-g5g-0331-1 branch from c7e5c79 to a540e27 Compare April 15, 2026 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants