Bug 1874010

Summary: After installing lapack package, server shutdown is delayed while man-db-cache-update.service runs
Product: Red Hat Enterprise Linux 8 Reporter: Sam Wachira <swachira>
Component: man-dbAssignee: Nikola Forró <nforro>
Status: CLOSED ERRATA QA Contact: Dita Stehlikova <dstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.2CC: dstehlik, jkejda, msuchy, pdwyer, vdanek
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Fixed In Version: man-db- Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 19:57:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sam Wachira 2020-08-31 10:02:37 UTC
Description of problem:
After installing lapack package then rebooting the server, shutdown is delayed while man-db-cache-update.service runs
"A start job is running for man-db-cache-update.service (8min 30s / 15min)"

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install package on RHEL 8 # dnf install lapack
2. Reboot server

Actual results:
- During shutdown, mandb cache update delays shutdown for up to 15 minutes "A start job is running for man-db-cache-update.service (5min 30s / 15min)"

Expected results:
- Installing lapack package should not add significant time delay during server shutdown.

Additional info:
- A BZ is open upstream. This does not only affect the lapack package.
Consider moving man-db-cache-update to after boot instead of at shutdown

- Perhaps mandb update could run automatically in the background after installation?
- Alternatively, change mandb to run after boot as described in BZ#1678464

Comment 2 Nikola Forró 2020-09-03 13:27:36 UTC
mandb update already runs in the background after installation of packages containing man pages, that's the current behaviour. But the running update also prevents system shutdown, to ensure that mandb database stays consistent, because it's not able to recover from an interrupted update.

Changing it so that mandb update runs after boot would mean that the database is out of date until the next reboot, and that would be a regression. In Fedora, I resorted to attempting to restart the update after boot if it was previously interrupted [1], but that's rather fragile. But it does solve this problem, so I might end up backporting it to RHEL anyway.

As a workaround, you can install man-db-cron package and set SERVICE to "no" and CRON to "yes" in /etc/sysconfig/man-db. Doing that effectively reverts to the old behaviour, with mandb update being run as a cron job every day.

[1] https://src.fedoraproject.org/rpms/man-db/c/75b683fe495e761059857c797159610881208ca6?branch=master

Comment 16 errata-xmlrpc 2021-11-09 19:57:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (man-db bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.