DB_LOGC->get: LSN 44/32711: invalid log record header after db-recover
Chris Wilkes
cwilkes-bf at ladro.com
Sat Jan 15 03:12:19 CET 2005
I updated from Fedora Core 2 to FC3 on my mail server and it appears
that my wordlist is corrupted -- however bogofilter is still able run as
my spam is being filtered out.
The Berkeley DB library is still 4.2 with a minor version upgrade. I
recompiled bogofilter just in case it was using some of the old code.
When trying to do a simple ($bad is a list of files)
bogofilter -B $bad -v
I get a
DB_LOGC->get: LSN 44/32711: invalid log record header
PANIC: Input/output error
bogofilter: DB_ENV->open, err: DB_RUNRECOVERY: Fatal error, run database recovery
To recover, run: bogoutil -v --db-recover "/home/vmail/maildirs/cwilkes/.bogofilter/"
Which I run and it gives me the same message:
$ bogoutil -v --db-recover "/home/vmail/maildirs/cwilkes/.bogofilter/"
DB_LOGC->get: LSN 44/32711: invalid log record header
...
db_verify says that the wordlist is okay:
$ cd $BOGOFILTER_DIR
$ db_verify wordlist.db
$ echo $?
0
$ db_dump -r wordlist.db | db_load wordlist.new
$ echo $?
0
So it looks like the wordlist.new should be fine, but:
$ mv wordlist.db wordlist.db-BACKUP && mv wordlist.new wordlist.db
$ bogoutil -v --db-recover "."
DB_LOGC->get: LSN 44/32711: invalid log record header
...
gives me the same error as above.
Trying to dump the tokens are recreate
$ bogoutil -d wordlist.db | bogoutil -l ./wordlist.new
DB_LOGC->get: LSN 44/32711: invalid log record header
...
DB_LOGC->get: LSN 44/32711: invalid log record header
...
gives me the same error, but for some reason it is repeated.
$ db_verify -V
Sleepycat Software: Berkeley DB 4.2.52: (September 21, 2004)
$ ldd `which bogofilter`
libdb-4.2.so => /lib/tls/i586/libdb-4.2.so (0x00746000)
libm.so.6 => /lib/tls/i586/libm.so.6 (0x00386000)
libc.so.6 => /lib/tls/i586/libc.so.6 (0x00272000)
libpthread.so.0 => /lib/tls/i586/libpthread.so.0 (0x0049c000)
/lib/ld-linux.so.2 (0x0025b000)
# rpm -qa | grep ^db4
db4-utils-4.2.52-6
db4-4.2.52-6
# ls -l /usr/lib/libdb-4.2.so /lib/tls/i*86/libdb-4.2.so /lib/libdb-4.2.so
-rwxr-xr-x 1 root root 843996 Sep 21 16:54 /lib/libdb-4.2.so
-rwxr-xr-x 3 root root 845636 Sep 21 16:54 /lib/tls/i486/libdb-4.2.so
-rwxr-xr-x 3 root root 845636 Sep 21 16:54 /lib/tls/i586/libdb-4.2.so
-rwxr-xr-x 3 root root 845636 Sep 21 16:54 /lib/tls/i686/libdb-4.2.so
lrwxrwxrwx 1 root root 22 Jan 12 22:43 /usr/lib/libdb-4.2.so -> ../../lib/libdb-4.2.so
That last one is a little weird, why is the libdb-4.2.so under /lib just
a little bit smaller than the other ones? Probably is nothing.
What's odd about it is that even though a -v complains about the invalid
log number the exit codes still correctly indicate spam or ham.
Chris
More information about the Bogofilter
mailing list