LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-29-2012, 10:22 AM   #1
ymerlin
LQ Newbie
 
Registered: Mar 2006
Distribution: Slackware
Posts: 6

Rep: Reputation: 1
updatedb took 50% cpu and never ended


The daily job "slocate" in /etc/cron.daily run very well until yesterday before update in Mar 28. Here is the link to ChangLog. After the update, I found updatedb took 50% cpu (dual core cpu) and never ended (overnight). I compiled slocate from the source and it didn't help. I deleted slocate database and rerun updatedb, but no luck. I did not check the file system yet since no crash shutdown/reboot happened. Any ideas? Thank you.

Here is my updatedb.conf:
Code:
# /etc/updatedb.conf:  slocate configuration file

PRUNEFS="devpts NFS nfs afs proc smbfs autofs iso9660 udf tmpfs cifs"
PRUNEPATHS="/dev /proc /sys /tmp /usr/tmp /var/tmp /afs /net /media /mnt/floppy /mn
t/c_win /mnt/cdrom /mnt/cdrecorder /mnt/dvd /mnt/hd /mnt/memory /mnt/zip"
export PRUNEFS
export PRUNEPATHS
Here is /etc/cron.daily/slocate:
Code:
#!/bin/sh
ionice -c3 nice -n 19 /usr/bin/updatedb -c /etc/updatedb.conf
No changes to these files between two updates.

Update: I tried to updatedb a directory as a user, it behaves the same.

BTW. I update regularly from -current. It is the first time I encounter a problem right after updating the system.

Update2:
I used strace to find out what happened. It caught an error in one directory and updatedb halted there.
Run:
Code:
lucky@slack:# strace updatedb
It stopped and gave the message:
Code:
openat(AT_FDCWD, "midori", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 7
fstat64(7, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fchdir(7)                               = 0
getdents(7, /* 7 entries */, 32768)     = 156
getdents(7, /* 0 entries */, 32768)     = 0
close(7)                                = 0
open("..", O_RDONLY)                    = 7
fstat64(7, {st_mode=S_IFDIR|0755, st_size=40960, ...}) = 0
fchdir(7)                               = 0
close(7)                                = 0
openat(AT_FDCWD, "xnetload", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 7
fstat64(7, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fchdir(7)                               = 0
getdents(7, /* 7 entries */, 32768)     = 160
getdents(7, /* 0 entries */, 32768)     = 0
close(7)                                = 0
open("..", O_RDONLY)                    = 7
fstat64(7, {st_mode=S_IFDIR|0755, st_size=40960, ...}) = 0
fchdir(7)                               = 0
close(7)                                = 0
openat(AT_FDCWD, "transmission", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 7
fstat64(7, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fchdir(7)                               = 0
getdents(7, 0x8054038, 32768out of memory
)           = -451240200
I found a directory named "transmission" which I can't ls or delete. Then I reboot with a live usb and delete that directory. Updatedb runs well again! It's nothing to do with the system update. I don't know why a directory goes wrong all in a sudden. Anyway, I fixed it.

Thanks to the reply.

Last edited by ymerlin; 03-29-2012 at 03:14 PM.
 
Old 03-29-2012, 12:13 PM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,167

Rep: Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526
unmount the disks and it finishes rather cleanly & quickly.It sounds like it's cataloguing the internet!
 
  


Reply

Tags
updatedb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
running any appli tooks a very long time abd_bela Debian 1 09-30-2009 10:53 PM
updatedb crashes: src/updatedb.c:730: scan_cwd: Assertion `name_size > 1' failed sumanc Fedora 3 07-11-2008 04:39 PM
What's the difference between 'updatedb' and 'updatedb&' ?? DreameR-X Linux - Newbie 4 12-18-2004 04:36 PM
Mysql ended BlackRabbit Linux - Software 2 10-25-2003 09:35 AM
mysqld ended.. xdrainox Slackware 9 10-02-2003 04:26 PM


All times are GMT -5. The time now is 02:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration