Skip to content

fix(ui-mode): prevent OOM crash when DEBUG logging enabled #35827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

agg23
Copy link
Contributor

@agg23 agg23 commented May 1, 2025

When UI mode is launched with enough debug logging enabled (such as DEBUG=*), Playwright would end up crashing with an OOM error after a few seconds. This has been reported several times recently (#35706, #33086, #35152, and likely more).

This change prevents any debug logging generated in the runner process from being redirected for further processing (such as sending to the UI). This does not block all debug logging from getting to the UI; logs created in workers and possibly other processes are no longer "labeled" once reaching this redirection code, and thus are still sent along. This appears to be sufficient to solve the crash. These untouched debug logs appear in the global UI mode console.

@agg23 agg23 requested a review from dgozman May 1, 2025 17:35

This comment has been minimized.

Copy link
Contributor

github-actions bot commented May 1, 2025

Test results for "tests 1"

1 failed
❌ [firefox-page] › page/page-evaluate.spec.ts:424:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18

5 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
⚠️ [chromium-library] › library/inspector/cli-codegen-pick-locator.spec.ts:35:7 › should update locator highlight @ubuntu-22.04-chromium-tip-of-tree
⚠️ [webkit-library] › library/browsercontext-viewport-mobile.spec.ts:206:5 › mobile viewport › view scale should reset after navigation @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › library/ignorehttpserrors.spec.ts:30:3 › should isolate contexts @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

39118 passed, 803 skipped
✔️✔️✔️

Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants