You are not logged in.

#1 2013-11-26 00:11:21

aclindsa
Member
Registered: 2011-01-29
Posts: 30
Website

[SOLVED] mandb hangs, taking 100% CPU

I have a VPS running Arch (limited to kernel 3.9.4-1 by the provider). The system was unceremoniously rebooted last night due to a power outage at their facility. When it came back up, the mandb process being run by cron was taking 100% of the CPU and had been running for ~10 hours by the time I noticed it.

I eventually killed the mandb process and re-tried it manually with debugging turned on: `mandb -d`. It appears that processing stops at /usr/share/man/man5/core.5.gz (this is the last output I see, even if I leave it running for an hour or two). Even after the output stops, it is still taking 100% CPU. Anyone have any ideas or other things to try debugging it? I'm all out.

Last edited by aclindsa (2013-11-26 01:02:42)

Offline

#2 2013-11-26 00:29:26

aclindsa
Member
Registered: 2011-01-29
Posts: 30
Website

Re: [SOLVED] mandb hangs, taking 100% CPU

FWIW, I checked and made sure /usr/share/man/man5/core.5.gz is the same on this machine as it is on another machine which doesn't exhibit this issue.

Offline

#3 2013-11-26 01:02:20

aclindsa
Member
Registered: 2011-01-29
Posts: 30
Website

Re: [SOLVED] mandb hangs, taking 100% CPU

I re-installed man-pages with `pacman -S man-pages` and then received the following messages:

Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
Updating index cache for path `/usr/share/man/man2'. Wait...mandb: bad fetch on multi key alarm 2
mandb: index cache /var/cache/man/3354 corrupt

Then, after running

mandb -c

subsequent calls to `mandb` executed successfully. Problem solved. I guess maybe mandb was running when the power outage occurred, corrupting the man index cache... makes me wonder what else got corrupted that I haven't noticed yet.

Offline

#4 2015-08-10 07:09:28

archpropr
Member
Registered: 2015-08-10
Posts: 1

Re: [SOLVED] mandb hangs, taking 100% CPU

Thanks for posting the solution. I had the same problem today with mandb and this fixed it.

The systemd service for mandb is called "man-db.service", I had to look it up.

Offline

#5 2015-08-11 12:28:35

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,396
Website

Re: [SOLVED] mandb hangs, taking 100% CPU

archpropr, please don't necrobump old threads, especially when they're marked as solved.

https://wiki.archlinux.org/index.php/Fo … bumping.22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB