needrestart terminates itself on updates
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
needrestart (Ubuntu) | Status tracked in Oracular | |||||
Noble |
Fix Committed
|
Undecided
|
Simon Chopin | |||
Oracular |
Fix Released
|
Undecided
|
Simon Chopin |
Bug Description
[Impact]
There's likely a fair number of custom services out there that are similar in nature to cloud-init, unattended-upgrade and the likes. Rather than forcing every user to track down and debug this issue, needrestart should instead have some sort of "self-preservation instinct" and exclude itself from the default restart list.
While this issue isn't particularly new, it has become much more urgent in Noble onwards as we've modified it to default to silently restarting services.
[Test plan]
The fix also includes an autopkgtest for that very issue.
In addition, to test this, one can do in a fresh container with the updated needrestart installed:
# THIS WILL REINSTALL libc6 ON A LOOP ON BUGGY SYSTEMS!!!
sudo systemd-run -u no-self-restart sh -c 'set -e; apt update; apt reinstall -y libc6; sleep 5; touch /tmp/did-
If the bug is fixed, you should find /tmp/did-
[Regression potential]
The most likely regression would be some crash due to some obscure Perl idiosyncrasy.
[Other info]
[Original report]
This is an expansion on bug 2059337. There's likely a fair number of custom services out there that are similar in nature to cloud-init, unattended-upgrade and the likes. Rather than forcing every user to track down and debug this issue, needrestart should instead have some sort of "self-preservation instinct" and exclude itself from the default restart list.
While this issue isn't particularly new, it has become much more urgent in Noble onwards as we've modified it to default to silently restarting services.
tags: | added: foundations-todo |
Changed in needrestart (Ubuntu Oracular): | |
assignee: | nobody → Simon Chopin (schopin) |
Changed in needrestart (Ubuntu Noble): | |
assignee: | nobody → Simon Chopin (schopin) |
description: | updated |
Changed in needrestart (Ubuntu Noble): | |
status: | New → In Progress |
This bug was fixed in the package needrestart - 3.6-8ubuntu2
---------------
needrestart (3.6-8ubuntu2) oracular; urgency=medium
* Prevent needrestart restarting itself (LP: #2067482)
-- Simon Chopin <email address hidden> Wed, 29 May 2024 17:02:42 +0200