[plug] updatedb & locate

Craig Ringer craig at postnewspapers.com.au
Fri Jun 27 10:48:41 WST 2003


> execve("/usr/bin/locate", ["locate", "grep"], [/* 16 vars */]) = 0
> brk(0)                                  = 0x804ac40
> open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
> directory)
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=49676, ...}) = 0
> old_mmap(NULL, 49676, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
> close(3)                                = 0
> open("/usr/lib/libintl.so.2", O_RDONLY) = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\32\0"...,
> 1024) = 1024
> fstat64(3, {st_mode=S_IFREG|0644, st_size=39279, ...}) = 0
> old_mmap(NULL, 34076, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> 0x40022000
> mprotect(0x4002a000, 1308, PROT_NONE)   = 0
> old_mmap(0x4002a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> 3, 0x7000) = 0x4002a000
> close(3)                                = 0
> open("/lib/libc.so.6", O_RDONLY)        = 3

[snip]

> read(3, "1\00052.2_976003_6dd92a2a\0\342linkzz_l"..., 4096) = 4096
> read(3, "060-1724-3252-2907_27001_237,236"..., 4096) = 4096
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++


> Hope this makes some sense??

Yeah, but doesn't tell me much. It looks like it's crashing on data in 
the locatedb file, not while doing anything else.

I suppose it could be dying because of a particular file or directory on 
your filesystem that results in a db entry it doesn't like - which would 
explain the fact that removing locatedb doesn't help. Perhaps it can't 
handle ultra-long paths or some character in a filename?

I can only suggest finding a newer version of locate, if possible, or 
hunting down slocate. Otherwise - well, it's time to get to know gdb :-/

Craig Ringer



More information about the plug mailing list