Project

General

Profile

Actions

Bug #2669

closed

DJB hash collision for stats cache

Added by pansa over 5 years ago. Updated over 5 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

Hi!
We use lighttpd for our product components update. The components - are few handreds files with similar names, like:

drw70000.vdb
drw70001.vdb
drw70002.vdb
drw70003.vdb
drw70004.vdb
drw70005.vdb
drw70006.vdb
drw70007.vdb
drw70008.vdb
drw70009.vdb
...
drw700c2.vdb
drw700c3.vdb
drw700c4.vdb
drw700c5.vdb
drw700c6.vdb

(radix digit+alfa index naming)

Http client requests all files in filename order, and one day we get a strange problem - one (and only one!) file recieved not whole, but get http 200!
We discover problem and found lighttpd hash collision for caching file stats. In sources we found DJB hash using, and for our DIFFERENT filenames its return same value :

hash(drw700c0.vdb) 1750305894
hash(drw700ar.vdb) 1750305894

Set server.stat-cache-engine to disable resolve our problem, but may be you found other way to improve caching.

lighttpd/1.4.35

Actions #1

Updated by stbuehler over 5 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r3039.

Actions #2

Updated by stbuehler over 5 years ago

  • Category set to core
  • Target version set to 1.4.38

Hi, thanks for reporting. I think it was broken independent of the server.stat-cache-engine setting, but maybe it's harder to trigger.

Anyway, now old entries are replaced on collisions, and there is no attempt to reuse old data.

Actions

Also available in: Atom