Repository navigation
fix(native): stop the eglInitialize flake in the render tests - #776
Merged
Merged
Conversation
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The native render tests skipped intermittently on CI with
eglInitialize failed: 0x3001(3 of the last 15 native runs, main included), and a skip fails the job.Root cause
Each
headless.NewWindowopens the default EGL display, which on Mesa's X11 platform is its own Xvfb connection, andReleasecloses it. That connection is the only client, so Xvfb regenerates the server every time a test window goes away: 63 to 66 server generations pergo test ./...run, counted from the xkbcomp lines Xvfb logs on each reset. AneglInitializethat lands while the server is resetting getsEGL_BAD_ALLOC ... xcb_connect failed(EGL_LOG_LEVEL=debug), which Gio reports as 0x3001. All 19 failures in the measurement loop were this one error.Fix
Start Xvfb with
-noreset(the screen argument stays the runner's xvfb-run default,-screen 0 1280x1024x24). No test, skip or guard changed.Measurement
Temporary loop on ubuntu-latest, full
xvfb-run go test -v ./...per iteration, countingno headless GPU:-noresetEGL_PLATFORM=surfacelessalso went 0/60, but it sidesteps X instead of fixing the reset. The loop workflow is removed from this branch.