LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   updatedb prints "/serialize" endlessly (https://www.linuxquestions.org/questions/linux-software-2/updatedb-prints-serialize-endlessly-938622/)

jklaverstijn 04-07-2012 10:05 AM

updatedb prints "/serialize" endlessly
 
Hi all,

This is on up-to-date FC16 (3.2.7-1.fc16.x86_64).

I recently experienced a full disk due to a series of very large files in /var/lib/mlocate. They were all called similar to this: mlocate.db.bE9zKe. The last 6 were varying. Apparently updatedb couldn't complete its task and I'm stuck with intermediate files. The actual mlocate.db was quite old.

To check I ran updated -v. This started happily but after a while it began printing this endless string to the console:

Code:

.....serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize/serialize.....
Any ideas as to what's going on? My /etc/updatedb.conf is:

Code:

PRUNE_BIND_MOUNTS = "yes"
PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda configfs cpuset debugfs devpts ecryptfs exofs fuse fusectl gfs gfs2 hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc ramfs rootfs rpc_pipefs securityfs selinuxfs sfs sockfs sysfs tmpfs ubifs udf usbfs"
PRUNENAMES = ".git .hg .svn"
PRUNEPATHS = "/afs /media /net /sfs /tmp /udev /var/cache/ccache /var/spool/cups /var/spool/squid /var/spool/imap /var/tmp /data/BackupPC /var/lib/BackupPC /mnt/md0/data/BackupPC /mnt/md0/data/archive"

Kind regards, Jan.

Dark_Helmet 04-07-2012 02:47 PM

I make no guarantees, but I can glance at the source code for updatedb. If I can locate the spot that prints "serialize," I can try to work backward and determine what conditions cause it to print that message.

I downloaded mlocate-0.25 (which includes updatedb), but a search for "serialize" within the code resulted in 0 hits.

What version comes bundled with FC16?

i.e.
Code:

updatedb --version
Alternatively, there would be nothing to prevent you from deleting all the mlocate database files and recreating the database from scratch. As far as I know, there is no dependence on "historical data" to create the database.

EDIT:
The man page for updatedb on my Debian system shows that the default location for the master database is:
Code:

/var/lib/mlocate/mlocate.db
Since that is the same location that you're reporting the other files, I think you would be safe to wipe out the contents of the entire directory and re-run updatedb as root (assuming that updatedb's "serialize" message is generated by trying to process/incorporate the temporary files in the /var/lib/mlocate directory).

jklaverstijn 04-07-2012 04:44 PM

Hi Dark Helmet, thanks for your support. No surprise you couldn't find the string in the source. The culprit was a file called "serialize" (/var/cache/tomcat6/work/Catalina/localhost/betterform/loader/org/apache/xml/serialize) that has the same inode as its containing directory. Many commands, find being one of them, detect this situation but updatedb apparently is sucked into the abyss of endless repetition.

So thanks again dark helmet and sorry I sent you on this goose hunt. Ultimately we have uncovered (imho) a weakness in locatedb.

Kind regards, Jan.

Dark_Helmet 04-07-2012 04:56 PM

Hey, no worries.

I'm glad you were able to find the problem.

Shoot the author an email/bug report, and maybe he'll give you a "kudos" in the next release, a coupon for a free beer, or a nasty-gram for challenging the integrity of the program! ;) It's like a box of chocolates...

Unverified: official (?) mlocate page

jklaverstijn 04-07-2012 05:30 PM

Thanks. I followed your advice and filed a bug report.

Cheers Jan


All times are GMT -5. The time now is 04:46 AM.