Bug 32950 - mod_cache storing corrupted files.
Summary: mod_cache storing corrupted files.
Status: RESOLVED WORKSFORME
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cache (show other bugs)
Version: 2.1-HEAD
Hardware: Other Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-05 09:38 UTC by Glen Eustace
Modified: 2011-11-16 22:31 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glen Eustace 2005-01-05 09:38:08 UTC
The header file appears corrupt and the data file is missing initial content. 
 
Header 
====== 
max-age=300, max-age=300, max-age=300, max-age=300, max-age=300, max-age=300 
Expires: Wed, 05 Jan 2005 06:48:00 GMT, Wed, 05 Jan 2005 07:02:34 GMT, Wed, 05 
Jan 2005 07:10:04 GMT, Wed, 05 
Jan 2005 07:15:46 GMT, Wed, 05 Jan 2005 07:16:40 GMT, Wed, 05 Jan 2005 
07:21:40 GMT, Wed, 05 Jan 2005 07:21:56 
 GMT, Wed, 05 Jan 2005 08:21:32 GMT 
ETag: "bae62-2178-41c64b47", "bae62-2178-41c64b47", "bae62-2178-41c64b47", 
"bae62-2178-41c64b47", "bae62-2296- 
41db931d", "bae62-2296-41db931d", "bae62-2296-41db931d", "bae62-2296-41db931d" 
Accept-Ranges: bytes, bytes, bytes, bytes, bytes, bytes, bytes, bytes 
Cache-Control: max-age=300 
Expires: Wed, 05 Jan 2005 08:21:47 GMT 
Last-Modified: Wed, 05 Jan 2005 07:11:25 GMT 
ETag: "bae62-2296-41db931d" 
Accept-Ranges: bytes 
Content-Length: 8854 
Content-Type: text/html 
Date: Wed, 05 Jan 2005 08:16:47 GMT 
 
