I can reproduce this bug 100% reliably here. Locking is not an issue (ext4 
filesystem),
neither race conditions, as I am the only user.

I did the following:

$ dwww-cache --list-all
man /usr/share/man/man1/bash.1.gz b/0 n
man /usr/share/man/man1/curl.1.gz c/0 n
man /usr/share/man/man1/docker-commit.1.gz d/4 n
man /usr/share/man/man1/docker-create.1.gz d/1 n
man /usr/share/man/man1/docker-diff.1.gz d/5 n
man /usr/share/man/man1/docker-restart.1.gz d/6 n
man /usr/share/man/man1/docker-rm.1.gz d/2 n
man /usr/share/man/man1/docker-run.1.gz d/7 n
man /usr/share/man/man1/docker-start.1.gz d/8 n
man /usr/share/man/man1/docker-stop.1.gz d/9 n
man /usr/share/man/man1/docker.1.gz d/3 n
man /usr/share/man/man1/qpdf.1.gz q/0 n
man /usr/share/man/man1/quilt.1.gz q/1 n
man /usr/share/man/man1/ssh-copy-id.1.gz s/0 n
man /usr/share/man/man1/ssh.1.gz s/0 n
man /usr/share/man/man5/Dockerfile.5.gz D/0 n
man /usr/share/man/man5/interfaces.5.gz i/2 n
man /usr/share/man/man8/dnsmasq.8.gz d/0 n
man /usr/share/man/man8/ip-address.8.gz i/4 n
man /usr/share/man/man8/ip-link.8.gz i/3 n
runman /usr/share/man/man8/ip-route.8.gz i/1 n
man /usr/share/man/man8/ip.8.gz i/0 n

Note ssh and ssh-copy-id both pointing to s/0, so the cache is corrupt, but 
read on:

I did as root
rm /var/cache/dwww/db/s/0
dwww-cache --clean

Then as expected:

$ dwww-cache --lookup man /usr/share/man/man1/ssh.1.gz >/dev/null; echo $?
1
$ dwww-cache --lookup man /usr/share/man/man1/ssh-copy-id.1.gz >/dev/null; echo 
$?
1

Then I pressed reload in my browser in the page for ssh. The real man page for 
ssh
appeared, and there was a new /var/cache/dwww/db/s/0 file. However then (without
any more changes)

$ dwww-cache --lookup man /usr/share/man/man1/ssh.1.gz >/dev/null; echo $?
0
$ dwww-cache --lookup man /usr/share/man/man1/ssh-copy-id.1.gz >/dev/null; echo 
$?
0

And the strange thing is, that dwww-cache --clean did not change the file's
modification time. Could the bug be that the --clean does not correctly purge
all the entries from the cache?


--
Nils Rennebarth
Software developer

bintec elmeg security GmbH

Neue Brücke 3
D-70173 Stuttgart
Germany

Tel: +49-711-900300-64
Email: nils.renneba...@bintec-elmeg.com
www: www.bintec-elmeg.com

Location: Nuremberg, Local Court Nuremberg, HRB 25481
Managing Director: Bernd Büttner

--------------------------------
The information contained in this e-mail has been carefully researched,
but the possibility of it being inapplicable in individual cases cannot
be ruled out. We therefore regret that we cannot accept responsibility
or liability of any kind whatsoever for the correctness of the
information given. Please notify us if you discover that information is
inapplicable.

Reply via email to