httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 44696] mod_cache sometimes serves old content despite having fetched new content
Date Tue, 12 Aug 2008 10:19:38 GMT

--- Comment #1 from rahul <>  2008-08-12 03:19:37 PST ---
Created an attachment (id=22429)
 --> (
Patch to store body before headers

The race condition happens when there are multiple http workers,
After the first request detects that the cache has expired, it tries to update
the cache in cache_save_filter.
Here, the storing of the new data takes place in two steps, first the headers
are stored, and then the body.

If a request comes to a second http worker when the headers are already written
but the body is not, the second http-worker assumes that the cached body is
valid (since the headers are valid). This causes the second worker to return
the stale cache.

The fix is the switch the order of writing the cache so that body is written
first. With this, if there is a second request before headers are stored, the
second http-worker only assumes that the cache is stale and fetches it again,
and overwrites the cache again.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message