Accept: */* 
Accept-Language: en-nz 
Accept-Encoding: gzip, deflate 
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) 
Host: www.gracecitychurch.church.net.nz 
Cache-Control: no-cache 
Max-Forwards: 10 
X-Forwarded-For: 219.88.222.94 
X-Forwarded-Host: www.gracecitychurch.church.net.nz 
X-Forwarded-Server: www.gracecitychurch.church.net.nz 
 
 
Data 
===== 
"expires" CONTENT="-1"> 
<link rel="stylesheet" TYPE="text/css" HREF="style01.css"> 
</head> 
 
<body bgcolor="#FFFFFF"> 
<!--main table starts--> 
<table width=720 border=0 cellpadding=0 cellspacing=0> 
<tr> 
        <td width=203 height=73><img src="images/about_01.jpg" width=203 
height=73 alt="clouds"></td> 
        <td width=172 height=73></td> 
        <td width=193 height=73></td> 
... 
... 
... 
 
Missing Data 
============ 
<html> 
<head> 
<title>Welcome to Grace City Church</title> 
<META Name="description" CONTENT="Grace City Church, Palmerston North"> 
<META Name="keywords" CONTENT="Grace City Church, grace, city, church,  
Palmerston North, Manawatu, New Zealand, 
Evangelical, Christianity, Christian, godzone, Jesus, Jesus Christ, Christ,  
God, messiah, holy spirit, spirit, spiritual, 
salvation, save, prophet, faith, pray, prayer, belief, theology, scripture,  
sunday school, youth group, Bible, social support, 
society, moral, prophecy, afterlife, family, counsel, counsellor, guidance,  
apologetics, sermon, sermons, lecture,teaching, 
ministry, ministries, resources, belief, purpose, vision, bible study,  
pastor, Andrew Lim"> 
<META Name="robot" CONTENT="index, follow"> 
<META Name="copyright" CONTENT="Copyright © tipper designs"> 
<META Name="author" CONTENT="irishtipper@hotmail.com"> 
<META Name="generator" CONTENT="Hand-Coded"> 
<META Name="language" CONTENT="en-us"> 
<META Name="revisit-after" CONTENT="30"> 
<META http-equiv="pragma" CONTENT="no-cache"> 
<META http-equiv=
Comment 1 Paul Querna 2005-06-03 00:34:23 UTC
Can you reproduce this in 2.0.54?
Comment 2 Geoff Davis 2005-06-08 07:33:37 UTC
I am seeing similar things in 2.0.54 with mod_cache + mod_disk_cache.  The
problem is intermittent and difficult to reproduce reliably.
Comment 3 Paul Querna 2005-06-08 09:19:04 UTC
As a data point, addons.mozilla.org is seeing this same problem, running 2.1.3.
Comment 4 Frank Marien 2005-09-23 12:07:50 UTC
2.0.54 on Windows ; we have a similar (probably the same) problem.
Files get truncated. Content is correct from byte 0 to EOF, but the file is
stored in the cache with the final bytes (sometimes megabytes) missing. 

On XP with no service packs, we could reproduce it 100%, every cached file was
truncated. 

On XP SP1 & 2, and 2003, it occurs intermittently, with seemingly random files.
There seems to be a network issue involved. Otherwise identically configured
servers have the problem frequently, or not at all, depending only on the
network segment they're in (and it's behaviour in terms of drops, latency, etc..
(my guess)).

I will test the same on GNU/Linux but I won't be able to switch the proxies to
Linux for months to come.

Comment 5 Philip Jacob 2006-11-13 14:51:16 UTC
I'm also seeing this occur with 2.0.52 (the one that ships with RHEL)...

-rw-------  1 apache apache 16000 Nov 13 16:24 fa9HcCD@VOgfygkg.data
-rw-r--r--  1 apache apache  1487 Nov 13 16:24 fa9HcCD@VOgfygkg.header

[root@berlin bK]# more *header
T
X-Cocoon-Version: 2.1.7, 2.1.7, 2.1.7, 2.1.7
Cache-Control: max-age=60, public, max-age=60, public, max-age=60, public,
max-age=60, public
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Length: 24307
Last-Modified: Mon, 13 Nov 2006 16:34:36 GMT
X-Cocoon-Version: 2.1.7
Expires: Mon, 13 Nov 2006 22:25:24 GMT
Cache-Control: max-age=60, public
Content-Type: text/xml
Date: Mon, 13 Nov 2006 22:24:24 GMT

Just like in the original post, I'm seeing content removed at the beginning and
end of the response data.

(Note: this bug is almost 2 years old...)
Comment 6 Philip Jacob 2006-11-13 15:03:49 UTC
Just another piece of information in case it is helpful.  I tracked down the
original request that resulted in this entry being cached:

71.243.19.177 - - [13/Nov/2006:16:24:24 -0600] "GET /request-uri-here HTTP/1.1"
200 23672 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1)
Gecko/20061010 Firefox/2.0"

Notice that the correct number of bytes were logged in the response here: 23672.
 However, the .data file only contains 16000.  

It seemed relevant.
Comment 7 Dean 2007-03-21 09:43:06 UTC
We are experiencing this issue with PDF's that range from 500k to 6mb in size.
An increasing number of customers are reporting this issue in version 2.0.  

This bug is over 2 years old, and I think we will see more of this issue as
others upgrade to version 2.
Comment 8 Ruediger Pluem 2007-03-21 11:16:38 UTC
mod_cache is only experimental in 2.0.x. It lacks many of the fixes done in
2.2.x and it is very unlikely that any mod_cache fixes will be backported to
2.0.x. Please upgrade to 2.2.x and report back if the error is still there in
the latest release of 2.2.x.
Comment 9 Dean 2007-03-22 02:48:15 UTC
I just confirmed that all the customers that are reporting this issue are
running apache 2.2.3.


Comment 10 Ruediger Pluem 2007-03-22 03:07:58 UTC
Since many changes happened between the original report and now, please

- provide your caching configuration
- provide an error log in debug mode and an access log that was written while
this problem occurs
- confirm that the first part of the response gets lost (like reported here by
others)
- provide a header file of such a corrupt entity
- provide directory listing of the cache directory where the corrupt entity is
stored
- let us know the content handler that produces this content (plain file,
Tomcat, other app server, whatever) and how it is connected (module, mod_jk,
mod_proxy, other plugin, etc.)
Comment 11 William A. Rowe Jr. 2011-11-16 22:31:42 UTC
No reply to info request; closing.