Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
updatedb does nothing, exits immediately
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Napalm Llama
Guru
Guru


Joined: 04 Jun 2005
Posts: 520
Location: Swansea, UK

PostPosted: Wed Jun 13, 2007 12:19 pm    Post subject: updatedb does nothing, exits immediately Reply with quote

Well that's not quite true - it creates a /var/lib/slocate/slocate.db file if one doesn't already exist, but it's only 4 bytes big, and then it exits without doing anything else.

I've found a few other threads about this, but they all seem to say "run this command instead" or "it fixed itself, I don't know why".

I've tried these:
Code:
updatedb
updatedb -u
slocate -u
slocate -U /

They all do the same thing (ie. essentially nothing).

The machine in question has the uclibc/ppc/hardened profile. Does anybody know why this might be happening?
_________________
splig: amd64; nForce3; sata; GeForce 6600gt agp
muttley: EFIKA 5200B - PPC SoC :)

Registered Linux User #381314
# killall humans
Back to top
View user's profile Send private message
didl
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 1106
Location: Pittsburgh, PA

PostPosted: Wed Jun 13, 2007 1:26 pm    Post subject: Reply with quote

Have you checked if there's anything weird in /etc/updatedb.conf
or in the logs? You could also try using it with the -v flag to see what it is
attempting to index.
Back to top
View user's profile Send private message
Napalm Llama
Guru
Guru


Joined: 04 Jun 2005
Posts: 520
Location: Swansea, UK

PostPosted: Wed Jun 13, 2007 2:02 pm    Post subject: Reply with quote

Nothing that unusual:
Code:
muttley ~ # updatedb -v
/
muttley ~ # cat /etc/updatedb.conf
# /etc/updatedb.conf: config file for slocate
# $Id: updatedb.conf,v 1.22 2007/03/12 21:49:45 vapier Exp $

# This file sets variables that are used by updatedb.
# For more info, see the updatedb(1) manpage.

# Filesystems that are pruned from updatedb database
PRUNEFS="afs auto autofs cifs devfs devpts eventpollfs futexfs gfs hugetlbfs iso9660 mqueue ncpfs nfs NFS nfs4 nfsd nnpfs pipefs proc ramfs rpc_pipefs selinuxfs sfs shfs smbfs sockfs subfs supermount sysfs tmpfs udf usbfs vperfctrfs"

# Paths which are pruned from updatedb database
PRUNEPATHS="/tmp /var/tmp /root/.ccache"

I can't find anything in /var/log/ that looks like it relates to updatedb - am I looking in the right place?
_________________
splig: amd64; nForce3; sata; GeForce 6600gt agp
muttley: EFIKA 5200B - PPC SoC :)

Registered Linux User #381314
# killall humans
Back to top
View user's profile Send private message
didl
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 1106
Location: Pittsburgh, PA

PostPosted: Thu Jun 14, 2007 12:51 pm    Post subject: Reply with quote

I am note quite sure why updatedb stops in / and
doesn't descent any further. Have you tried running
updatedb with strace to get more clues on this?
Back to top
View user's profile Send private message
Napalm Llama
Guru
Guru


Joined: 04 Jun 2005
Posts: 520
Location: Swansea, UK

PostPosted: Thu Jun 14, 2007 3:27 pm    Post subject: Reply with quote

How would I do that? I tried this, but I just got an error:
Code:
muttley ~ # strace -ostrace.log /usr/bin/updatedb
umovestr: Input/output error

[edit:]
My bad, it actually did produce a file. I just assumed that because of the error it had failed.
Here's the trace:
Code:
execve("/usr/bin/updatedb", ["/usr/bin/updatedb"], [/* 21 vars */]) = 0
mmap(NULL, 20, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x34f0a000
stat("/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=6896, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
mmap(NULL, 6896, PROT_READ, MAP_SHARED, 3, 0) = 0x34f0b000
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=345540, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x34f0d000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\371"..., 4096) = 4096
mmap(NULL, 438272, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x34f0e000
mmap(0x34f0e000, 336520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x34f0e000
mmap(0x34f70000, 8532, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x52000) = 0x34f70000
mmap(0x34f73000, 21544, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x34f73000
close(3)                                = 0
munmap(0x34f0d000, 4096)                = 0
munmap(0x34f0b000, 6896)                = 0
mprotect(0x128fa000, 4096, PROT_READ)   = 0
mprotect(0x34f70000, 4096, PROT_READ)   = 0
mprotect(0x34f05000, 4096, PROT_READ)   = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fcntl(0, F_GETFD)                       = 0
fcntl(1, F_GETFD)                       = 0
fcntl(2, F_GETFD)                       = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "\235i\360\264", 4)             = 4
close(3)                                = 0
open("/etc/updatedb.conf", O_RDONLY)    = 3
brk(0)                                  = 0x12904bd0
brk(0x12906bd0)                         = 0x12906bd0
brk(0x12907000)                         = 0x12907000
read(3, "# /etc/updatedb.conf: config fil"..., 4096) = 586
close(3)                                = 0
open("/etc/mtab", O_RDONLY)             = 3
read(3, "/dev/sda5 / ext3 rw,noatime 0 0\n"..., 4096) = 485
close(3)                                = 0
lstat("/var/lib/slocate/", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
getcwd("/root", 4095)                   = 6
getuid()                                = 0
getgid()                                = 0
open("/etc/group", O_RDONLY)            = 3
ioctl(3, TCGETS, 0x78571b88)            = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x12908000)                         = 0x12908000
read(3, "root::0:root\nbin::1:root,bin,dae"..., 4096) = 587
close(3)                                = 0
open("/var/lib/slocate/slocate.db", O_RDONLY) = 3
read(3, "1\0", 2)                       = 2
close(3)                                = 0
stat("/var/lib/slocate/slocate.db", {st_mode=S_IFREG|0640, st_size=4, ...}) = 0
open("/var/lib/slocate/slocate.db.tmp", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
ioctl(3, TCGETS, 0x78571b68)            = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x12909000)                         = 0x12909000
brk(0x1290a000)                         = 0x1290a000
lstat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(".", O_RDONLY)                     = 4
fchdir(4)                               = 0
chmod("/var/lib/slocate/slocate.db.tmp", 0640) = 0
chown("/var/lib/slocate/slocate.db.tmp", 0, 245) = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/", O_RDONLY)                     = 5
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
brk(0x1290b000)                         = 0x1290b000
stat64(0x3, 0x78571ab0)                 = -1 EFAULT (Bad address)
close(5)                                = 0
fchdir(4)                               = 0
close(4)                                = 0
write(3, "1\0/\0", 4)                   = 4
close(3)                                = 0
chdir("/root")                          = 0
rename("/var/lib/slocate/slocate.db.tmp", "/var/lib/slocate/slocate.db") = 0
chmod("/var/lib/slocate/slocate.db", 0640) = 0
chown("/var/lib/slocate/slocate.db", 0, 245) = 0
exit(0)                                 = ?

_________________
splig: amd64; nForce3; sata; GeForce 6600gt agp
muttley: EFIKA 5200B - PPC SoC :)

Registered Linux User #381314
# killall humans
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Thu Jun 14, 2007 5:28 pm    Post subject: Reply with quote

Moved from Other Things Gentoo to Gentoo on PPC.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum