package lxc 1.1.3-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 100

Bug #1490110 reported by tikend
52
This bug affects 11 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Confirmed
Critical
Unassigned
lxc (Ubuntu)
Confirmed
Critical
Unassigned

Bug Description

Error during do-releas-update -d from 15.04

ProblemType: Package
DistroRelease: Ubuntu 15.10
Package: lxc 1.1.3-0ubuntu1
ProcVersionSignature: Ubuntu 4.1.0-3.3-generic 4.1.3
Uname: Linux 4.1.0-3-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.18-0ubuntu7
Architecture: amd64
Date: Sat Aug 29 10:13:04 2015
DuplicateSignature: package:lxc:1.1.3-0ubuntu1:subprocess installed post-installation script returned error exit status 100
ErrorMessage: subprocess installed post-installation script returned error exit status 100
InstallationDate: Installed on 2015-08-13 (15 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
ProcCmdline: BOOT_IMAGE=/vmlinuz-4.1.0-3-generic.efi.signed root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
SourcePackage: lxc
Title: package lxc 1.1.3-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 100
UpgradeStatus: Upgraded to wily on 2015-08-29 (0 days ago)
defaults.conf:
 lxc.network.type = veth
 lxc.network.link = lxcbr0
 lxc.network.flags = up
 lxc.network.hwaddr = 00:16:3e:xx:xx:xx

Revision history for this message
tikend (metodrybar) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: unknown initscript, /etc/init.d/lxc not found.

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

Can you show the contents of

/lib/systemd/system/lxc-net.service

?

Changed in lxc (Ubuntu):
status: New → Incomplete
Revision history for this message
tikend (metodrybar) wrote :

[Unit]
Description=LXC network bridge setup
After=network.target
Before=lxc.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/x86_64-linux-gnu/lxc/lxc-net start
ExecStop=/usr/lib/x86_64-linux-gnu/lxc/lxc-net stop

[Install]
WantedBy=multi-user.target

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1490110] Re: package lxc 1.1.3-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 100

Do you get further failures upon reboots, or, if you have
not rebooted, upon doing

sudo apt-get install --reinstall lxc

?

Revision history for this message
tikend (metodrybar) wrote :

No error after

sudo apt-get install --reinstall lxc

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

I can't seem to reproduce this.

I'll leave the bug in 'incomplete' status (meaning more info needed). If someone else runs into it we an add their information.

Revision history for this message
Stuart Bishop (stub) wrote :

Upgrade to wily failed here with this error. Possible trigger was having juju-local installed, which seemed to create a bit of a dependency mess with juju-local, lxc-templates and lxc.

Revision history for this message
Stuart Bishop (stub) wrote :

2015-09-29 10:30:55,881 INFO cache.commit()
2015-09-29 10:30:55,881 DEBUG failed to SystemUnLock() (E:Not locked)
2015-09-29 11:04:11,358 ERROR got an error from dpkg for pkg: 'lxc': 'subprocess installed post-installation script returned error exit status 100'
2015-09-29 11:04:11,358 DEBUG running apport_pkgfailure() lxc: subprocess installed post-installation script returned error exit status 100
2015-09-29 11:04:11,362 ERROR got an error from dpkg for pkg: 'lxc': 'subprocess installed post-installation script returned error exit status 100'
2015-09-29 11:04:36,574 ERROR got an error from dpkg for pkg: 'lxc-templates': 'dependency problems - leaving unconfigured'
2015-09-29 11:04:36,574 DEBUG running apport_pkgfailure() lxc-templates: dependency problems - leaving unconfigured
2015-09-29 11:04:36,574 DEBUG dpkg error because of dependency problems, not reporting against lxc-templates
2015-09-29 11:04:36,574 ERROR got an error from dpkg for pkg: 'lxc-templates': 'dependency problems - leaving unconfigured'
2015-09-29 11:04:38,001 ERROR got an error from dpkg for pkg: 'juju-local': 'dependency problems - leaving unconfigured'
2015-09-29 11:04:38,001 DEBUG running apport_pkgfailure() juju-local: dependency problems - leaving unconfigured
2015-09-29 11:04:38,001 DEBUG dpkg error because of dependency problems, not reporting against juju-local
2015-09-29 11:04:38,001 ERROR got an error from dpkg for pkg: 'juju-local': 'dependency problems - leaving unconfigured'
2015-09-29 11:05:14,645 ERROR got an error from dpkg for pkg: 'lxc': 'subprocess installed post-installation script returned error exit status 100'
2015-09-29 11:05:14,645 DEBUG running apport_pkgfailure() lxc: subprocess installed post-installation script returned error exit status 100
2015-09-29 11:05:14,650 ERROR got an error from dpkg for pkg: 'lxc': 'subprocess installed post-installation script returned error exit status 100'
2015-09-29 11:05:18,267 ERROR not handled expection:
SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1), E:Sub-process /usr/bin/dpkg returned an error code (1)

