[Bug 2067482] Re: needrestart terminates itself on updates

Launchpad Bug Tracker 2067482 at bugs.launchpad.net
Wed Jul 31 05:30:28 UTC 2024


This bug was fixed in the package needrestart - 3.6-7ubuntu4.1

---------------
needrestart (3.6-7ubuntu4.1) noble; urgency=medium

  * Prevent needrestart restarting itself (LP: #2067482)
  * d/p/ubuntu-mode.patch: Don't touch /run/reboot-required on kernel updates
    (LP: #2065863)
  * Ubuntu mode: disable it if restart mode has been explicitly set
    (LP: #2068543)
  * Add some inline documentation for the Ubuntu mode (LP: #2068573)
  * Don't restart the google-guest-agent service (LP: #2063442)

 -- Simon Chopin <schopin at ubuntu.com>  Fri, 14 Jun 2024 15:37:30 +0200

** Changed in: needrestart (Ubuntu Noble)
       Status: Fix Committed => Fix Released

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

Title:
  needrestart terminates itself on updates

Status in needrestart package in Ubuntu:
  Fix Released
Status in needrestart source package in Noble:
  Fix Released
Status in needrestart source package in Oracular:
  Fix Released

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-not-self-restart'

  If the bug is fixed, you should find /tmp/did-not-self-restart with a
  recent mtime after a few seconds. Otherwise, it'll keep reinstalling
  libc6 in a loop.

  [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.

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




More information about the foundations-bugs mailing list