package update-manager 1:0.93.34 failed to install/upgrade: ErrorMessage: SystemError in cache.commit(): E:Sub-process /usr/bin/dpkg returned an error code (1)

Bug #313959 reported by LukeKendall
2
Affects Status Importance Assigned to Milestone
dovecot (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: update-manager

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu.

Release is 8.04, despite the above tips returning 8.10, because it happened during a distribution upgrade from 8.04 to 8.10

2) The version of the package you are using, via 'apt-cache policy packagename' or by checking in Synaptic.

# apt-cache policy update-manager
update-manager:
  Installed: 1:0.93.34
  Candidate: 1:0.93.34
  Version table:
 *** 1:0.93.34 0
        500 http://au.archive.ubuntu.com intrepid-updates/main Packages
        100 /var/lib/dpkg/status
     1:0.93.32 0
        500 http://au.archive.ubuntu.com intrepid/main Packages

3) What you expected to happen
4) What happened instead

Upgrading from a patched/repaired 8.04 release following a power
failure and a smashed filesystem.

Failed when I tried an experimental 3 way merge of the dovecot
config file - an error panel popped up immediately saying that
the dovecot upgrade had failed.

apt-term.log says:

Setting up tk8.3-dev (8.3.5-13) ...^M
Setting up dovecot-common (1:1.1.4-0ubuntu1.2) ...^M
Installing new version of config file /etc/init.d/dovecot ...^M
Merging changes into the new version^M
^M
 Conflicts found! Please edit `/etc/dovecot/dovecot.conf' and sort them out manually.^M
 The file `/etc/dovecot/dovecot.conf.ucf-new' has a record of the failed merge of the configuration file.^M
^M
dpkg: error processing dovecot-common (--configure):^M
 subprocess post-installation script returned error exit status 3^M
dpkg: dependency problems prevent configuration of dovecot-imapd:^M
 dovecot-imapd depends on dovecot-common (= 1:1.1.4-0ubuntu1.2); however:^M
  Package dovecot-common is not configured yet.^M
dpkg: error processing dovecot-imapd (--configure):^M
 dependency problems - leaving unconfigured^M
Setting up eximon4 (4.69-5ubuntu2) ...^M
...
Processing triggers for initramfs-tools ...^M
update-initramfs: Generating /boot/initrd.img-2.6.27-9-generic^M
Errors were encountered while processing:^M
 dovecot-common^M
 dovecot-imapd^M
Log ended: 2009-01-05 11:47:40

At the very end of the upgrade, an error panel popped up titled
"Could not install the upgrades" and whose body said:
"The upgrade aborts now. Your system could be in an unusable state. A recovery will run now (dpkg --configure -a)."

When I re-ran update-manager it did not offer the option to do
a distribution upgrade. It's possible it thinks the upgrade completed
( I see that /etc/issue says it's 8.10, although I have still not
attempted a reboot to see if it's really upgraded and working).

From apt.log (don't know if this is relevant, but I remember tetex package had been broken some months earlier somehow):

...
Installing gpgv as dep of gnupg
Starting
Starting 2
WARNING: Failed to read mirror file
Investigating libvolume-id0
Package libvolume-id0 has broken dep on libvolumeid0
  Considering libvolumeid0 4 as a solution to libvolume-id0 21
  Added libvolumeid0 to the remove list
  Fixing libvolume-id0 via remove of libvolumeid0
Investigating libnfsidmap2
Package libnfsidmap2 has broken dep on libnfsidmap1
  Considering libnfsidmap1 2 as a solution to libnfsidmap2 2
  Holding Back libnfsidmap2 rather than change libnfsidmap1
Investigating human-theme
Package human-theme has broken dep on human-gtk-theme
  Considering human-gtk-theme 0 as a solution to human-theme 2
  Added human-gtk-theme to the remove list
  Fixing human-theme via remove of human-gtk-theme
Investigating python-apport
Package python-apport has broken dep on python-apport-utils
  Considering python-apport-utils 0 as a solution to python-apport 2
  Added python-apport-utils to the remove list
  Fixing python-apport via remove of python-apport-utils
Investigating nfs-common
Package nfs-common has broken dep on libnfsidmap2
  Considering libnfsidmap2 2 as a solution to nfs-common 1
  Holding Back nfs-common rather than change libnfsidmap2
Investigating openoffice.org-dev
Package openoffice.org-dev has broken dep on libstlport5.1-dev
  Considering libstlport5.1-dev 1 as a solution to openoffice.org-dev 0
  Removing openoffice.org-dev rather than change libstlport5.1-dev
Investigating nfs-kernel-server
Package nfs-kernel-server has broken dep on libnfsidmap2
  Considering libnfsidmap2 2 as a solution to nfs-kernel-server 0
  Holding Back nfs-kernel-server rather than change libnfsidmap2
 Try to Re-Instate nfs-common
 Try to Re-Instate nfs-kernel-server
Done
Installing libnfsidmap2 as dep of nfs-kernel-server
Starting
Starting 2
Investigating libnfsidmap2
Package libnfsidmap2 has broken dep on libnfsidmap1
  Considering libnfsidmap1 1 as a solution to libnfsidmap2 2
  Added libnfsidmap1 to the remove list
  Fixing libnfsidmap2 via remove of libnfsidmap1
Done
MarkUpgrade() called on a non-upgrable pkg: 'ubuntu-desktop'
ERROR:root:got an error from dpkg for pkg: 'tetex-base': 'subprocess post-installation script returned error exit status 1
'
ERROR:root:got an error from dpkg for pkg: 'tetex-base': 'subprocess post-installation script returned error exit status 1
'
ERROR:root:got an error from dpkg for pkg: 'tetex-bin': 'dependency problems - leaving unconfigured
'
ERROR:root:got an error from dpkg for pkg: 'tetex-bin': 'dependency problems - leaving unconfigured
'
ERROR:root:got an error from dpkg for pkg: 'dvipng': 'dependency problems - leaving unconfigured
'
ERROR:root:got an error from dpkg for pkg: 'dvipng': 'dependency problems - leaving unconfigured
'
ERROR:root:got an error from dpkg for pkg: 'tetex-extra': 'dependency problems - leaving unconfigured
'
ERROR:root:got an error from dpkg for pkg: 'tetex-extra': 'dependency problems - leaving unconfigured
'
ERROR:root:SystemError from cache.commit(): installArchives() failed
Installing xserver-xorg-core as dep of xserver-xorg
...

From term.log the relevant bit seems to be:

Processing triggers for initramfs-tools ...
...
update-initramfs: Generating /boot/initrd.img-2.6.27-9-generic
Errors were encountered while processing:
 dovecot-common
 dovecot-imapd
Traceback (most recent call last):
  File "/usr/lib/python2.5/logging/__init__.py", line 753, in emit
    self.flush()
  File "/usr/lib/python2.5/logging/__init__.py", line 731, in flush
    self.stream.flush()
IOError: [Errno 9] Bad file descriptor
IOError: [Errno 9] Bad file descriptor
IOError: [Errno 9] Bad file descriptor
intrepid: Fatal IO error 9 (Bad file descriptor) on X server :0.0.
Setting up dovecot-common (1:1.1.4-0ubuntu1.2) ...
Package configuration
    ┌───────────────────┤ Modified configuration file ├───────────────────┐
    │ A new version of configuration file /etc/dovecot/dovecot.conf is │
    │ available, but the version installed currently has been locally │
    │ modified. │
    │ │
    │ What would you like to do about dovecot.conf? │
    │ │
    │ install the package maintainer's version │
    │ keep the local version currently installed │
    │ show the differences between the versions │
    │ show a side-by-side difference between the versions │
    │ show a 3-way difference between available versions │
    │ do a 3-way merge between available versions (experimental) │
    │ start a new shell to examine the situation │
    │ │
    │ │
    │ <Ok> │
    │ │
    └─────────────────────────────────────────────────────────────────────┘

Errors were encountered while processing:
 dovecot-common
 dovecot-imapd
Traceback (most recent call last):
  File "/usr/lib/python2.5/logging/__init__.py", line 753, in emit
    self.flush()
  File "/usr/lib/python2.5/logging/__init__.py", line 731, in flush
    self.stream.flush()
IOError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/usr/lib/python2.5/logging/__init__.py", line 753, in emit
    self.flush()
  File "/usr/lib/python2.5/logging/__init__.py", line 731, in flush
    self.stream.flush()
IOError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/usr/lib/python2.5/logging/__init__.py", line 753, in emit
    self.flush()
  File "/usr/lib/python2.5/logging/__init__.py", line 731, in flush
    self.stream.flush()
IOError: [Errno 9] Bad file descriptor
intrepid: Fatal IO error 9 (Bad file descriptor) on X server :0.0.
Setting up dovecot-common (1:1.1.4-0ubuntu1.2) ...
Replacing config file /etc/dovecot/dovecot-ldap.conf with new version
Replacing config file /etc/dovecot/dovecot-sql.conf with new version
You already have ssl certs for dovecot.
Setting up dovecot-imapd (1:1.1.4-0ubuntu1.2) ...
 * Restarting IMAP/POP3 mail server dovecot [ OK ]
/usr/lib/python2.5/site-packages/apt/__init__.py:18: FutureWarning: apt API not stable yet
  warnings.warn("apt API not stable yet", FutureWarning)

luke

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 8.10
ErrorMessage: ErrorMessage: SystemError in cache.commit(): E:Sub-process /usr/bin/dpkg returned an error code (1)

Package: update-manager 1:0.93.34
PackageArchitecture: all
SourcePackage: update-manager
Title: package update-manager 1:0.93.34 failed to install/upgrade: ErrorMessage: SystemError in cache.commit(): E:Sub-process /usr/bin/dpkg returned an error code (1)
Uname: Linux 2.6.22-15-generic i686

Revision history for this message
LukeKendall (luke-zeta) wrote :
Revision history for this message
LukeKendall (luke-zeta) wrote :

Okay, all looks good now. The dist-upgrade appears to have
worked, mail is being sent and received, and my manual
fixes to grub's menu.lst seemed to work well until it got to the point of starting the Gnome Display Manager. An alert
panel (text mode) popped saying:

Server Authorization directory (daemon/ServAuthDir) is set to
/var/lib/gdm but is not owned by user 108 and group 113. Please
correct the ownership or GDM configuration and restart GDM.

                             OK

Now, /var/lib/gdm is listed as user and group gdm, and ls -ldn
of /var/lib/gdm shows it is owned by user 108 and group 113.
gdm is in /etc/passwd (uid 108) and /etc/groups (gid 113).
Directory permissions are:
drwxr-x--- 3 108 113 4096 2009-01-05 16:39 /var/lib/gdm
drwxr-x--- 3 gdm gdm 4096 2009-01-05 16:39 /var/lib/gdm

Unfortunately, there appears no way to make the highlighted
OK apply - Enter does nothing, and I can't even Ctrl-Alt-Bksp
since X isn't running.

A ps revealed something called whiptail running with that error
message, so I killed that. Things proceeded, with an error saying
that gdm would not be started, and I was at a text console.

But / had been mounted read-only. I rebooted again, and this time
there was a message about md1 (i.e. /) not runninmg, and did I want to try to start it. It timed out while I was reading that and
dropped me to busybox.

I rebooted a 3rd time and this time it proceeded past that point but said the root filesystem was dirty, and fscked it. But that failed with an error that it required a manual fsck. I did that,
and it fixed maybe 12~20 errors, and I rebooted. Actually it
then presented me with the Resume/Fix packages/FS check/...
text choices panel thing, so I tried to TAB to choose Resume
and after a while text appeared in the middle asking if I wanted
to list all N-thousand possibilities so obviously the screen hadn't
been cleared and I was back at a dirty text console running bash.

So I again did the Ctrl-Alt-Del and the reboot proceeded.

This time all was well. Even the nvidia driver is in place and working, with my hand-crafted twinview xorg.conf, whereas
previously each new kernel install required stopping X (GDM),
running the nvidia script, and restarting GDM. Brilliant!

luke

Revision history for this message
Steve Langasek (vorlon) wrote :

Thank you for taking the time to report this bug and help to improve Ubuntu.

Failed three-way merges of config files are the responsibility of the package invoking ucf, not of ucf itself; it's the nature of three-way merges that some will always fail, and this is not a bug in ucf. Reassigning to dovecot.

Revision history for this message
Chuck Short (zulcss) wrote :

Relevant error:

Conflicts found! Please edit `/etc/dovecot/dovecot.conf' and sort them out manually.^M
 The file `/etc/dovecot/dovecot.conf.ucf-new' has a record of the failed merge of the configuration file.^M

Regards
chuck

Changed in dovecot (Ubuntu):
status: New → Won't Fix
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.