Repository navigation
MOB-43620 Start Xvfb with -noreset to stop the 56-iteration Chrome hang - #2034
Merged
Merged
Conversation
Root cause of BPT tests failing on exactly iteration 56 with "DevToolsActivePort file doesn't exist" when an engine runs 1 user: - pyvirtualdisplay starts Xvfb with stderr=PIPE and only reads it at stop() (communicate()). - With 1 user, Chrome quits before the next starts, so Xvfb hits zero clients and resets after every iteration. - On Ubuntu 24.04 (xkb-data 2.41) every reset makes xkbcomp write ~1174 B of "Could not resolve keysym" warnings to that stderr. - After ~56 resets the 64 KiB pipe is full, xkbcomp blocks on write, Xvfb waits on xkbcomp forever and stops accepting connections; every later Chrome launch hangs at X11 init and times out after 60s. Reproduced without Chrome on ubuntu:24.04 Xvfb 21.1.12: X connection #56 hangs with xkbcomp in do_wait. With -noreset, 300 connections OK. Matches cloud atop (stuck xkbcomp at the first failure) and why runs with >=2 users per engine (overlapping Chromes, no resets) never fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2034 +/- ##
=======================================
Coverage 88.24% 88.24%
=======================================
Files 75 75
Lines 21247 21247
=======================================
Hits 18748 18748
Misses 2499 2499 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pjain05
approved these changes
Oct 6, 2026
dshirsath
approved these changes
Oct 6, 2026
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.
Jira: https://perforce.atlassian.net/browse/MOB-43620
Problem
Selenium/BPT tests with 1 user per engine fail on exactly iteration 56 and every iteration after it with
session not created: DevToolsActivePort file doesn't exist. Chrome itself is fine. It hangs because the virtual display (Xvfb) has stopped responding.Root cause
VirtualDisplaystarts Xvfb through pyvirtualdisplay, which setsstderr=PIPEand reads that pipe only instop().xkbcomp. On Ubuntu 24.04 (xkb-data 2.41) that writes ~1.2 KB ofCould not resolve keysymwarnings to the unread pipe.xkbcompblocks on write, Xvfb waits for it forever, and every later Chrome hangs at X11 init.This is the "Chrome finally crashed after 55 iterations" from #1983. #1983 fixed the 50-minute hang that came after that crash. This PR fixes the crash itself.
Fix
Start Xvfb with
-noreset(Display(size=..., extra_args=["-noreset"])). Per-client X resources are still freed when each client disconnects. This is the same state Xvfb is already in for tests with ≥2 users per engine.Testing
TestVirtualDisplay.test_xvfb_started_with_noreset.SmartDisplayonubuntu:24.04:xkbcompindo_wait).-noreset, 150/150 OK.-noreset), master 83534208: 123/123 OK.Each PR must conform to Developer's Guide.
Quick checklist:
site/dat/docs/changesdirectory, one-line note of change inside (not added)🤖 Generated with Claude Code