2015-09-29 11:05:18,267 DEBUG running apport_crash()
2015-09-29 11:05:23,083 ERROR SystemError from cache.commit(): installArchives() failed
2015-09-29 11:05:39,322 ERROR not handled expection:
Traceback (most recent call last):

  File "/tmp/ubuntu-release-upgrader-fr1j7u5b/DistUpgrade/DistUpgradeController.py", line 1137, in doDistUpgrade
    res = self.cache.commit(fprogress,iprogress)

  File "/tmp/ubuntu-release-upgrader-fr1j7u5b/DistUpgrade/DistUpgradeCache.py", line 267, in commit
    apt.Cache.commit(self, fprogress, iprogress)

  File "/usr/lib/python3/dist-packages/apt/cache.py", line 505, in commit
    if fetch_progress is None:

SystemError: installArchives() failed

During handling of the above exception, another exception occurred:

TypeError: wait_for_child() takes 1 positional argument but 2 were given

2015-09-29 11:05:39,322 DEBUG running apport_crash()

Revision history for this message
Stuart Bishop (stub) wrote :
Revision history for this message
Stuart Bishop (stub) wrote :
Changed in lxc (Ubuntu):
status: Incomplete → New
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi @stub,

can you show what

sudo systemctl status lxc

and

sudo service lxc status

show?

Changed in lxc (Ubuntu):
status: New → Incomplete
Revision history for this message
Huygens (huygens-25) wrote :

I had the same problem while upgrading from 15.04 to 15.10 today.
I had 1 ppa installed on this system (ppa:ubuntu-lxc/stable) which I reverted before doing the upgrade using the ppa-purge tool.
After purging this ppa from my system, I proceeded with the upgrade and it failed like this bug report mention.

As for the 2 commands they return both the same thing (note that I run these 2 commands after having done "sudo apt update; sudo apt upgrade" which seems to have fixed the lxc and lxc-template set up):

$ sudo systemctl status lxc
● lxc.service - LXC Container Initialization and Autoboot Code
   Loaded: loaded (/lib/systemd/system/lxc.service; enabled; vendor preset: enabled)
   Active: active (exited) since Thu 2015-10-01 19:11:26 CEST; 2h 39min ago
 Main PID: 27092 (code=exited, status=0/SUCCESS)

Oct 01 19:11:26 ubuntu systemd[1]: Starting LXC Container Initialization and Autoboot Code...
Oct 01 19:11:26 ubuntu lxc-devsetup[27076]: /dev is devtmpfs
Oct 01 19:11:26 ubuntu systemd[1]: Started LXC Container Initialization and Autoboot Code.
Oct 01 19:11:27 ubuntu systemd[1]: Started LXC Container Initialization and Autoboot Code.
$ sudo service lxc status
● lxc.service - LXC Container Initialization and Autoboot Code
   Loaded: loaded (/lib/systemd/system/lxc.service; enabled; vendor preset: enabled)
   Active: active (exited) since Thu 2015-10-01 19:11:26 CEST; 2h 40min ago
 Main PID: 27092 (code=exited, status=0/SUCCESS)

Oct 01 19:11:26 ubuntu systemd[1]: Starting LXC Container Initialization and Autoboot Code...
Oct 01 19:11:26 ubuntu lxc-devsetup[27076]: /dev is devtmpfs
Oct 01 19:11:26 ubuntu systemd[1]: Started LXC Container Initialization and Autoboot Code.
Oct 01 19:11:27 ubuntu systemd[1]: Started LXC Container Initialization and Autoboot Code.

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

