Hello After upgrade slocate to 2.4-1 on one machine, slocate doesn't work correctly. [root@xxx slocate]# pwd /var/lib/slocate [root@xxx slocate]# du -h 6.7M . Before upgrade databese has 8M.. [root@xxx slocate]# locate blebleble locate: decode_db() aborted. Corrupt database? Before upgrade all was fine. I have tried rebuild databse by /etc/cron.daily/slocate.cron but it has still errors.
What happens if you move the old database out of the way and *then* rebuild it?
After removed /var/lib/slocate/slocate.db and /etc/cr^Gon.daily/slocate.cron & I still get locate: decode_db() aborted. Corrupt database? After downgrade all works OK (with databse build by new slocate). End of strace: (strace -f -o file locate something) 26368 write(2, "locate: decode_db() aborted. Cor"..., 47) = 47 26368 munmap(0x2aac2000, 4096) = 0 26368 _exit(1) = ? [lukasz@xxx lukasz]$ cat file |grep read |wc -l 1706
Taken from ChangeLog for new version of slocate. 2.5 - Really fixed the heap corruption bug. - Fixed a bug that caused slocate to segfault when path lengths are too large. - Made slocate not assign the 'slocate' group to a database if the UID is not 0. - Added alot of error checking (ie, all mallocs, fchdir, etc). - Autoconfed. I haven't tested this version, yet.
Hm, maybe. It looks like most of the changes in that are in the error handling code. Could you attach the database?
It does appear that slocate-2.5 fixes this - slocate-2.5-1 will be in the next raw hide release.