man-db's manipulation of index.db mtime timestamp interferes with incremental backups

Bug #1411633 reported by Oliver O. on 2015-01-16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
man-db (Ubuntu)

Bug Description

It appears that since version 2.7.0, man-db manipulates the mtime timestamp of /var/cache/man/de/index.db in a way that the content may change, while the timestamp is reset to its previous value (see attachment).


This interferes with incremental backups which pick up files via their modification timestamps. Such backups will miss updated files which do not have their mtime timestamps changed accordingly. Automated comparisons between such backups and (btrfs snapshots of) their source data will fail. The integrity of such backups cannot be guaranteed.

Release: Ubuntu 14.10
Package: man-db

Oliver O. (oliver-o456i) wrote :
Colin Watson (cjwatson) wrote :

This is a consequence of the poor layout noted in this comment in purge_missing:

        if (will_run_mandb)
                /* Reset mtime to avoid confusing mandb into not running.
                 * TODO: It would be better to avoid this by only opening
                 * the database once between here and mandb.
                MYDBM_SET_TIME (dbf, db_mtime);

There are some situations where a later update_db will not actually modify the database and update the mtime, and in this situation purge_missing may have updated the database but reset the mtime to its previous value. The reorganisation implied by this comment would fix this.

Changed in man-db (Ubuntu):
status: New → Triaged
importance: Undecided → High

hope alls good

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

Other bug subscribers