Bug#784604: systemd: can't remove systemd unless it is correctly running

Brian May bam at debian.org
Fri May 8 04:22:59 BST 2015


On Thu, 7 May 2015 at 22:30 Michael Biebl <biebl at debian.org> wrote:

> So, systemd.postinst seems to fail in the trigger
> We do not call systemctl uncondionally here:
>
> _systemctl() {
>     if [ -d /run/systemd/system ]; then
>         systemctl "$@"
>     fi
> }
>
>
> if [ "$1" = "triggered" ]; then
>    _systemctl daemon-reload
>    exit 0
> fi
>
> So, this looks like you (wrongly) had a /run/systemd/system directory at
> this point?
>

Yes, looks like it:

root at scrooge:/# ls -la /run/systemd/system/
        total 0
                                    drwxr-xr-x 2 root root  40 May  8 02:50
.                                                 drwxr-xr-x 6 root root
180 May  8 02:50 ..

That said, I'm still curious, why the systemctl call was made in the
> first place. systemctl also complains with a D-Bus error.
> Did you have a /var/run/dbus/system_bus_socket?


Doesn't look like I have that:

root at scrooge:/# ls -la  /var/run/
total 4
drwxr-xr-x  4 root root   80 May  8 02:50 .
drwxr-xr-x 20 root root 4096 May  8 02:50 ..
drwxrwxrwt  2 root root   40 May  8 02:50 lock
drwxr-xr-x  6 root root  180 May  8 02:50 systemd


If that socket does not
> exist, systemctl should fall back to use a private dbus socket which
> doesn't require a run dbus system bus.
> Was dbus installed at this point dbus.service and dbus.socket correctly
> running?
>

dbus is installed, however it is not running. In fact I think systemd
hasn't actually started anything.

root at scrooge:/# ps aufx
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.4   4892  2140 ?        Ss   02:50   0:00 init -z
root         2  0.0  0.0      0     0 ?        S    02:50   0:00
[kthreadd/104]
root         3  0.0  0.0      0     0 ?        S    02:50   0:00  \_
[khelper/104]
root        47  0.0  0.1  25540   708 ?        Ss   02:51   0:00 vzctl:
pts/0
root        48  0.0  0.4   4296  2612 pts/0    Ss   02:51   0:00  \_ -bash
root       387  0.0  0.1   2872   916 pts/0    R+   03:04   0:00      \_ ps
aufx
root at scrooge:/#

I suspect systemd might be trying to display something on the console,
however I am not sure how to display that stuff using openvz/proxmox
(thought there was a way...)

I think systemd has got into a very strange state, where it thinks it has
started, but it isn't really running properly, and as such hasn't started
anything it was suppose to.

