Skip to content

fix: handle a null pending call in dbus::ObjectProxy - #55292

Merged
MarshallOfSound merged 3 commits into
45-x-yfrom
trop/45-x-y-bp-fix-handle-a-null-pending-call-in-dbus-objectproxy-1792785461759
Oct 24, 2026
Merged

MarshallOfSound merged 3 commits into
45-x-yfrom
trop/45-x-y-bp-fix-handle-a-null-pending-call-in-dbus-objectproxy-1792785461759

Conversation

@trop

@trop trop Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Backport of #55236

See that PR for details.

Notes: Fixed a crash on Linux when a D-Bus method call was made on a disconnected bus.

trop Bot and others added 3 commits October 23, 2026 19:57
dbus_connection_send_with_reply() can succeed with a null
DBusPendingCall when the connection is already disconnected.
ObjectProxy::StartAsyncMethodCall() then passes it to
dbus_pending_call_set_notify(), which fails a libdbus argument check and
aborts the process. This made the app spec "when a D-Bus bus goes away >
exits cleanly instead of crashing" end in SIGABRT on Linux.

Add a Chromium patch that runs the callback with a null response, as the
function already does for its other failures.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LPMvJBQiyP6b7QjatACmnS

Co-authored-by: Claude <[email protected]>
Extend the dbus::ObjectProxy patch with a dbus_unittests case,
ObjectProxyMockBusTest.NullPendingCallRunsCallbackWithNull, in
dbus/object_proxy_unittest.cc. It uses a MockBus whose SendWithReply()
leaves the pending call null, and checks that the callback runs
asynchronously, exactly once, with a null response and a null error
response. Unlike the Linux bus-loss spec, it does not depend on shutdown
timing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LPMvJBQiyP6b7QjatACmnS

Co-authored-by: Claude <[email protected]>
Add "app module > when a D-Bus bus goes away > fails a method call made
after the bus is lost instead of crashing". The test runs separate
private session and system dbus-daemons, waits until the app's
org.freedesktop.login1 proxy has connected to the system bus, then
kills the system daemon. Electron quits when Chromium handles the
disconnect, and the fixture's 'quit' handler then starts a login1
method call on the lost system bus. Right after that, it sends a badge
update signal on the session bus. Both buses use the same D-Bus thread,
so the signal reaching the session bus proves the call has run. The
test waits for that signal, lets the app exit, and expects exit code 0.

Without the null pending call fix, the login1 call aborts the app with
SIGABRT. The test waits only on D-Bus traffic and app output, not on
timeouts.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LPMvJBQiyP6b7QjatACmnS

Co-authored-by: Claude <[email protected]>
@trop
trop Bot requested a review from a team as a code owner October 23, 2026 19:58
@trop trop Bot added 45-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Oct 23, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment thread spec/api-app.spec.ts
Comment on lines +309 to +312

