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
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1839290

Title:
  systemd doesn't restart a service after crashes

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to