So you installed ppa:ubuntu-lxc/stable in vivid, then ran ppa-purge to
revert to archive packaging, then ran do-release-upgrade, which then
failed?

Revision history for this message
Stuart Bishop (stub) wrote :

stub@aargh:~$ sudo systemctl status lxc
● lxc.service - LXC Container Initialization and Autoboot Code
   Loaded: loaded (/lib/systemd/system/lxc.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2015-10-12 16:57:31 ICT; 20h ago
  Process: 1190 ExecStart=/usr/lib/x86_64-linux-gnu/lxc/lxc-containers start (code=exited, status=0/SUCCESS)
  Process: 1175 ExecStartPre=/usr/lib/x86_64-linux-gnu/lxc/lxc-apparmor-load (code=exited, status=0/SUCCESS)
  Process: 1166 ExecStartPre=/usr/lib/x86_64-linux-gnu/lxc/lxc-devsetup (code=exited, status=0/SUCCESS)
 Main PID: 1190 (code=exited, status=0/SUCCESS)
   Memory: 0B
      CPU: 0
   CGroup: /system.slice/lxc.service

Oct 12 16:57:31 aargh systemd[1]: Starting LXC Container Initialization and Autoboot Code...
Oct 12 16:57:31 aargh lxc-devsetup[1166]: Creating /dev/.lxc
Oct 12 16:57:31 aargh lxc-devsetup[1166]: /dev is devtmpfs
Oct 12 16:57:31 aargh lxc-devsetup[1166]: Creating /dev/.lxc/user
Oct 12 16:57:31 aargh systemd[1]: Started LXC Container Initialization and Autoboot Code.
stub@aargh:~$ sudo service lxc status
● lxc.service - LXC Container Initialization and Autoboot Code
   Loaded: loaded (/lib/systemd/system/lxc.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2015-10-12 16:57:31 ICT; 20h ago
  Process: 1190 ExecStart=/usr/lib/x86_64-linux-gnu/lxc/lxc-containers start (code=exited, status=0/SUCCESS)
  Process: 1175 ExecStartPre=/usr/lib/x86_64-linux-gnu/lxc/lxc-apparmor-load (code=exited, status=0/SUCCESS)
  Process: 1166 ExecStartPre=/usr/lib/x86_64-linux-gnu/lxc/lxc-devsetup (code=exited, status=0/SUCCESS)
 Main PID: 1190 (code=exited, status=0/SUCCESS)
   Memory: 0B
      CPU: 0
   CGroup: /system.slice/lxc.service

Oct 12 16:57:31 aargh systemd[1]: Starting LXC Container Initialization and Autoboot Code...
Oct 12 16:57:31 aargh lxc-devsetup[1166]: Creating /dev/.lxc
Oct 12 16:57:31 aargh lxc-devsetup[1166]: /dev is devtmpfs
Oct 12 16:57:31 aargh lxc-devsetup[1166]: Creating /dev/.lxc/user
Oct 12 16:57:31 aargh systemd[1]: Started LXC Container Initialization and Autoboot Code.
stub@aargh:~$

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

@stub - ok so yours all look ok.

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

I'm going to leave this as incomplete until we have a recipe for how to reproduce.

Revision history for this message
Huygens (huygens-25) wrote :

Hi Serge,

Sorry for the long delay in replying, I overlooked the email notification.

Yes that is almost correct, I add previously installed the ppa:ubuntu-lxc/lxd-stable (so the LXD one not ppa:ubuntu-lxc/stable as you mentioned) in Vivid. But before doing the upgrade I installed the ppa-purge tool and used it to remove this ppa (which was by the way the only 3rd party source on my system).

After a successful ppa-purge, I went on and did a do-release-upgrade which then failed, or actually it did not complete successfully. So I was still able to reboot the machine and Wily was the new system. LXC was broken after the reboot. But I did: "apt update; apt upgrade; apt full-upgrade" which fixed the it by properly installing LXC.

One thing was then missing from the upgrade process: because of the failure with the LXC package, the cleaning at the end of the upgrade (when executing do-release-upgrade) did not happen. So I had lots of obsolete or dandling packages which I had to look for and remove manually.

I guess a way to reproduce it is:

  1. Install Ubuntu 15.04
  2. Make sure the system is up to date: apt update; apt full-upgrade; reboot
  3. Install from the Ubuntu repository the following packages: lxc lxc-templates
  4. Install ppa:ubuntu-lxc/lxd-stable and install the following packages: lxc lxd lxc-templates
  5. (I don't think a reboot is necessary to proceed, but I'm not 100% sure)
  6. Install ppa-purge and remove the installed ppa from step 3 (this should install back the previous packages from the Ubuntu repos)
  7. Perform a release upgrade to Wily: di-release-upgrade -d
  8. Boom! (or at least it did that on 2 machines here!) :-)

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

Thanks, confirmed. the error I see is:

Processing triggers for resolvconf (1.77ubuntu1) ...
Errors were encountered while processing:
 lxc
 lxc-templates
 lxd
Error in function:

SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 102, in apport_excepthook
    pr.add_proc_info(extraenv=['PYTHONPATH', 'PYTHONHOME'])
  File "/usr/lib/python3/dist-packages/apport/report.py", line 535, in add_proc_info
    raise ValueError('%s does not exist' % self['ExecutablePath'])
ValueError: /usr/bin/python3.4 (deleted) does not exist

Changed in lxc (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Medium
Revision history for this message
Robie Basak (racb) wrote :

I also get "ValueError: /usr/bin/python3.4 (deleted) does not exist" by starting with a Vivid cloud image, installing lxc and juju-local from the archive, and then do-release-upgrade -d to Wily. So this will happen to every Juju charm developer on upgrade, I think. No PPA required.

Separate from this I got the original:

initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: unknown initscript, /etc/init.d/lxc not found.

when I upgraded my main machine to Wily just now. In fact the

initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

was repeated all over the upgrade. I wonder if this only happens when the system was previously upgraded from an upstart-running system, and we have two bugs here?

I think this should be Importance: Critical and needs to be fixed before Wily release as we don't want upgraders failing just because they were experimenting with charm development - and this reproduces entirely from the archive without any PPAs.

Revision history for this message
Robie Basak (racb) wrote :

Oh, I'm sorry. In my reproducer the error visible on the screen was "ValueError: /usr/bin/python3.4 (deleted) does not exist" but apport reported DpkgTerminalLog with "invoke-rc.d: unknown initscript, /etc/init.d/lxc not found." so I think they are just one bug.

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

I still think the bug is actually not in lxc. If I take a vivid cloud image, manually install the wily lxc packages with dpkg, that works. Then do-release-upgrade still fails.

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

SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 102, in apport_excepthook
    pr.add_proc_info(extraenv=['PYTHONPATH', 'PYTHONHOME'])
  File "/usr/lib/python3/dist-packages/apport/report.py", line 535, in add_proc_info
    raise ValueError('%s does not exist' % self['ExecutablePath'])
ValueError: /usr/bin/python3.4 (deleted) does not exist

apport is trying to report on

root 2584 2583 0 16:54 pts/1 00:00:12 /usr/bin/python3 /tmp/ubuntu-release-upgrader-_4pcnnvn/wily --mode=server --frontend=DistUpgradeViewText --devel-release

but that python binary has been deleted:

sudo ls -l /proc/2584/exe
lrwxrwxrwx 1 root root 0 Oct 21 17:02 /proc/2584/exe -> /usr/bin/python3.4 (deleted)

So at least there is an apport bug here that apport should know about deleted files.

Changed in lxc (Ubuntu):
importance: Medium → Critical
Changed in apport (Ubuntu):
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Raising priority since as rbasak pointed out, all vivid cloud image updates to wily will hit this.

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

The original complaint appears to be:

dpkg: dependency problems prevent configuration of liblxc1:
 liblxc1 depends on libdbus-1-3 (>= 1.9.14); however:
  Version of libdbus-1-3:amd64 on system is 1.8.12-1ubuntu5.

The libdbus version being installed is higher than that.

Note that that dependency is automatically added (it's not in debian/control).

We could require dbus upgrade to happen before lxc.

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

But even when pre-installing the newer dbus, it still fails with the invoke-rc.d failure.

I can't explain that one, have no idea why it is trying to use the /etc/init.d script.

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

Other bug subscribers

Remote bug watches

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