Bug 301923
| Summary: | [GTK][WPE] WebGL support broken when there is no access to /dev/dri since GPU process was enabled by default at 301939@main | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Alberto Lopez Perez <clopez> |
| Component: | WPE WebKit | Assignee: | Carlos Garcia Campos <cgarcia> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bugs-noreply, cgarcia, dpino, mcatanzaro, vitaly |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 301177 | ||
Carlos Alberto Lopez Perez
Since 301939@main enabled GPU process for WebGL by default, the WebGL support is broken when the browser has no access to /dev/dri
This can be reproduced easily by launching MiniBrowser with any unprivileged user from your system (one that doesn't have access to /dev/dri) and then trying to load this test page file:///path/to/WebKit/Tools/Scripts/webkitpy/binary_bundling/tests/webdriver/test_webgl_support.html
Before 301939@main the test page worked and showed all the WebGL extensions available, after 301939@main it shows nothing and on the stderr console it can be see this:
Failed to open DRM node /dev/dri/renderD129: Permission denied
libEGL warning: failed to open /dev/dri/renderD129: Permission denied
libEGL warning: failed to open /dev/dri/renderD128: Permission denied
libEGL warning: failed to open /dev/dri/card1: Permission denied
libEGL warning: failed to open /dev/dri/card0: Permission denied
Failed to open DRM node /dev/dri/renderD129: Permission denied
Could not create EGL display for GPU process: no supported platform available. Aborting...
Another way to reproduce this is to run MiniBrowser inside a container (docker?) where this devices are not available.
This was detected on the nightly buildbots that create a MiniBrowser bundle and then test this bundle across a number of distributions using docker and webdriver and the test failed when tried to run the test_webgl_support.html test inside docker. See:
- https://build.webkit.org/#/builders/1321/builds/390
- https://build.webkit.org/#/builders/1322/builds/390
Inside docker there is no /dev/dri devices, neither those devices are available on other containers or CI systems.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Carlos Garcia Campos
We are supposed to fallback to web process rendering when DMA-BUF is not available, but it seems we are failing to detect that in some cases.
Carlos Garcia Campos
Does only webgl fail when running with an unprivileged user?
Carlos Garcia Campos
Wait... we don't do any checks. I'll fix it.
Carlos Garcia Campos
Pull request: https://github.com/WebKit/WebKit/pull/53394
EWS
Committed 302579@main (92a7e4d46e51): <https://commits.webkit.org/302579@main>
Reviewed commits have been landed. Closing PR #53394 and removing active labels.