cyrus-caldav stops working after upgrade

Bug #1904929 reported by Alexander List
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cyrus Mail System
cyrus-imapd (Ubuntu)

Bug Description

After an upgrade from Ubuntu 18.04 to 20.04 on Oct 22 2020, calendar services stopped working.

I found the following error in the log:

Nov 19 19:52:06 host cyrus/https[49431]: DBERROR: sqldb_exec(/var/lib/cyrus/user/f/foo.dav) prepare <SELECT rowid, creationdate, mailbox, resource, imap_uid, lock_token, lock_owner, lock_ownerid, lock_expire, comp_type, ical_uid, organizer, dtstart, dtend, comp_flags, sched_tag, alive, modseq FROM ical_objs WHERE mailbox = :mailbox AND alive = 1;>: no such column: alive

A quick inspection of foo.dav using sqlite3 revealed that there was indeed no column "alive" in that db.

The 18.04 to 20.04 upgrade triggered the following package upgrade:

2020-10-22 19:18:51 upgrade cyrus-caldav:amd64 2.5.10-3ubuntu1.1 3.0.13-5

Inspection of the source code revealed that for some reason, the upgrade process didn't adapt the schema of the sqlite files to the new format.

The relevant code can be found in cyrus-imapd/imap/caldav_db.c and dav_db.c

Manually doctoring the sqlite3 files wasn't successful, but then I discovered


as part of the cyrus-caldav package


/usr/lib/cyrus/bin/dav_reconstruct foo

fixed the schema of the offending database and calendars started working again.

Maybe I overlooked something in the release notes, or this is such a rarely used feature that the schema update got overlooked.

I suggest to amend the release notes with a hint that the DAV databases need to be fixed using dav_reconstruct. Alternatively, the package postint scripts could offer to run this command against all users' DAV databases.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: cyrus-caldav 3.0.13-5
ProcVersionSignature: Ubuntu 5.4.0-54.60-generic 5.4.65
Uname: Linux 5.4.0-54-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.12
Architecture: amd64
CasperMD5CheckResult: skip
Date: Thu Nov 19 21:25:20 2020
SourcePackage: cyrus-imapd
UpgradeStatus: Upgraded to focal on 2020-10-22 (28 days ago)

Revision history for this message
Alexander List (alexlist) wrote :
Revision history for this message
Alexander List (alexlist) wrote :
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.