const [code, signal] = await exited;
expect(signal).toBeNull();
expect(code).toBe(0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 nit (optional): The new test checks the child's output only after awaiting 'exit', which spec/CLAUDE.md forbids. The 'quit' line can still be in the pipe when 'exit' fires. expect(output).toContain('quit') runs right after await exited, and output is filled by a readline listener on appProcess.stdout. Fix: wait for the 'quit' line in the test body before calling appProcess.stdin.end('x'), for example with a promise resolved from the same readline listener. Alternatively, await the child's 'close' event instead of 'exit' before asserting on output.

Why this was flagged

The fixture prints 'quit\n' in its 'quit' handler (spec/fixtures/api/bus-lost-method-call/main.js:17). Once the test sees the LauncherEntry Update on the session bus, it unblocks the child with appProcess.stdin.end('x') (spec/api-app.spec.ts:305). The test then awaits only exited = once(appProcess, 'exit') (spec/api-app.spec.ts:285) and asserts expect(output).toContain('quit') (spec/api-app.spec.ts:312). Nothing makes it wait until readline has delivered the 'quit' line. spec/CLAUDE.md says a chunk the child wrote just before exiting can be delivered after 'exit' fires, so tests must wait for the expected output and not for 'exit'. Under load this assertion can fail on a correct build and make the test flaky. No safeguard prevents it: the Update signal is posted before 'quit' is written, so seeing it does not prove the parent has read the 'quit' line.

Verification: Trigger: the child has exited and 'exit' fires before the parent has read the 'quit' line from the stdout pipe. The test fills output only from a readline 'line' listener, and nothing waits for 'quit'. It does await exited (exited = once(appProcess, 'exit')) then expect(output).toContain('quit'). spec/CLAUDE.md:10-11 forbids this. The result would be an occasional flaky failure, not a product defect.

@claude

claude Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

The two red jobs on this run are unrelated to the D-Bus ObjectProxy change:

  • linux-x64-asan / test (linux, 3): the job never got a test result. It ended with "The self-hosted runner lost communication with the server" during Run Electron Tests, so this is an infrastructure failure, not a test failure.
  • linux-x64-ubsan / test (linux, 1): the only failure is <webview> tag > document.visibilityState/hidden > follows the embedder window when it is hidden and shown again (webview.spec.ts:249, expected 'hidden' to be 'visible'). The test doesn't touch D-Bus. The same test fails in the same way on the same ubsan shard on 45-x-y's own push builds without this change: run 39884729026 (4f6f6317f6) and run 39719995323 (0141b6c6ac). It passes on most other 45-x-y builds, so it's a known flake on that branch.

Re-running the failed jobs.


Generated by Claude Code

@MarshallOfSound
MarshallOfSound merged commit 376b87d into 45-x-y Oct 24, 2026
137 of 140 checks passed
@MarshallOfSound
MarshallOfSound deleted the trop/45-x-y-bp-fix-handle-a-null-pending-call-in-dbus-objectproxy-1792785461759 branch October 24, 2026 02:14
@release-clerk

release-clerk Bot commented Oct 24, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a crash on Linux when a D-Bus method call was made on a disconnected bus.

renovate Bot added a commit to cigaleapp/cigale that referenced this pull request Nov 8, 2026
##### [v44.10.1](https://github.com/electron/electron/releases/tag/v44.10.1)

### Release Notes for v44.10.1

#### Fixes

- Fixed DevTools "Save" prompting for a location every time instead of reusing the previously chosen file. [#55484](electron/electron#55484)
  - Fixed DevTools "Save As" using the old file and Linux cancels treated as saved.
- Fixed `webContents.adjustSelection()` ignoring the `end` option. [#55461](electron/electron#55461) <sup>(Also in [45](electron/electron#55462), [46](https://github.com/electron/electron/pull/55463))</sup>

#### Performance Improvements

- Improved performance of `net.fetch()` requests without a body. [#55445](electron/electron#55445) <sup>(Also in [43](electron/electron#55447), [45](electron/electron#55446), [46](https://github.com/electron/electron/pull/55444))</sup>
- Improved performance of repeated `net.fetch()` calls for `file:` URLs. [#55458](electron/electron#55458) <sup>(Also in [45](electron/electron#55459), [46](https://github.com/electron/electron/pull/55457))</sup>

#### Other Changes

- Backported fixes from upstream Chromium, Dawn, Skia and V8. [#55492](electron/electron#55492)
##### [v44.10.0](https://github.com/electron/electron/releases/tag/v44.10.0)

### Release Notes for v44.10.0

#### Features

- Added filtering options to `session.registerPreloadScript` - `matches`, `excludeMatches`, `includeGlobs`, `excludeGlobs`, `matchOriginAsFallback`. [#55182](electron/electron#55182) <sup>(Also in [45](https://github.com/electron/electron/pull/55181))</sup>

#### Fixes

- Fixed a crash on Linux when a D-Bus method call was made on a disconnected bus. [#55290](electron/electron#55290) <sup>(Also in [45](electron/electron#55292), [46](https://github.com/electron/electron/pull/55289))</sup>
- Fixed a main process crash when `onSendHeaders` observed Blob uploads. [#55168](electron/electron#55168) <sup>(Also in [45](https://github.com/electron/electron/pull/55169))</sup>
- Fixed `app.getLoginItemSettings()` not finding login items on Windows when the executable path contains spaces. [#55207](electron/electron#55207) <sup>(Also in [45](https://github.com/electron/electron/pull/54419))</sup>
- Fixed Europe/London and Europe/Dublin time zone names showing as "GMT+00:00" in winter by updating ICU to tzdata 2026e. [#55335](electron/electron#55335)
- Fixed File System Access blocklist gaps for `.git/hooks` writes and hypervisor UNC shares. [#55330](electron/electron#55330)
- Fixed handling of malformed asar archives whose size fields do not match the file length. [#55176](electron/electron#55176) <sup>(Also in [43](electron/electron#55179), [45](https://github.com/electron/electron/pull/55175))</sup>
- Fixed inconsistent handling of asar archive paths between the main process and child processes. [#55183](electron/electron#55183) <sup>(Also in [43](electron/electron#55185), [45](https://github.com/electron/electron/pull/55184))</sup>
- Fixed `Menu.popup()` on macOS sometimes not showing a menu after another closed. [#55325](electron/electron#55325) <sup>(Also in [45](electron/electron#55326), [46](https://github.com/electron/electron/pull/55324))</sup>
- Fixed MV3 extension events not arriving to background service workers. [#55152](electron/electron#55152) <sup>(Also in [43](electron/electron#55153), [45](https://github.com/electron/electron/pull/55154))</sup>
- Fixed paste hanging indefinitely on Linux X11 until the app was restarted. [#55327](electron/electron#55327)
- Fixed `protocol.registerSource` schemes not applying the same fetch rules as `protocol.handle` schemes. [#55177](electron/electron#55177) <sup>(Also in [45](https://github.com/electron/electron/pull/55178))</sup>
- Fixed `utilityProcess` not emitting an `exit` event when the app quit while the process was still launching. [#55273](electron/electron#55273) <sup>(Also in [43](electron/electron#55272), [45](electron/electron#55274), [46](https://github.com/electron/electron/pull/55264))</sup>

#### Other Changes

- Updated Chromium to 152.0.7977.169. [#55033](electron/electron#55033)
- Updated Node.js to v24.22.1. [#55162](electron/electron#55162)
##### [v44.9.3](https://github.com/electron/electron/releases/tag/v44.9.3)

### Release Notes for v44.9.3

#### Other Changes

- Backported fixes from upstream ANGLE, Chromium, PDFium, Skia and V8. [#55149](electron/electron#55149)
##### [v44.9.2](https://github.com/electron/electron/releases/tag/v44.9.2)

### Release Notes for v44.9.2
##### [v44.9.1](https://github.com/electron/electron/releases/tag/v44.9.1)

### Release Notes for v44.9.1

> \[!NOTE]
> This release contains the fix for <GHSA-jr5w-w6x2-84p9>, the mitigation for compromised eMudhra intermediate certificates
##### [v44.9.0](https://github.com/electron/electron/releases/tag/v44.9.0)

### Release Notes for v44.9.0

#### Features

- Added app shims on macOS to show windows under another app's Dock icon. [#55073](electron/electron#55073) <sup>(Also in [45](https://github.com/electron/electron/pull/55072))</sup>

#### Fixes

- Fixed link-opened windows not using the opener's session and `webPreferences`. [#55048](electron/electron#55048) <sup>(Also in [42](electron/electron#55050), [43](electron/electron#55049), [45](https://github.com/electron/electron/pull/55051))</sup>
- Fixed `setCertificateVerifyProc` occasionally not being applied to a request issued concurrently with the first request to a host. [#55046](electron/electron#55046) <sup>(Also in [42](electron/electron#55054), [43](electron/electron#55047), [45](https://github.com/electron/electron/pull/55045))</sup>
##### [v44.8.0](https://github.com/electron/electron/releases/tag/v44.8.0)

### Release Notes for v44.8.0

#### Features

- Added support for `Notification` action buttons on Linux. [#54890](electron/electron#54890) <sup>(Also in [45](https://github.com/electron/electron/pull/54889))</sup>

#### Fixes

- Fixed mouse cursor missing over native dialogs in certain scenarios on Windows. [#54987](electron/electron#54987)
- Fixed `net.fetch` and `session.fetch` failing permanently with `net::ERR_FAILED` after the Network Service process restarts. [#54909](electron/electron#54909) <sup>(Also in [42](electron/electron#54925), [43](electron/electron#54908), [45](https://github.com/electron/electron/pull/54910))</sup>
- Fixed `utilityProcess` dropping messages posted with `process.parentPort.postMessage()` right before the process exits. [#54960](electron/electron#54960) <sup>(Also in [42](electron/electron#55000), [43](electron/electron#54962), [45](https://github.com/electron/electron/pull/54956))</sup>
- Fixed `win.isFullScreen()` being stale in fullscreen events on Windows. [#55009](electron/electron#55009) <sup>(Also in [45](https://github.com/electron/electron/pull/55008))</sup>

#### Other Changes

- Backported fixes from upstream Chromium and V8. [#55034](electron/electron#55034)
- Updated Chromium to 152.0.7977.167. [#54928](electron/electron#54928)
- Updated Node.js to v24.22.0. [#55004](electron/electron#55004)
##### [v44.7.2](https://github.com/electron/electron/releases/tag/v44.7.2)

### Release Notes for v44.7.2

#### Fixes

- Fixed an issue where clicks posted to a background app were dropped on macOS. [#54819](electron/electron#54819) <sup>(Also in [45](https://github.com/electron/electron/pull/54818))</sup>
- Fixed interrupted macOS updates leaving a broken app behind. [#54844](electron/electron#54844) <sup>(Also in [45](https://github.com/electron/electron/pull/54843))</sup>

#### Other Changes

- Backported fixes from upstream ANGLE, Chromium, PDFium and V8. [#54898](electron/electron#54898)

#### Documentation

- Documentation changes: [#54880](electron/electron#54880)
##### [v44.7.1](https://github.com/electron/electron/releases/tag/v44.7.1)

### Release Notes for v44.7.1

#### Fixes

- Fixed a crash when starting without an available display server on Linux. [#54794](electron/electron#54794) <sup>(Also in [45](https://github.com/electron/electron/pull/54781))</sup>
- Fixed a Linux crash creating a window with a menu bar when GTK failed to load. [#54859](electron/electron#54859) <sup>(Also in [45](https://github.com/electron/electron/pull/54846))</sup>
- Fixed a `WebContentsView` that was removed with `removeChildView()` and re-added with `addChildView()` staying hidden behind its sibling views on Linux. [#54798](electron/electron#54798)
- Fixed asar archives in non-ASCII folders failing to load on Linux. [#54849](electron/electron#54849) <sup>(Also in [45](https://github.com/electron/electron/pull/54848))</sup>
- Fixed renderer crashes during garbage collection inside ShadowRealms. [#54865](electron/electron#54865) <sup>(Also in [45](https://github.com/electron/electron/pull/54864))</sup>

#### Other Changes

- Refactored mouse forwarding on Windows to fix `setIgnoreMouseEvents(true, { forward: true })` related issues. [#54802](electron/electron#54802) <sup>(Also in [45](https://github.com/electron/electron/pull/54803))</sup>
- Updated Chromium to 152.0.7977.149. [#54085](electron/electron#54085)
##### [v44.7.0](https://github.com/electron/electron/releases/tag/v44.7.0)

### Release Notes for v44.7.0

#### Features

- The macOS `autoUpdater` now streams update downloads to disk, resumes an interrupted download on the next check instead of starting over, and applies a binary delta when the update feed offers one for the running version. [#54204](electron/electron#54204)

#### Fixes

- Fixed an uncatchable TypeError in `net.fetch` when receiving response headers with non-ASCII characters, and preserved multiple Set-Cookie headers. [#54672](electron/electron#54672)

#### Other Changes

- Backported fixes from upstream ANGLE, Chromium, Dawn, fontconfig, Skia, V8 and WebRTC. [#54666](electron/electron#54666)
- Backported fixes from upstream ANGLE, Chromium, Skia, V8 and WebRTC. [#54657](electron/electron#54657)
##### [v44.6.0](https://github.com/electron/electron/releases/tag/v44.6.0)

### Release Notes for v44.6.0

#### Features

- Added the experimental `protocol.registerSource()` to serve a custom scheme from directories on disk without a JavaScript handler. [#54522](electron/electron#54522) <sup>(Also in [45](https://github.com/electron/electron/pull/54521))</sup>

#### Fixes

- Fixed a crash on launch on macOS when the system refused to register the app for sleep/wake notifications. [#54596](electron/electron#54596)
- Fixed a crash on `navigator.usb.requestDevice()` in in-memory sessions. [#54616](electron/electron#54616) <sup>(Also in [45](https://github.com/electron/electron/pull/54615))</sup>
- Fixed `webview.findInPage()` hanging when the host page also has an iframe. [#54586](electron/electron#54586) <sup>(Also in [43](electron/electron#54584), [45](https://github.com/electron/electron/pull/54585))</sup>
- Updated time zone data to tzdata 2026d, including British Columbia's move to permanent UTC-7. [#54623](electron/electron#54623)

#### Documentation

- Documentation changes: [#54589](electron/electron#54589)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants