Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#10532 - updatedb (mlocate) doesn't work correctly

Attached to Project: Arch Linux
Opened by Lith (Lith) - Thursday, 29 May 2008, 13:15 GMT
Last edited by Greg (dolby) - Tuesday, 17 June 2008, 18:36 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To James Rayner (iphitus)
Architecture i686
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When my system put update the database, this one doesn't work correctly, In fact, the CPU is at 100% and my computer is unuseable.


Additional info:
* package version(s)

updatedb (mlocate) 0.18
Copyright (C) 2007 Red Hat, Inc. All rights reserved.
This software is distributed under the GPL v.2.

This program is provided with NO WARRANTY, to the extent permitted by law.

* config and/or log files etc.

Config :
- Dell inspiron 640m
- i686 Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz GenuineIntel GNU/Linux

Log file: /etc/updatedb.conf

# directories to exclude from the slocate database:
PRUNEPATHS="/tmp /var/tmp /usr/tmp /var/spool /var/cache"

# filesystems to exclude from the slocate database:
PRUNEFS="nfs smbfs ncpfs afs proc smbfs autofs auto iso9660 coda ftpfs cifs"

--

Steps to reproduce:
1) # updatedb
2) You can see the CPU at 100% - the computer is slow and unuseable.

--
Lith (user)
This task depends upon

Closed by  Greg (dolby)
Tuesday, 17 June 2008, 18:36 GMT
Reason for closing:  Fixed
Comment by Greg (dolby) - Thursday, 29 May 2008, 13:24 GMT
Does it happen more than once? Mlocate does that only the first time it runs updatedb, which by default is every midnight.
Then it just detects changes.
Comment by Lith (Lith) - Thursday, 29 May 2008, 16:58 GMT
This problem is current. My computer is always running and when this update is running this one doesn't work.
I have test many things.
Rebooting - reinstallation of mlocate...
But the problem is the same :(
Comment by Attila (attila) - Thursday, 29 May 2008, 17:08 GMT
You can give this a try: Replace in /etc/cron.daily/updatedb "/usr/bin/updatedb" with "eval nice -n 19 ionice -c 3 /usr/bin/updatedb". I have good experiences with that on 2 pcs's (Core2Duo and AthlonXP) and i run updatedb every. Opensuse runs the cronjob in this way.

The other difference to you is that i have "/media /mnt" in the PRUNEPATHS array but this could be only cosmetical for you.

Comment by Lith (Lith) - Thursday, 29 May 2008, 17:57 GMT
Thanks for this information.

I try this :
$ sudo nice -n 19 ionice -c 3 /usr/bin/updatedb

The CPU of my computer stay at 100 % during a very long moment... I've stopped manually "updatedb" because I can't use my computer and the update stay blocked.
The problem isn't repaired :(
Comment by Attila (attila) - Thursday, 29 May 2008, 20:34 GMT
Perhaps you should give version 0.20 from testing a try which is the same version as mine with my own package (reason to have one is only that i have to edit the script only one time and can put it in hourly).

To test it again i delete mlocate.db and recreate with less < 10% CPU:
time /etc/cron.hourly/updatedb
real 2m50.548s
user 0m0.358s
sys 0m5.730s

You can test it with only one directory as described at the end of the manpage. For example:
/usr/bin/updatedb -l 0 -o test.db -U /var/lib/pacman
Comment by Lith (Lith) - Thursday, 29 May 2008, 21:02 GMT
Okay,

I've installed the version 0.20 from "testing".
I've doing :
/usr/bin/updatedb -l 0 -o test.db -U /var/lib/pacman
This line running without problem !
But if I want locate all files, the problem is the same...
I think "updatedb" block on certain files... but I don't know exactly why and where...

Thanks for your help.
Comment by James Rayner (iphitus) - Friday, 30 May 2008, 08:09 GMT
How "bad" is it? What sort of unresponsive is it? Completely frozen? Do some things work and others just lock up/run slowly?

How long does "updatedb" take?

If you're system is idle, there's nothing wrong with it using 100% CPU... that's just the kernel scheduler doing its job. It's unresponsive bit that shouldnt be happening and is probably mlocate dominating hdd io.

edit: Random note, instead of using nice, use schedtools and set the task batch/idleprio.


Comment by Attila (attila) - Friday, 30 May 2008, 12:06 GMT
I think now the only thing is to run "/usr/bin/updatedb -v" to see where it hangs and than to find out the reason or to append this directory to PRUNEPATHS.

Using schedtools is a nice option too.
Comment by Lith (Lith) - Friday, 30 May 2008, 19:22 GMT
Thanks for this solution.
I have test and now it's good !

I don't know exactly how this bug was repair.

If this bug is reproduced, I will give you how long exactly "updatedb" will.

Loading...