package cyrus-common-2.4 2.4.12-2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 75

Bug #989609 reported by Pemcconnell
88
This bug affects 16 people
Affects Status Importance Assigned to Milestone
cyrus-imapd-2.4 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Software centre - Downloading "Plan". Downloaded OK, error occurred around 33% through the installation

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: cyrus-common-2.4 2.4.12-2
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
Date: Fri Apr 27 12:03:59 2012
DuplicateSignature:
 Setting up cyrus-common-2.4 (2.4.12-2) ...
 Converting from /var/lib/cyrus/deliver.db (berkeley-nosync) to /tmp/deliver.db.oa8E9rAf (skiplist)
 fatal error: can't open old database
 dpkg: error processing cyrus-common-2.4 (--configure):
  subprocess installed post-installation script returned error exit status 75
ErrorMessage: subprocess installed post-installation script returned error exit status 75
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
SourcePackage: cyrus-imapd-2.4
Title: package cyrus-common-2.4 2.4.12-2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 75
UpgradeStatus: Upgraded to precise on 2012-04-27 (0 days ago)

Revision history for this message
Pemcconnell (pemcconnell) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cyrus-imapd-2.4 (Ubuntu):
status: New → Confirmed
Revision history for this message
Harald Alvestrand (harald-alvestrand) wrote :

On upgrade from Lucid to Precise:
Deep dive into the code gave me a fix, which seems like a dirty trick..

The error occurs when one tries in one step to convert from Berkeley 4.8 to 5.1 and from Berkeley to skiplist.
The converter script, /usr/lib/cyrus/bin/upgrade-db, seems to first convert to the latest Berkeley version (5.1), and then to convert from the previous Berkeley version (4.6) to skiplist. This fails to open the old database.

Dirty trick workaround:

Change /usr/lib/cyrus/cyrus-db-types.txt, one line:

OLD:
DBENGINE BerkeleyDB
NEW:
DBENGINE BerkeleyDB4.7

Now, the converter script doesn't try to change the Berkeley version any more, and the conversion to skiplist works.

Revision history for this message
Harald Alvestrand (harald-alvestrand) wrote :

Postscript: This trick seems to have gotten me into other trouble.

Revision history for this message
thehayro (thehayro) wrote :

I had the same problem. I solved it with changing with harald-alvestrand's solution and also changed in/usr/lib/cyrus/cyrus-db-types.txt DUPLICATE skiplist to DUPLICATE berkeley-nosync

then apt-get -f install solved the problem for me.

However my method was trial and error. So I dont know what consequences it might have on your system. For me, I have no problems so far.

cheers

Revision history for this message
Marc Mössner (mail-moessner) wrote :

Thanks a lot for your solution!

/usr/lib/cyrus/cyrus-db-types.txt
DBENGINE BerkeleyDB => DBENGINE BerkeleyDB4.7
DUPLICATE skiplist => DUPLICATE berkeley-nosync

apt-get -f install

Revision history for this message
Oliver Fink (216-oliver-vpr) wrote :

This all did not work for me. At last it worked for me with the following steps as root:

1. Backing up /var/lib/cyrus
2. Changing /usr/lib/cyrus/cyrus-db-types.txt
   DBENGINE BerkeleyDB => DBENGINE BerkeleyDB4.7
3. /etc/init.d/cyrus-imapd stop
4. rm -rf /var/lib/cyrus
5. apt-get upgrade
6. Restoring /var/lib/cyrus
7. db_dump deliver.db > deliver.dump
8. db_load -f deliver.dump test.db
9. cp test.db deliver.db
10. rm test.db
11. db_dump tls_sessions.db > tls_sessions.dump
12. db_load -f tls_sessions.dump test.db
13. rm test.db
14. /etc/init.d/cyrus-imapd start

Maybe this is helpful for someone else. Thanks to all others in this thread leading me to a working solution.

Revision history for this message
Kristian Rink (kawazu) wrote :

Added myself to the list as I ended up with similar things. None of the workarounds worked, nevertheless. My system, however, is a bit older, already used to go through a migration step-wise from 6.06 across some intermediates to 10.04 (there's an enormously large mail spool on that drive so so far I hesitated to reinstall this one). db_dump / db_load failed complaining that the 4.7 files aren't compatible with a 5.1 environment (which seems berkelydb I guess); using db4.7_dump ends complaining that the data may be corrupted being moved without cleaning LSNs (whatever that means, I'm not a berkelydb expert).

Ultimately, after playing with this for a while, I decided to restore the 10.04 VMWare snapshot and try again later...

Revision history for this message
Markus (markus-.s.) wrote :

I've tried to upgrade and ended up in exact the same state as you, Kristian :-O
Have you solved it yet? Do you have any upgrade hints?

Revision history for this message
Kristian Rink (kawazu) wrote :

Not so far. :( So far I just left the server running at its current version and am scheduling a full re-install / move to new hardware with copying post boxes on an IMAP level.

Revision history for this message
Robert David Hodson (m-launchpad-davehodson-co-uk) wrote : Re: [Bug 989609] Re: package cyrus-common-2.4 2.4.12-2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 75

I also had this problem and fixed it. Unfortunately I did not record the
exact fix although I do remember the cause.
During the upgrade, the script attempts to convert the cyrus databases
from (IIRC) Berkeley to Skiplist format. If it finds a corrupt db it
fails and exits.

During start-up of cyrus and usually once a day (see cyrus.conf) the
databases are checked with ctl_cyrusdb. Are there any log entries
indicating corruption? See
http://comments.gmane.org/gmane.mail.imap.cyrus/35023 for an example.

The cure involves identifying the corrupt db, deleting it and allowing
cyrus to re-create it on start up. tls_sessions.db is a favourite
apparently. If it's deliver.db then you will have to re-mark messages as
read.
(I am assuming that mailboxes.db is OK although there are instructions
out there for re-creating it).
HTH

On 07/04/14 09:44, Kristian Rink wrote:
> Not so far. :( So far I just left the server running at its current
> version and am scheduling a full re-install / move to new hardware with
> copying post boxes on an IMAP level.
>

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.