[Pkg-virtualbox-devel] Bug#813072: Remove broken ExecStopPost in vboxweb.service
Michael Biebl
biebl at debian.org
Fri Jan 29 04:42:43 UTC 2016
Package: virtualbox
Version: 5.0.14-dfsg-1+b1
Severity: important
File: /lib/systemd/system/vboxweb.service
Tags: patch
Hi,
vboxweb.service contains the following:
ExecStopPost=/usr/bin/rm /run/vboxweb.pid
This is broken in Debian:
$ type rm
rm is /bin/rm
And leads to a failure if you try to stop vboxweb.service:
# systemctl status vboxweb.service
● vboxweb.service - VirtualBox Web Service
Loaded: loaded (/lib/systemd/system/vboxweb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fr 2016-01-29 05:28:55 CET; 3s ago
Process: 5499 ExecStopPost=/usr/bin/rm /run/vboxweb.pid (code=exited, status=203/EXEC)
Process: 829 ExecStart=/usr/bin/vboxwebsrv --pidfile /run/vboxweb.pid --background (code=exited, status=0/SUCCESS)
Main PID: 902 (code=killed, signal=TERM)
CGroup: /system.slice/vboxweb.service
└─944 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
Jan 29 04:09:03 pluto vboxwebsrv[829]: 00:00:00.002146 main Executable: /usr/lib/virtualbox/vboxwebsrv
Jan 29 04:09:03 pluto vboxwebsrv[829]: 00:00:00.002147 main Process ID: 829
Jan 29 04:09:03 pluto vboxwebsrv[829]: 00:00:00.002148 main Package type: LINUX_64BITS_GENERIC (OSE)
Jan 29 04:09:03 pluto systemd[1]: Started VirtualBox Web Service.
Jan 29 05:28:55 pluto systemd[1]: Stopping VirtualBox Web Service...
Jan 29 05:28:55 pluto systemd[5499]: vboxweb.service: Failed at step EXEC spawning /usr/bin/rm: No such file or directory
Jan 29 05:28:55 pluto systemd[1]: vboxweb.service: Control process exited, code=exited status=203
Jan 29 05:28:55 pluto systemd[1]: Stopped VirtualBox Web Service.
Jan 29 05:28:55 pluto systemd[1]: vboxweb.service: Unit entered failed state.
Jan 29 05:28:55 pluto systemd[1]: vboxweb.service: Failed with result 'exit-code'.
The fix is rather simple: Simply drop the ExecStopPost line.
As you can see in the documentation [¹], systemd will automatically
clean up stale pid files, so there is no need to do that manually.
Trivial patch attached.
Btw, it would be great if /etc/init.d/virtualbox would have an
equivalent systemd service file. Most of the script seems to be about
loading kernel modules. Maybe that can be dropped completely due to
kernel auto-loading or could be replaced by a simple
/usr/lib/modules-load.d/ snippet.
Regards,
Michael
[1] http://www.freedesktop.org/software/systemd/man/systemd.service.html#PIDFile=
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages virtualbox depends on:
ii adduser 3.113+nmu3
ii init-system-helpers 1.27
ii libc6 2.21-7
ii libcurl3-gnutls 7.47.0-1
ii libgcc1 1:5.3.1-7
ii libgsoap7 2.8.22-2
ii libpng12-0 1.2.54-1
ii libpython2.7 2.7.11-3
ii libsdl1.2debian 1.2.15-12
ii libssl1.0.2 1.0.2f-2
ii libstdc++6 5.3.1-7
ii libvncserver1 0.9.10+dfsg-3+b1
ii libvpx3 1.5.0-2
ii libx11-6 2:1.6.3-1
ii libxcursor1 1:1.1.14-1+b1
ii libxext6 2:1.3.3-1
ii libxml2 2.9.3+dfsg1-1
ii libxmu6 2:1.1.2-2
ii libxt6 1:1.1.5-1
ii procps 2:3.3.11-3
ii python 2.7.11-1
ii python2.7 2.7.11-3
pn python:any <none>
ii virtualbox-dkms [virtualbox-modules] 5.0.14-dfsg-1
ii zlib1g 1:1.2.8.dfsg-2+b1
Versions of packages virtualbox recommends:
ii libgl1-mesa-glx [libgl1] 11.1.1-2
ii libqt4-opengl 4:4.8.7+dfsg-5
ii libqtcore4 4:4.8.7+dfsg-5
ii libqtgui4 4:4.8.7+dfsg-5
ii virtualbox-qt 5.0.14-dfsg-1+b1
Versions of packages virtualbox suggests:
pn vde2 <none>
ii virtualbox-guest-additions-iso 5.0.14-1
-- no debconf information
More information about the Pkg-virtualbox-devel
mailing list