[Bug 1448656] Re: systemd doesn't allow proper shutdown after it encountered errornous .service
> However, comments in ExecStart= are just passed on verbatim to whatever you execute, so this should reflect in some specific error message? No error (message), just a warning, .e.g. when the unit started or enabled, that the recognized comment symbol is very likely to cause troule. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1448656 Title: systemd doesn't allow proper shutdown after it encountered errornous .service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1448656/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1448656] Re: systemd doesn't allow proper shutdown after it encountered errornous .service
"systemctl status foo.service" ought to have an error message that the unit file is broken. However, comments in ExecStart= are just passed on verbatim to whatever you execute, so this should reflect in some specific error message? I. e. if I have $ cat /etc/systemd/system/broken.service [Service] ExecStart=/bin/sleep 1 # muhaha $ sudo systemctl daemon-reload $ sudo systemctl start broken.service $ systemctl status broken.service ● broken.service Loaded: loaded (/etc/systemd/system/broken.service; static; vendor preset: enabled) Active: failed (Result: exit-code) since Di 2015-06-02 12:39:05 CEST; 7s ago Process: 12139 ExecStart=/bin/sleep 1 # muhaha (code=exited, status=1/FAILURE) Main PID: 12139 (code=exited, status=1/FAILURE) Jun 02 12:39:05 donald systemd[1]: Started broken.service. Jun 02 12:39:05 donald systemd[1]: Starting broken.service... Jun 02 12:39:05 donald sleep[12139]: /bin/sleep: ungültiges Zeitintervall »#“ Jun 02 12:39:05 donald systemd[1]: broken.service: main process exited, code=exited, status=1/FAILURE Jun 02 12:39:05 donald sleep[12139]: /bin/sleep: ungültiges Zeitintervall »muhaha“ Jun 02 12:39:05 donald sleep[12139]: „/bin/sleep --help“ liefert weitere Informationen. Jun 02 12:39:05 donald systemd[1]: Unit broken.service entered failed state. Jun 02 12:39:05 donald systemd[1]: broken.service failed. which seems quite clear? (Sorry for the German error messages, they basically say "invalid time interval") -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1448656 Title: systemd doesn't allow proper shutdown after it encountered errornous .service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1448656/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1448656] Re: systemd doesn't allow proper shutdown after it encountered errornous .service
The failure can be triggered by adding a comment at the end of a line (which seems to produce an invalid `systemd` unit) depending on the binary passed to `ExecStart`. For example `tracd` of the `trac` isssue tracker never returns if a comment is added at the end of the `ExecStart` line, but it's hard to make `systemd` responsible for that. Maybe it could warn when a comment symbol is detected that isn't placed at the beginning of the line or preceeded by whitespace only? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1448656 Title: systemd doesn't allow proper shutdown after it encountered errornous .service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1448656/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1448656] Re: systemd doesn't allow proper shutdown after it encountered errornous .service
I can't reproduce this. I produces the errornous service by adding a shell variable declaration to the .service file e.g. [Unit] Description=A service triggering an error X=Y env X=Y [Service] Environment=A=B ExecStart=echo $A [Install] WantedBy=multi-user.target I could trigger the failure by moving the file out of `/lib/systemd/system` (to `/root`) and back, but I no longer have the file. The failure seems to have occured due to the root filesystem being corrupted by a failing `flashcache` write-back and the fact that I could suppress the issue and recreate it (only once) a random correlation. I no longer have the original file, but I'm sure it was correct besides the variable declaration. ** Changed in: systemd (Ubuntu) Status: Incomplete => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1448656 Title: systemd doesn't allow proper shutdown after it encountered errornous .service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1448656/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1448656] Re: systemd doesn't allow proper shutdown after it encountered errornous .service
Indeed a broken unit shouldn't fail the boot or shutdown unless it marks itself as being required for booting. Can you please attach the said unit, so that I can reproduce this? It seems your system has some worse problems too: Apr 26 13:02:29 hostname systemd[1]: Failed to activate swap /dev/mapper/root-swap. Apr 26 13:02:36 hostname kernel: usb 1-13: device descriptor read/64, error -110 Apr 26 13:02:39 hostname systemd[1]: Failed to start Light Display Manager. Apr 26 13:02:56 hostname libvirtd[2008]: Interner Fehler: Untergeordneter Prozess (/usr/sbin/dmidecode -q -t 0,1,4,17) unerwartet Ende Status 1: /dev/mem: No such file or directory All of these are strange and seem to indicate kernel/hardware problems (message 2 and 4), perhaps a broken fstab (message 1), etc. Also, there's not only Ctrl+Alt+Del, you can also use "poweroff" or shut down from the menus. Please don't just pull the plug; if nothing else helps, "sudo poweroff -f" is still a lot better than that.. ** Changed in: systemd (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1448656 Title: systemd doesn't allow proper shutdown after it encountered errornous .service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1448656/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs