Skip to content

fix: correct linux zygote process titles#50509

Merged
jkleinsc merged 3 commits into
electron:mainfrom
mitchchn:mitch/fix-linux-process-titles
Mar 27, 2026
Merged

fix: correct linux zygote process titles#50509
jkleinsc merged 3 commits into
electron:mainfrom
mitchchn:mitch/fix-linux-process-titles

Conversation

@mitchchn
Copy link
Copy Markdown
Member

@mitchchn mitchchn commented Mar 25, 2026

Description of Change

On Linux, Electron child processes all showed up as generic zygotes in ps aux:

mitch    1759609  2.0  0.3 1460051028 214440 ?   S<l  19:47   0:00 /home/mitch/.config/Electron Fiddle/electron-bin/current/electron /tmp/electron-fiddle-1279287-sMVygh0fH1jo --inspect --ozone-platform=wayland /home/mitch/.cache/fiddle-core/fiddles/b35b66f75612912880e4d66dd317c9b5/main.js
mitch    1759612  0.0  0.1 50920708 66004 ?      S<   19:47   0:00 /home/mitch/.config/Electron Fiddle/electron-bin/current/electron --type=zygote --no-zygote-sandbox
mitch    1759613  0.0  0.1 50920696 65672 ?      S<   19:47   0:00 /home/mitch/.config/Electron Fiddle/electron-bin/current/electron --type=zygote
mitch    1759615  0.0  0.0 50920724 14840 ?      S<   19:47   0:00 /home/mitch/.config/Electron Fiddle/electron-bin/current/electron --type=zygote
mitch    1759655  4.3  0.2 56064660 179472 ?     S<l  19:47   0:00 /home/mitch/.config/Electron Fiddle/electron-bin/current/electron --type=zygote --no-zygote-sandbox
mitch    1759661  0.1  0.1 1459874424 105480 ?   S<l  19:47   0:00 /home/mitch/.config/Electron Fiddle/electron-bin/current/electron --type=zygote

Now they show their proper types (gpu, renderer) and arguments including flags, like Chromium:

mitch    1762160  5.4  0.4 1460197916 282588 ?   S<l  19:49   0:00 /home/mitch/data/Projects/electron/src/out/Testing/electron --inspect --ozone-platform=wayland /tmp/electron-fiddle-1279287-nrTwr784BgJm /home/mitch/.cache/fiddle-core/fiddles/fffa3b930a77d2140805f58b927ab25a/main.js
mitch    1762163  0.1  0.1 51061676 74196 ?      S<   19:49   0:00 /home/mitch/data/Projects/electron/src/out/Testing/electron --type=zygote --no-zygote-sandbox
mitch    1762164  0.1  0.1 51061660 73664 ?      S<   19:49   0:00 /home/mitch/data/Projects/electron/src/out/Testing/electron --type=zygote
mitch    1762166  0.0  0.0 51061688 17084 ?      S<   19:49   0:00 /home/mitch/data/Projects/electron/src/out/Testing/electron --type=zygote
mitch    1762218  7.5  0.3 56222176 211964 ?     S<l  19:49   0:00 /home/mitch/data/Projects/electron/src/out/Testing/electron --type=gpu-process --ozone-platform=wayland --render-node-override=/dev/dri/renderD128 --enable-crash-reporter=a22a5bff-8f3b-4af2-880f-453ac5aa42e2,no_channel --user-data-dir=/home/mitch/.config/truthful-owner-accuse-p9k3a --gpu-preferences=UAAAAAAAAAAgAQAEAAAAAAAAAAAAAGAAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAA --shared-files --field-trial-handle=3,i,14101308013274626288,521187619438631028,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=DropInputEventsWhilePaintHolding,LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --pseudonymization-salt-handle=7,i,506182766847727171,559410832760408655,4 --trace-process-track-uuid=3209054329606749827
mitch    1762220  0.3  0.1 50881940 116376 ?     Sl   19:49   0:00 /home/mitch/data/Projects/electron/src/out/Testing/electron --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-GB --service-sandbox-type=none --render-node-override=/dev/dri/renderD128 --enable-crash-reporter=a22a5bff-8f3b-4af2-880f-453ac5aa42e2,no_channel --user-data-dir=/home/mitch/.config/truthful-owner-accuse-p9k3a --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14101308013274626288,521187619438631028,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=DropInputEventsWhilePaintHolding,LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --pseudonymization-salt-handle=7,i,506182766847727171,559410832760408655,4 --trace-process-track-uuid=3998329054067842808
mitch    1762232  1.2  0.2 1460023584 179472 ?   S<l  19:49   0:00 /home/mitch/data/Projects/electron/src/out/Testing/electron --type=renderer --enable-crash-reporter=a22a5bff-8f3b-4af2-880f-453ac5aa42e2,no_channel --user-data-dir=/home/mitch/.config/truthful-owner-accuse-p9k3a --app-path=/tmp/electron-fiddle-1279287-nrTwr784BgJm --enable-sandbox --ozone-platform=wayland --lang=en-GB --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=4 --time-ticks-at-unix-epoch=-1774386820747858 --launch-time-ticks=95740213746 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14101308013274626288,521187619438631028,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=DropInputEventsWhilePaintHolding,LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --pseudonymization-salt-handle=7,i,506182766847727171,559410832760408655,4 --trace-process-track-uuid=4787603778528935789

The fix is to pass the original argv pointer through to Chromium, since libuv copies it to a different buffer and that breaks Chromium's integrity check when setting the process information.

Refs #50462.

Checklist

Release Notes

Notes: Fixed Electron child process titles on Linux so they show their types (render, gpu, etc.) and complete command-line arguments and flags in ps aux.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Mar 25, 2026
Copy link
Copy Markdown
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice & simple. 👍

@ckerr ckerr added semver/patch backwards-compatible bug fixes target/42-x-y PR should also be added to the "42-x-y" branch. labels Mar 26, 2026
Copy link
Copy Markdown
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Do we need a similar change on macOS

int ElectronMain(int argc, char* argv[]) {
?

Comment thread shell/app/electron_main_linux.cc
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Mar 27, 2026
Copy link
Copy Markdown
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jkleinsc
Copy link
Copy Markdown
Member

Merging as CI failure unrelated to PR change.

@jkleinsc jkleinsc merged commit b41ec65 into electron:main Mar 27, 2026
62 of 63 checks passed
@release-clerk
Copy link
Copy Markdown

release-clerk Bot commented Mar 27, 2026

Release Notes Persisted

Fixed Electron child process titles on Linux so they show their types (render, gpu, etc.) and complete command-line arguments and flags in ps aux.

@trop
Copy link
Copy Markdown
Contributor

trop Bot commented Mar 27, 2026

I have automatically backported this PR to "42-x-y", please check out #50533

@trop trop Bot added in-flight/42-x-y merged/42-x-y PR was merged to the "42-x-y" branch. and removed target/42-x-y PR should also be added to the "42-x-y" branch. in-flight/42-x-y labels Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/42-x-y PR was merged to the "42-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants