lucid upgrade to precise fails (lxdm: subprocess installed post-installation script returned error exit status 1)

Bug #1045285 reported by Dave Howorth on 2012-09-03
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxdm (Ubuntu)
Undecided
Unassigned
update-manager (Ubuntu)
Undecided
Unassigned

Bug Description

I tried to upgrade a machine from 10.04 to 12.04. It failed with symptoms similar to those described in

https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/990740

but following guidance there, I am opening my own report to avoid mixing symptoms of possibly different bugs. I'm new to the whole launchpad process so please be gentle. I tried to use ubuntu-bug to report the bug, but it failed, so I'm reporting manually:

$ ubuntu-bug update-manager
Traceback (most recent call last):
  File "/usr/share/apport/apport-gtk", line 15, in <module>
    from apport import unicode_gettext as _
  File "/usr/lib/python2.6/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.6/dist-packages/apport/report.py", line 18, in <module> from problem_report import ProblemReport
ImportError: No module named problem_report

More in the next post if this works ...

Dave Howorth (dhoworth) wrote :

OK. I seem to have created the bug at least. Brief summary:

* when the point release of precise came out, I tried to upgrade a machine running lucid (fully updated)

* I'm afraid I don't remember the exact sequence of commands I used but there's a mail thread starting at https://lists.ubuntu.com/archives/ubuntu-users/2012-August/263204.html that describes what I thought I did (I've been on holiday for a week). In particular, I'm not sure whether I ran any other commands before do-release-upgrade

* I've tried various commands listed in the other bug, but they've all failed. I'll attach the output from those commands and all the logs I listed in the email thread as separate attachments.

At this point, I'd like to discover a way to nurse the system back to health. I'd also like to contribute whatever I can to solving the issue so it doesn't bite more people.

tags: added: dist-upgrade
Dave Howorth (dhoworth) wrote :
Jean-Baptiste Lallement (jibel) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. Could you please add the log files from '/var/log/dist-upgrade/' to this bug report as separate attachments? Thanks in advance.

Changed in update-manager (Ubuntu):
status: New → Incomplete
Dave Howorth (dhoworth) wrote :
Dave Howorth (dhoworth) wrote :

I don't seem to be able to attach apt-clone_system_state.tar.gz

Dave Howorth (dhoworth) wrote :
Dave Howorth (dhoworth) wrote :
Dave Howorth (dhoworth) wrote :
Dave Howorth (dhoworth) wrote :
Dave Howorth (dhoworth) wrote :
Dave Howorth (dhoworth) wrote :
Dave Howorth (dhoworth) wrote :

OK, the difficulty with apt-clone_system_state.tar.gz was 0600 file permissions.

That's all in the directory itself. There are two subdirectories:

20120824-1416:
total 960
-rw------- 1 root root 470593 Jul 14 2010 apt-term.log
-rw-r--r-- 1 root root 38383 Jul 14 2010 apt.log
-rw-r--r-- 1 root root 669 Aug 24 14:16 main.log
-rw-r--r-- 1 root root 454141 Jul 14 2010 term.log
-rw-r--r-- 1 root root 74 Jul 14 2010 xorg_fixup.log

20120824-1418:
total 24
-rw------- 1 root root 1502 Aug 24 14:18 apt-term.log
-rw-r--r-- 1 root root 74 Aug 24 14:18 apt.log
-rw-r--r-- 1 root root 223 Aug 24 14:18 history.log
-rw-r--r-- 1 root root 49 Aug 24 14:18 main.log
-rw-r--r-- 1 root root 4247 Aug 24 14:18 main_pre_req.log

Those files follow

Dave Howorth (dhoworth) wrote :

20120824-1416

Dave Howorth (dhoworth) wrote :

20120824-1416

Dave Howorth (dhoworth) wrote :

20120824-1416

Dave Howorth (dhoworth) wrote :

20120824-1416

Dave Howorth (dhoworth) wrote :

20120824-1416

Dave Howorth (dhoworth) wrote :

20120824-1418

Dave Howorth (dhoworth) wrote :

20120824-1418

Dave Howorth (dhoworth) wrote :

20120824-1418

Dave Howorth (dhoworth) wrote :

20120824-1418

Dave Howorth (dhoworth) wrote :

20120824-1418

Dave Howorth (dhoworth) wrote :

That's all the logs. Shall I attach output from the various commands I've run?

Dave Howorth (dhoworth) on 2012-09-03
Changed in update-manager (Ubuntu):
status: Incomplete → New
Dave Howorth (dhoworth) wrote :

output from $ dpkg --get-selections >packages.txt

Marius Gedminas (mgedmin) wrote :

The first error in screenlog.0 was

    Setting up lxdm (0.4.1-0ubuntu6) ...
    Installing new version of config file /etc/lxdm/lxdm.conf ...
    Installing new version of config file /etc/lxdm/Xsession ...
    Installing new version of config file /etc/pam.d/lxdm ...
    Installing new version of config file /etc/init/lxdm.conf ...
    dpkg: error processing lxdm (--configure):
     subprocess installed post-installation script returned error exit status 1
    Processing triggers for libc-bin ...
    No apport report written because MaxReports is reached already
    ldconfig deferred processing now taking place
    Errors were encountered while processing:
     lxdm

To debug why the lxdm postinst script fails, you need to edit /var/lib/dpkg/info/lxdm.postinst and change the line that says

    set -e

to

    set -ex

to enable verbose output, then run 'sudo dpkg --configure -a' and attach the output here.

If you could do this, it would help any other users that might encounter the same problem during upgrades.

Dave Howorth (dhoworth) wrote :

Marius, many thanks for looking at this. I edited the config file and the output from dpkg --configure -a &> /tmp/dpkg.log is attached. Two comments about the debugging output:

(1) the perl locale error just before it is familiar to me. It's a result of some conflict in configuration that I've never sorted out between the machine that has the problem and my main desktop machine (see #2).

(2) I see mention of two display managers: lxdm & lightdm. I'm guessing that lxdm is used by 10.04 and is to be replaced by lightdm in 12.04? Anyway, neither is running according to ps. The machine's console is showing a splash screen (ubuntu with 5 red diamonds) and it does not respond to the keyboard (ESC, or CTRL-ALT-F1 etc). I'm running all commands via ssh from my main desktop.

Marius Gedminas (mgedmin) wrote :

As far as I can tell, this bug happens in lxdm's postinst script, in this bit:

      DAEMON_NAME=$(which "$DEFAULT_DISPLAY_MANAGER" 2>/dev/null)

when 'which' fails to find the default display manager (lightdm in your case), it returns with a non-zero return code, which stops the postinst script from executing because of the 'set -e' at the top.

I think the fix would be to modify lightdm's postinst to do

      DAEMON_NAME=$(which "$DEFAULT_DISPLAY_MANAGER" 2>/dev/null || true)

summary: - lucid upgrade to precise fails
+ lucid upgrade to precise fails (lxdm: subprocess installed post-
+ installation script returned error exit status 1)
Dave Howorth (dhoworth) wrote :

Thanks for the suggestion. I have made that change to /var/lib/dpkg/info/lxdm.postinst (note - NOT lightdm's postinst - I can't find that in /var/lib/dpkg/info/).

I wasn't certain what I was supposed to do next, so I then tried "dpkg --configure -a" again. It failed again and I attach its log. Please let me know if I should have tried something else.

Dave Howorth (dhoworth) wrote :

Log from

apt-get -f install &> /tmp/apt-get-f-install.log

as requested by Marius at

https://lists.ubuntu.com/archives/ubuntu-users/2012-September/263460.html

It failed again. :( Since it's now apparently producing python-related error messages instead of lxdm-related ones, I've stopped there and am looking for further guidance.

Dave Howorth (dhoworth) wrote :

log from running

# apt-get -f install

Dave Howorth (dhoworth) wrote :

log from running

# apt-get install -o APT::Immediate-Configure=false -f apt python-minimal update-manager-core vim-gnome

Dave Howorth (dhoworth) wrote :

log from running

# apt-get install -o APT::Immediate-Configure=false -f apt python-minimal python2.7 libpython2.7 libperl5.14 tcl8.5

Dave Howorth (dhoworth) wrote :

$ ls -1 /etc/apt/sources.list.d
google-chrome.list.distUpgrade
google-chrome.list.save
libreoffice-ppa-lucid.list
libreoffice-ppa-lucid.list.distUpgrade
libreoffice-ppa-lucid.list.save
medibuntu.list
ubuntu-wine-ppa-lucid.list
ubuntu-wine-ppa-lucid.list.distUpgrade
ubuntu-wine-ppa-lucid.list.save

plus attached sources.list

Dave Howorth (dhoworth) wrote :
Download full text (4.7 KiB)

$ ls -1 /var/lib/apt/lists/
archive.canonical.com_ubuntu_dists_precise_partner_binary-i386_Packages
archive.canonical.com_ubuntu_dists_precise_partner_source_Sources
archive.canonical.com_ubuntu_dists_precise_Release
archive.canonical.com_ubuntu_dists_precise_Release.gpg
gb.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
gb.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en%5fGB
gb.archive.ubuntu.com_ubuntu_dists_precise_main_source_Sources
gb.archive.ubuntu.com_ubuntu_dists_precise_multiverse_binary-i386_Packages
gb.archive.ubuntu.com_ubuntu_dists_precise_multiverse_i18n_Translation-en%5fGB
gb.archive.ubuntu.com_ubuntu_dists_precise_multiverse_source_Sources
gb.archive.ubuntu.com_ubuntu_dists_precise_Release
gb.archive.ubuntu.com_ubuntu_dists_precise_Release.gpg
gb.archive.ubuntu.com_ubuntu_dists_precise_restricted_binary-i386_Packages
gb.archive.ubuntu.com_ubuntu_dists_precise_restricted_i18n_Translation-en%5fGB
gb.archive.ubuntu.com_ubuntu_dists_precise_restricted_source_Sources
gb.archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages
gb.archive.ubuntu.com_ubuntu_dists_precise_universe_i18n_Translation-en%5fGB
gb.archive.ubuntu.com_ubuntu_dists_precise_universe_source_Sources
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_main_i18n_Translation-en%5fGB
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_main_source_Sources
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_multiverse_binary-i386_Packages
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_multiverse_i18n_Translation-en%5fGB
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_multiverse_source_Sources
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_Release
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_Release.gpg
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-i386_Packages
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_i18n_Translation-en%5fGB
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_source_Sources
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_universe_binary-i386_Packages
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_universe_i18n_Translation-en%5fGB
gb.archive.ubuntu.com_ubuntu_dists_precise-updates_universe_source_Sources
lock
partial/
security.ubuntu.com_ubuntu_dists_precise-security_main_binary-i386_Packages
security.ubuntu.com_ubuntu_dists_precise-security_main_source_Sources
security.ubuntu.com_ubuntu_dists_precise-security_multiverse_binary-i386_Packages
security.ubuntu.com_ubuntu_dists_precise-security_multiverse_source_Sources
security.ubuntu.com_ubuntu_dists_precise-security_Release
security.ubuntu.com_ubuntu_dists_precise-security_Release.gpg
security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages
security.ubuntu.com_ubuntu_dists_precise-security_restricted_source_Sources
security.ubuntu.com_ubuntu_dists_precise-security_universe_binary-i386_Packages
security.ubuntu.com_ubuntu_dists_precise-security_universe_source_Sources
$

$ dpkg -s python
Package: python
Status: install ok installed
Priority: important
Section: python
Installed-Size: 6...

Read more...

Dave Howorth (dhoworth) wrote :

log from running

# apt-get install -o APT::Immediate-Configure=false -f

Dave Howorth (dhoworth) wrote :

OK, my problem is fixed. After prompting by Marius - https://lists.ubuntu.com/archives/ubuntu-users/2012-September/263520.html - I finally tried the workaround noted at https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/990740/comments/3

That is:

  apt-get-install-o-APT::Immediate-Configure=false-f
  do-release-upgrade

worked for me.

To post a comment you must log in.