Skip to content

Commit eb5fe56

Browse files
misc: suppress Failed to adjust OOM score of renderer errors from terminal (#31521)
* misc: suppress Failed to adjust OOM score of renderer errors from terminal * changelog entry
1 parent f62a65f commit eb5fe56

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

cli/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ _Released 4/22/2025 (PENDING)_
99

1010
**Misc:**
1111

12+
- Suppress benign warnings that reference OOM score of renderer. Addresses [#29563](https://github.com/cypress-io/cypress/issues/29563). Addressed in [#31521](https://github.com/cypress-io/cypress/pull/31521).
1213
- The UI of the reporter and URL were updated to a darker gray background for better color contrast. Addressed in [#31475](https://github.com/cypress-io/cypress/pull/31475).
1314
- Fixed an issue where the error message output when attempting to install Cypress on an unsupported architecture included an outdated documentation link to Cypress system requirements. Fixes [#31512](https://github.com/cypress-io/cypress/issues/31512).
1415

cli/lib/exec/spawn.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ const readline = require('readline')
1616
const isXlibOrLibudevRe = /^(?:Xlib|libudev)/
1717
const isHighSierraWarningRe = /\*\*\* WARNING/
1818
const isRenderWorkerRe = /\.RenderWorker-/
19+
// This is a warning that occurs when running in a container on Linux.
20+
// https://github.com/cypress-io/cypress/issues/29563
21+
// Example:
22+
// [437:1212/125803.148706:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 610: Permission denied (13)
23+
const isOOMScoreWarningRe = /Failed to adjust OOM score of renderer with pid/
1924

2025
// Chromium (which Electron uses) always makes several attempts to connect to the system dbus.
2126
// This works fine in most desktop environments, but in a docker container, there is no dbus service
@@ -100,6 +105,7 @@ const GARBAGE_WARNINGS = [
100105
isXlibOrLibudevRe,
101106
isHighSierraWarningRe,
102107
isRenderWorkerRe,
108+
isOOMScoreWarningRe,
103109
isDbusWarning,
104110
isCertVerifyProcBuiltin,
105111
isHostVulkanDriverWarning,

cli/test/lib/exec/spawn_spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ describe('lib/exec/spawn', function () {
9999
[78887:1023/114920.074882:ERROR:debug_utils.cc(14)] Hit debug scenario: 4
100100
101101
[18489:0822/130231.159571:ERROR:gl_display.cc(497)] EGL Driver message (Error) eglQueryDeviceAttribEXT: Bad attribute.
102+
103+
[437:1212/125803.148706:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 610: Permission denied (13)
102104
`
103105

104106
const lines = _
@@ -124,6 +126,10 @@ describe('lib/exec/spawn', function () {
124126
it('returns true for GLX driver errors', () => {
125127
expect(spawn.isGarbageLineWarning('glx: failed to create drisw screen')).to.be.true
126128
})
129+
130+
it('returns true for OOM score adjustment warnings', () => {
131+
expect(spawn.isGarbageLineWarning('[437:1212/125803.148706:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 610: Permission denied (13)')).to.be.true
132+
})
127133
})
128134

129135
context('.start', function () {

0 commit comments

Comments
 (0)