tags 187750 fixed-upstream thanks On Thu, Aug 20, 2009 at 05:15:07PM +0100, Colin Watson wrote: > On Tue, Aug 18, 2009 at 09:45:34AM +0200, Gabriele Stilli wrote: > > martedì 18 agosto 2009, alle 00:35, Gabriele Stilli scrive: > > > The tarball will come as soon as my favourite hosting place will > > > recover (it's like 20 MB) :-) > > > > Here it is: > > > > http://poisson.phc.unipi.it/~stilli/data/usm.tar.bz2 > > > > If you need any other info, please ask. > > Thanks a million - I've got all the pieces now, and have managed to > reproduce the problem. I'm trying to distil it down into a smaller test > case so that I can (a) fix it and (b) make sure it's regularly tested in > future. With luck, I'll be able to fix it for man-db 2.5.6.
I've committed a set of fixes based on Gabriele's test case. There is indeed some pretty odd database corruption here, and I have no real idea what may have caused this short of genuine filesystem corruption (there are biZarrEly misCapitAlised keys in the database), but I tried to be fairly comprehensive in improving mandb's ability to detect and recover from this kind of thing. Although I don't know for sure that Ian and Marcin were encountering exactly the same cause, and I imagine they're no longer experiencing the problem since some cron job has probably recreated the database from scratch since then, I'm pretty sure that these fixes would have cleared up their reported symptoms too. Sat Aug 22 15:34:15 BST 2009 Colin Watson <[email protected]> Cope with some more cases of database corruption (Debian bug #187750). * libdb/db_store.c (dbstore): Always replace existing keys once we've decided we ought to. If the key already exists in the database, then that probably indicates some kind of database corruption, but our new key is almost certainly better. * src/check_mandirs.c (sanity_check_db): New function, checking dbver_rd and ensuring that all keys have non-NULL content. (update_db): Use sanity_check_db to decide whether an existing database is OK. * src/accessdb.c (main): If we encounter a key with no content, print a debugging message and continue as far as we can before exiting non-zero, rather than just silently exiting non-zero immediately. Thanks, -- Colin Watson [[email protected]] -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