Also, not just systemd that can trigger this problem (also: does the
following really mean hplip and colord can't be installed without systemd?)

root at scrooge:/var/log# apt-get install systemd
Reading package lists... Done
Building dependency tree
Reading state information... Done
systemd is already the newest version.
systemd set to manually installed.
The following packages were automatically installed and are no longer
required:
  consolekit hpijs libck-connector0 libcolord1 libffi5 libgd2-xpm
libgphoto2-2 libgphoto2-port0 libjpeg8 liblcms1 libopenjpeg2
  libpam-ck-connector libpoppler19 libslp1 libsystemd-login0 libtiff4
pciutils ttf-freefont usbutils
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root at scrooge:/var/log# ls^C
(reverse-i-search)`': ^C
root at scrooge:/var/log# apt-get remove systemd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
  avahi-daemon colord-data consolekit cups cups-browsed cups-client
cups-core-drivers cups-daemon cups-filters cups-filters-core-drivers
  cups-ppdc cups-server-common dconf-gsettings-backend dconf-service
foomatic-db-compressed-ppds foomatic-db-engine gir1.2-glib-2.0
  hpijs hplip-data libart-2.0-2 libasn1-8-heimdal libavahi-core7
libavahi-glib1 libck-connector0 libcolord1 libcolord2 libcolorhug2
  libcupscgi1 libcupsmime1 libcupsppdc1 libdaemon0 libdbus-glib-1-2
libdconf1 libexif12 libffi5 libfile-copy-recursive-perl
  libfontembed1 libgd2-xpm libgd3 libgirepository-1.0-1 libgphoto2-2
libgphoto2-6 libgphoto2-l10n libgphoto2-port0 libgphoto2-port10
  libgssapi3-heimdal libgudev-1.0-0 libgusb2 libgutenprint2
libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhpmud0
  libhx509-5-heimdal libieee1284-3 libjim0.75 libjpeg8 libkrb5-26-heimdal
liblcms1 libldb1 libltdl7 libnss-mdns libntdb1 libopenjpeg2
  libpam-ck-connector libperl5.20 libpolkit-agent-1-0 libpolkit-backend-1-0
libpolkit-gobject-1-0 libpoppler19 libpython2.7 libqpdf13
  libroken18-heimdal libsane libsane-common libsane-extras
libsane-extras-common libsane-hpaio libsensors4 libslp1 libsmbclient
  libsnmp-base libsnmp30 libsystemd-login0 libtalloc2 libtcl8.6 libtdb1
libtevent0 libtiff4 libtk8.6 libusb-1.0-0 libv4l-0
  libv4lconvert0 libvpx1 libwbclient0 libwind0-heimdal libxss1 mscompress
pciutils printer-driver-all printer-driver-brlaser
  printer-driver-c2050 printer-driver-c2esp printer-driver-cjet
printer-driver-dymo printer-driver-escpr printer-driver-foo2zjs
  printer-driver-foo2zjs-common printer-driver-gutenprint
printer-driver-hpcups printer-driver-hpijs printer-driver-m2300w
  printer-driver-min12xxw printer-driver-pnm2ppa printer-driver-ptouch
printer-driver-pxljr printer-driver-sag-gdi printer-driver-splix
  python-crypto python-dbus python-dbus-dev python-gi python-gobject-2
python-imaging python-ldb python-ntdb python-pexpect
  python-renderpm python-reportlab python-reportlab-accel python-samba
python-talloc python-tdb qpdf samba-common samba-common-bin
  samba-libs sane-utils smbclient tcl tcl8.6 tk tk8.6 ttf-freefont unzip
update-inetd usb-modeswitch usb-modeswitch-data usbutils
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  sysvinit-core
The following packages will be REMOVED:
  colord hplip libpam-systemd policykit-1 printer-driver-postscript-hp
systemd systemd-sysv
The following NEW packages will be installed:
  sysvinit-core
0 upgraded, 1 newly installed, 7 to remove and 1 not upgraded.
Need to get 133 kB of archives.
After this operation, 14.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://proxy.pri:9999/debian/ jessie/main sysvinit-core i386
2.88dsf-59 [133 kB]
Fetched 133 kB in 0s (2306 kB/s)
Preconfiguring packages ...
(Reading database ... 32441 files and directories currently installed.)
Removing colord (1.2.1-1+b2) ...
Failed to get D-Bus connection: No such file or directory
dpkg: error processing package colord (--remove):
 subprocess installed pre-removal script returned error exit status 1
Failed to get D-Bus connection: No such file or directory
Failed to get D-Bus connection: No such file or directory
Removing printer-driver-postscript-hp (3.14.6-1) ...
Removing hplip (3.14.6-1+b2) ...
dpkg: policykit-1: dependency problems, but removing anyway as you
requested:
 colord depends on policykit-1 (>= 0.103).

Removing policykit-1 (0.105-8) ...
Removing libpam-systemd:i386 (215-17) ...
dpkg: systemd-sysv: dependency problems, but removing anyway as you
requested:
 init depends on systemd-sysv | sysvinit-core | upstart; however:
  Package systemd-sysv is to be removed.
  Package sysvinit-core is not installed.
  Package upstart is not installed.

Removing systemd-sysv (215-17) ...
Processing triggers for cups (1.7.5-11) ...
Processing triggers for dbus (1.8.16-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
 colord
E: Sub-process /usr/bin/dpkg returned an error code (1)
root at scrooge:/var/log#


Which in turn starts getting a bit messy:

root at scrooge:/var/log# apt-get remove systemd
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 colord : Depends: policykit-1 (>= 0.103) but it is not going to be
installed
 init : PreDepends: systemd-sysv but it is not going to be installed or
                    sysvinit-core but it is not going to be installed or
                    upstart but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or
specify a solution).

In this case following the recommended advice reinstalls systemd, which was
kind of the opposite direction of what I was hoping for...



At some stage I will need to upgrade the kernel on this box, that will
support systemd properly (according to other reports), however will wait
and see if you need any more information on first.

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150508/a2f34719/attachment-0002.html>


More information about the Pkg-systemd-maintainers mailing list