Skip to content

fix: don't kill the primary instance on large second-instance messages - #53157

Merged
MarshallOfSound merged 1 commit into
42-x-yfrom
manual-bp/42-x-y/52628
Aug 25, 2026
Merged

MarshallOfSound merged 1 commit into
42-x-yfrom
manual-bp/42-x-y/52628

Conversation

@VerteDinde

Copy link
Copy Markdown
Member

Backport of #52628

See that PR for details.

Manual backport notes: same shape as the 43-x-y backport — the only conflict was inside patches/chromium/feat_add_data_parameter_to_processsingleton.patch (one differing context line in process_singleton.h plus main-only blob hashes defeat the 3-way apply); re-anchored against this branch's Chromium with the process_singleton_posix.cc change byte-identical to main. Validated locally on Linux: e sync --3 clean, lint --patches clean, e build, the app.requestSingleInstanceLock spec block (14 passing, including the new long-arguments test), and a manual run of the singleton-data fixture with a 100 KB argv and 1–2 MB additionalData (primary stays alive and receives the full payload; with the previous patch the primary dies).

Notes: Fixed the primary instance being killed or receiving truncated arguments when a second instance passed a very long command line or large additionalData to app.requestSingleInstanceLock().

#52628)

The POSIX process singleton read a second instance's notification into
a fixed 32 KiB buffer and gave up as soon as writing to the socket would
block. Command lines or additionalData payloads beyond those limits
were either silently truncated or, when the write couldn't complete,
made the second instance kill the primary process as unresponsive.

(cherry picked from commit 1652d8e)
@VerteDinde
VerteDinde requested a review from a team as a code owner August 24, 2026 18:37
@VerteDinde VerteDinde added backport This is a backport PR semver/patch backwards-compatible bug fixes 42-x-y labels Aug 24, 2026
@MarshallOfSound
MarshallOfSound merged commit 25c8a7e into 42-x-y Aug 25, 2026
108 checks passed
@MarshallOfSound
MarshallOfSound deleted the manual-bp/42-x-y/52628 branch August 25, 2026 05:00
@release-clerk

release-clerk Bot commented Aug 25, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed the primary instance being killed or receiving truncated arguments when a second instance passed a very long command line or large additionalData to app.requestSingleInstanceLock().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

42-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants