man-db trigger for apt is excessively slow

Bug #2073797 reported by Thayne
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
man-db (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Whenever I install a package that includes a man page, apt-install gets stuck for multiple minutes on the step "Processing triggers for man-db".

In many cases, this means that the "man-db" trigger takes significantly longer the rest of the installation combined.

This slowness is enough of a nuisance that I eventually disabled the man-db update by running

```
echo "set man-db/auto-update false" | sudo debconf-communicate 0 value set
```

However, many users probably won't go to the effort of figuring out how to do this, and will just be frustrated by installations taking a long time.

According to some of my co-workers this started happening a few weeks ago (on 24.04).

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: man-db 2.12.0-4build2
ProcVersionSignature: Ubuntu 6.8.0-38.38-generic 6.8.8
Uname: Linux 6.8.0-38-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Mon Jul 22 12:20:30 2024
InstallationDate: Installed on 2024-07-19 (3 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
SourcePackage: man-db
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Thayne (thayne-u) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in man-db (Ubuntu):
status: New → Confirmed
Revision history for this message
Thayne (thayne-u) wrote :

I've made an interesting discovery with respect to this.

If I remove the `percona-toolkit` package, then mandb runs much faster (2 seconds instead of 2 minutes).

I think there is something wrong with the man pages in that package (although I am using the download from https://www.percona.com/percona-toolkit to get a newer version of it, not sure if that would make a difference).

However, ideally, mandb would be able to handle this more gracefully. And in 20.04 this wasn't a problem.

Revision history for this message
alxndrsn (alxndrsn) wrote :

In my experience this issue has been caused by a dependency of Playwright (https://playwright.dev/).

I made a github project to test which dependencies are slow: https://github.com/alxndrsn/man-db-update-tests/actions

The obvious culprit there `session-migration`.

Revision history for this message
alxndrsn (alxndrsn) wrote :

Actually now I've run those tests a few times, things aren't too predictable: https://github.com/alxndrsn/man-db-update-tests/actions/runs/19230260299/usage

Some packages which took over 1 minute to process triggers:

* percona-toolkit (1 of 5 runs)
* glib-networking (1 of 5 runs)
* session-migration (2 of 5 runs)
* gsettings-desktop-schemas (1 of 5 runs)

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.