Commit 4b12132
committed
core: fix rare "QtWebEngine OpenGL" initialization race condition in containers
Problem:
Encountered a one-time crash with the error [1].
This occurred once in dozens of executions when running inside a Linux container.
The same container image worked fine before and after, indicating a
timing-sensitive race condition rather than a configuration issue.
Root Cause:
"QtWebEngine" (Chromium-based) performs complex GPU/OpenGL initialization
involving multiple process forks and GPU driver queries. In containerized
environments, these operations can occasionally race, causing the GL version query
to fail during the brief window when the graphics context is not fully initialized.
Solution:
Added Chromium flags via "QTWEBENGINE_CHROMIUM_FLAGS" to simplify
initialization and reduce timing dependencies:
- "--disable-gpu-sandbox": removes GPU process sandboxing complexity
(reduces initialization races without disabling GPU acceleration)
- "--no-zygote": disables zygote template process, simplifying process creation
- "--disable-software-rasterizer": prevents mid-initialization fallback
during GL queries
These flags are standard practice for Chromium in containerized environments
(Docker, CI/CD) and do not impact performance or functionality. GPU hardware
acceleration remains fully enabled.
Uses "os.environ.setdefault()" to respect user-defined environment variables,
ensuring backward compatibility.
Impact:
No performance impact, should prevent the race condition from occurring again.
[1] "GL_SHADING_LANGUAGE_VERSION query failed with empty output. Unable to query GL version"
Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>1 parent e3a292e commit 4b12132
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
1183 | 1184 | | |
1184 | 1185 | | |
1185 | 1186 | | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1186 | 1196 | | |
1187 | 1197 | | |
1188 | 1198 | | |
| |||
0 commit comments