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

Bug #1411633 reported by Oliver O.
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
man-db (Debian)
Fix Released
Unknown
man-db (Ubuntu)
Fix Released
High
Colin Watson

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).

See https://lists.ubuntu.com/archives/foundations-bugs/2014-September/209326.html

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 2.7.0.2-2

Revision history for this message
Oliver O. (oliver-o456i) wrote :
Revision history for this message
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
Colin Watson (cjwatson)
Changed in man-db (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
status: Triaged → In Progress
Changed in man-db (Debian):
status: Unknown → New
Changed in man-db (Debian):
status: New → Confirmed
Changed in man-db (Debian):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package man-db - 2.10.0-2

---------------
man-db (2.10.0-2) unstable; urgency=medium

  * Fix occasional mandb-symlink-target-timestamp test failure.

 -- Colin Watson <email address hidden> Fri, 04 Feb 2022 19:21:06 +0000

Changed in man-db (Ubuntu):
status: In Progress → Fix Released
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.