package cgmanager 0.32-4ubuntu1.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1407954 reported by Kevin Cole
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
cgmanager (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Things that looked out of the ordinary:

(synaptic:6817): GLib-CRITICAL **: g_child_watch_add_full: assertion 'pid > 0' failed
debconf: unable to initialize frontend: Gnome
debconf: (Can't locate Gtk2.pm in @INC (you may need to install the Gtk2 module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.1 /usr/local/share/perl/5.20.1 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Gnome.pm line 91, <> line 18.)
debconf: falling back to frontend: Dialog
...
Setting up cgmanager (0.32-4ubuntu1.1) ...
insserv: warning: script 'K01cinestart' missing LSB tags and overrides
insserv: warning: script 'cinestart' missing LSB tags and overrides
Failed to get D-Bus connection: No connection to service manager.
Failed to get D-Bus connection: No connection to service manager.
invoke-rc.d: initscript cgmanager, action "start" failed.
dpkg: error processing package cgmanager (--configure):
 subprocess installed post-installation script returned error exit status 1
...
Installing new version of config file /etc/apparmor.d/abstractions/libvirt-qemu ...
insserv: warning: script 'K01cinestart' missing LSB tags and overrides
insserv: warning: script 'cinestart' missing LSB tags and overrides

ProblemType: Package
DistroRelease: Ubuntu 14.10
Package: cgmanager 0.32-4ubuntu1.1
ProcVersionSignature: Ubuntu 3.16.0-28.38-generic 3.16.7-ckt1
Uname: Linux 3.16.0-28-generic x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
Date: Tue Jan 6 07:15:50 2015
DuplicateSignature: package:cgmanager:0.32-4ubuntu1.1:subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2011-10-25 (1168 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: cgmanager
Title: package cgmanager 0.32-4ubuntu1.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to utopic on 2014-11-03 (64 days ago)

Revision history for this message
Kevin Cole (kjcole) wrote :
Changed in cgmanager (Ubuntu):
status: New → Invalid
Revision history for this message
Kevin Cole (kjcole) wrote :

Oops. Sorry 'bout that. This appears to be an artifact of my switching to systemd for a few months, and then finally giving up and switching back to upstart recently. (I still need to figure out what I need to fix, but it's probably not a bug in cgmanager.)

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

The dpkg terminal log show:

invoke-rc.d: initscript cgmanager, action "start" failed.

What happens when you try 'sudo service cgmanager start' at the command line?

Revision history for this message
Kevin Cole (kjcole) wrote :

$ sudo service cgmanager restart
[sudo] password for ...:
Failed to get D-Bus connection: No connection to service manager.
Failed to get D-Bus connection: No connection to service manager.
$

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1407954] Re: package cgmanager 0.32-4ubuntu1.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Could you try

sudo stop cgmanager || true
sudo /sbin/cgmanager -m name=systemd

and paste the output here? Maybe for good measure also do

sudo strace -f -ooutput /sbin/cgmanager -m name=systemd

and attach the file called 'output'

Thanks! It's possible this happened due to the switch to and from
systemd, but it still would be great to know what exactly happened
and whether it'll affect others.

 status: incomplete
 importance: high

Changed in cgmanager (Ubuntu):
importance: Undecided → High
status: Invalid → Incomplete
tags: removed: need-duplicate-check
Revision history for this message
Kevin Cole (kjcole) wrote :

$ sudo -i
Password:
$ stop cgmanager || true
Failed to get D-Bus connection: No connection to service manager.
$ /sbin/cgmanager -m name=systemd
cgmanager:setup_cgroup_dir: cgmanager is already running
cgmanager: Failed to set up cgmanager socket
$ strace -f -ostrace.log /sbin/cgmanager -m name=systemd
cgmanager:setup_cgroup_dir: cgmanager is already running
cgmanager: Failed to set up cgmanager socket
$ ls -lt | head
total 288
-rw-r--r-- 1 root root 7324 Jan 6 20:30 strace.log

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

That's particularly confusing - it appears you have cgmanager already running. Can you show the output of 'ps -ef' and attach /etc/init.d/cgmanager and /etc/init/cgmanager.conf?

Revision history for this message
Kevin Cole (kjcole) wrote :
Revision history for this message
Kevin Cole (kjcole) wrote :
Revision history for this message
Kevin Cole (kjcole) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi,

everything on your system looks ok. Does 'sudo apt-get install -f' still claim to have problems? Does 'cgm ping && echo ok || echo false' show 'ok' or 'false' ?

Changed in cgmanager (Ubuntu):
status: Incomplete → New
status: New → Incomplete
Revision history for this message
Kevin Cole (kjcole) wrote :

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  account-plugin-ubuntuone git-remote-bzr hello libcr0 libibverbs1 libsmpeg0
  libtorque2 musescore-common packagekit-tools qtdeclarative5-ubuntuone1.0
  tkdnd unity-scope-click-departmentsdb
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up cgmanager (0.32-4ubuntu1.1) ...
Failed to get D-Bus connection: No connection to service manager.
Failed to get D-Bus connection: No connection to service manager.
invoke-rc.d: initscript cgmanager, action "start" failed.
dpkg: error processing package cgmanager (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 cgmanager
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ $ cgm ping && echo ok || echo false
ok
$

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

So googling around, it does seem like probably a remnant of the systemd experiment. Could you test whether the following helps?

# sudo apt-get install dbus
# /etc/init.d/dbus status || sudo /etc/init.d/dbus start

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Also, how exactly did you switch to systemd, and how did you switch back to upstart?

Revision history for this message
Kevin Cole (kjcole) wrote :

First, problem solved(?), though not exactly sure how or if it's permanently solved, or if I've bollixed things up so much that I'll eventually need to reinstall from scratch.

To answer your request for more info:

dbus was already installed, and "/etc/init.d/dbus status || sudo /etc/init.d/dbus start"
had no apparent effect. That was several days ago, and the problems remained.

I converted to systemd originally following instructions in: https://wiki.ubuntu.com/systemd and later in: https://wiki.ubuntu.com/SystemdForUpstartUsers
changing GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash init=/lib/systemd/systemd"
in /etc/defaults/grub
then later changing it back.

At various points, I attemted to remove systemd packages that appeared to have zero or relatively few dependencies, and reinstalled upstart, to no avail.

Today, I went back to systemd again, reinstalled systemd-sysv, and did

systemctl start dbus.service
systemctl enable dbus.service
systemctl start leapd
systemctl enable leapd
systemctl start epmd.service
systemctl enable epmd.service
systemctl start rabbitmq-server.service
systemctl enable rabbitmq-server.service
systemctl daemon-reload

leapd.service for the Leap Motion was found in https://github.com/atejeda/leap-fedora-rpm and two different rabbitmq-server.service files were found, one in
ftp://ftp.pbone.net/mirror/ftp.opensuse.org/factory-snapshot/repo/oss/suse/x86_64/rabbitmq-server-3.3.5-1.3.x86_64.rpm
and the other in https://github.com/vonSchlotzkow/systemd-gentoo-units/blob/master/sys-apps/systemd-units/files/services-server/rabbitmq-server.service I am currently using the later.

Starting and enabling epmd was new this go-around today. I think previously, I had done all the other steps.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

That's all very mysterious... :( Thanks for the update.

Changed in cgmanager (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Christopher (soft-kristal) wrote :

Mine is related to bug 1385817.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.