Thanks for the logs.

Looking at `DpkgTerminalLog.txt`, the actual failure is:

    Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line
148.

This message is generic and not specific to openssh — it comes from
`deb-systemd-invoke` (`init-system-helpers`), which invokes `systemctl`
with `--quiet` and reports failures via Perl's `$!`. If `systemctl`
itself ran and failed (unit didn't start, timeout, dependency issue),
`$!` is stale/empty, which matches the blank message here. In other
words, the real reason `systemctl restart ssh.socket` (or `ssh.service`)
failed is being swallowed by `--quiet` before it ever reaches this log.

I was not able to reproduce this on a clean 25.10 → 26.04 `do-release-
upgrade` in a container, which fits the idea that this depends on
something specific to the reporter's environment at the time (resource
pressure during the upgrade, service ordering, etc.) rather than a
deterministic packaging bug.

To find the actual cause, the missing piece is `journalctl -u ssh.socket
-u ssh.service` from around the failure time (`2026-08-04 03:00:02`, per
the report's `Date` field) — that would show what `systemctl` itself
reported before `deb-systemd-invoke` discarded it.

@matteodimario, would you be able to check if that's still available
(`journalctl --since "2026-08-03 00:00" --until "2026-08-05 00:00"`), or
share it if you still have it?

# More from AI

The same "Could not execute systemctl" failure mode, with the same root
cause in `deb-systemd-invoke`, has been reported against several
unrelated packages:

- Debian #1010893 — docker.io
- Debian #1076530 — occurs right after a `needrestart` deferred-restart block, 
during a large upgrade (same shape as this bug)
- Debian #1009290 — mariadb-server
- LP #2003756 — krb5-kdc; includes a maintainer confirming that removing 
`--quiet` reveals the real underlying systemctl error
- LP #1958676 — same message seen specifically in LXD containers under 
launchpad-buildd, tied to a systemd/init-system-helpers version skew

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2162797

Title:
  package openssh-server 1:10.2p1-2ubuntu3.5 failed to install/upgrade:
  old openssh-server package postinst maintainer script subprocess
  failed with exit status 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/2162797/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to