For Bionic the problem also seems to fixed in 
systemd=237-3ubuntu10.40~next20200212b1
foo and bar service files are exactly the same as in #8


Restart fails with systemd=237-3ubuntu10.38:
pono@systemd-bionic-test:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
pono@systemd-bionic-test:~$ dpkg -l systemd | tail -n 1
ii  systemd        237-3ubuntu10.38 amd64        system and service manager

pono@systemd-bionic-test:~$ sudo systemctl status foo bar
● foo.service
   Loaded: loaded (/etc/systemd/system/foo.service; static; vendor preset: 
enabled)
   Active: active (running) since Mon 2020-02-17 08:29:49 UTC; 7s ago
 Main PID: 11403 (sleep)
    Tasks: 1 (limit: 1129)
   CGroup: /system.slice/foo.service
           └─11403 /bin/sleep infinity

Feb 17 08:29:49 systemd-bionic-test systemd[1]: Started foo.service.

● bar.service
   Loaded: loaded (/etc/systemd/system/bar.service; static; vendor preset: 
enabled)
   Active: active (running) since Mon 2020-02-17 08:29:49 UTC; 7s ago
 Main PID: 11404 (sleep)
    Tasks: 1 (limit: 1129)
   CGroup: /system.slice/bar.service
           └─11404 /bin/sleep infinity

Feb 17 08:29:49 systemd-bionic-test systemd[1]: Started bar.service.
pono@systemd-bionic-test:~$ sudo kill -6 11403
pono@systemd-bionic-test:~$ sudo systemctl status foo bar
● foo.service
   Loaded: loaded (/etc/systemd/system/foo.service; static; vendor preset: 
enabled)
   Active: failed (Result: signal) since Mon 2020-02-17 08:30:23 UTC; 3s ago
  Process: 11403 ExecStart=/bin/sleep infinity (code=killed, signal=ABRT)
 Main PID: 11403 (code=killed, signal=ABRT)

Feb 17 08:30:23 systemd-bionic-test systemd[1]: foo.service: Main process 
exited, code=killed, status=6/ABRT
Feb 17 08:30:23 systemd-bionic-test systemd[1]: foo.service: Failed with result 
'signal'.
Feb 17 08:30:23 systemd-bionic-test systemd[1]: foo.service: Service has no 
hold-off time, scheduling restart.
Feb 17 08:30:23 systemd-bionic-test systemd[1]: foo.service: Failed to schedule 
restart job: Transaction is destructive.
Feb 17 08:30:23 systemd-bionic-test systemd[1]: foo.service: Failed with result 
'signal'.

● bar.service
   Loaded: loaded (/etc/systemd/system/bar.service; static; vendor preset: 
enabled)
   Active: inactive (dead) since Mon 2020-02-17 08:30:23 UTC; 3s ago
  Process: 11404 ExecStart=/bin/sleep infinity (code=killed, signal=TERM)
 Main PID: 11404 (code=killed, signal=TERM)

Feb 17 08:29:49 systemd-bionic-test systemd[1]: Started bar.service.
Feb 17 08:30:23 systemd-bionic-test systemd[1]: Stopping bar.service...
Feb 17 08:30:23 systemd-bionic-test systemd[1]: Stopped bar.service.


Restart works fine with 237-3ubuntu10.40~next20200212b1:
pono@systemd-bionic-test:~$ sudo apt install 
systemd=237-3ubuntu10.40~next20200212b1
<...>
pono@systemd-bionic-test:~$ sudo systemctl daemon-reexec 
pono@systemd-bionic-test:~$ sudo systemctl status foo bar
● foo.service
   Loaded: loaded (/etc/systemd/system/foo.service; static; vendor preset: 
enabled)
   Active: active (running) since Mon 2020-02-17 08:31:41 UTC; 11min ago
 Main PID: 11752 (sleep)
    Tasks: 1 (limit: 1129)
   CGroup: /system.slice/foo.service
           └─11752 /bin/sleep infinity

Feb 17 08:31:41 systemd-bionic-test systemd[1]: Started foo.service.

● bar.service
   Loaded: loaded (/etc/systemd/system/bar.service; static; vendor preset: 
enabled)
   Active: active (running) since Mon 2020-02-17 08:31:41 UTC; 11min ago
 Main PID: 11753 (sleep)
    Tasks: 1 (limit: 1129)
   CGroup: /system.slice/bar.service
           └─11753 /bin/sleep infinity

Feb 17 08:31:41 systemd-bionic-test systemd[1]: Started bar.service.
pono@systemd-bionic-test:~$ sudo kill -6 11752
pono@systemd-bionic-test:~$ sudo systemctl status foo bar
● foo.service
   Loaded: loaded (/etc/systemd/system/foo.service; static; vendor preset: 
enabled)
   Active: active (running) since Mon 2020-02-17 08:42:56 UTC; 2s ago
 Main PID: 12856 (sleep)
    Tasks: 1 (limit: 1129)
   CGroup: /system.slice/foo.service
           └─12856 /bin/sleep infinity

Feb 17 08:42:56 systemd-bionic-test systemd[1]: Started foo.service.

● bar.service
   Loaded: loaded (/etc/systemd/system/bar.service; static; vendor preset: 
enabled)
   Active: active (running) since Mon 2020-02-17 08:42:56 UTC; 2s ago
 Main PID: 12857 (sleep)
    Tasks: 1 (limit: 1129)
   CGroup: /system.slice/bar.service
           └─12857 /bin/sleep infinity

Feb 17 08:42:56 systemd-bionic-test systemd[1]: Started bar.service.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1839290

Title:
  systemd doesn't restart a service after crashes

Status in systemd:
  Fix Released
Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Xenial:
  In Progress
Status in systemd source package in Bionic:
  In Progress
Status in systemd source package in Disco:
  Fix Released

Bug description:
  [impact]

  when a service configured to restart crashes, under certain
  configurations, that service is not correctly restarted.

  [test case]

  see comment 8

  [regression potential]

  this changes the job mode of manager-triggered restarts to 'replace'
  any existing queued job(s), instead of failing if there are queued
  job(s).  thus any regressions would occur when a service fails, that
  is configured to restart on failure.

  [scope]

  This is needed only for Xenial and Bionic.

  this is fixed with commit 03ff2dc71ecb09272d728d458498b44f7f132f51
  which is included already in Eoan.

  [other info]

  original description:
  ---

  Affected versions of OS and systemd:
  $ cat /etc/issue
  Ubuntu 16.04.6 LTS \n \l
  $ systemd --version
  systemd 229
  +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP 
+GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN

  Affected packages:
  systemd 229-4ubuntu21.22 and previous versions.

  Expected behaviour you didn't see:
  Scheduling restart of failed service.
  A process crashed by sigabrt and didn't restart.

  Description:
  The bug was reported to a systemd upstream repository: 
https://github.com/systemd/systemd/issues/11456
  The bug was fixed and accepted to the master branch: 
https://github.com/systemd/systemd/pull/11467/files

  Action:
  Include this patch to Ubuntu 16.04 and other version of Ubuntu which are 
supported.

To manage notifications about this bug go to:
https://bugs.launchpad.net/systemd/+bug/1839290/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to