Summary: | Memory leak | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Dmitri Dmitrienko <dd> |
Component: | mod_deflate | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | CLOSED FIXED | ||
Severity: | major | ||
Priority: | P3 | ||
Version: | 2.0.43 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP |
Description
Dmitri Dmitrienko
2003-01-14 01:20:28 UTC
A memory leak was fixed after 2.0.43. Please download the latest mod_deflate (from http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/filters/mod_deflate.c) or wait for 2.0.44, then report back. Thanks! I've checked. Yes indeed the bug went away. But please don't close it immediately. By learning sources I see that there are some conditions when some additional leaks may occur again. mod_deflate does not always make a paired call to inflateEnd() after inflateInit2() was called. It make a big concern that the leak can be reproduced with for example a trimmed compressed part. Remember that after inflateInit2() was called zlib may allocate up to 256kb of memory and releases all in inflateEnd() only. I checked with a "trimmed" (e.g. wrong) compressed request. As expected Apache gets HTTP/1.1 400. But as predicted a memory leak occurs too. Approx. 48kB for a request. Conditions: mod_deflate mod_dav mod_dav_fs installed. PROPFIND request made with Content-encoding: gzip and content is too short (trimmed) for example just 11 bytes. Gzipped content can never be less than 18 bytes: #####Headers: PROPFIND / HTTP/1.1 Content-Encoding: gzip Content-Type: text/xml; charset="utf-8" Content-Length: 11 Host: localhost:801 Accept: text/html, */* Accept-Encoding: gzip User-Agent: Mozilla/3.0 (compatible; DD Library) Depth: 1 #####Content - gzipped but trimmed, hex dump 0x1F 0x8B 0x08 0x00 0x00 0x00 0x00 0x00 0x00 0x0B 0xB3 My investigation showed that a call to inflateEnd() is missed. Occurs when conditions above are met. Should be fixed in modules/filters/mod_deflate.c r1.30 Thanks for using Apache HTTP Server! |