Bug 44338 - mod_deflate crashes and does not return response
mod_deflate crashes and does not return response
Status: RESOLVED WONTFIX
Product: Apache httpd-2
Classification: Unclassified
Component: mod_deflate
2.0.63
Other Windows Server 2003
: P2 critical with 3 votes (vote)
: ---
Assigned To: Apache HTTPD Bugs Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-02-01 02:00 UTC by Thomas Einwaller
Modified: 2014-02-17 13:55 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Einwaller 2008-02-01 02:00:09 UTC
- I downloaded and installed apache_2.0.63-win32-x86-no_ssl.msi 
- activated the delfate module by adding the following line to httpd.conf

LoadModule deflate_module modules/mod_deflate.so

- configured the following compression settings:

<Location />
	# Insert filter
	AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript

	# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
	# the above regex won't work. You can use the following
	# workaround to get the desired effect:
	BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

	# Don't compress images
	SetEnvIfNoCase Request_URI \
	\.(?:gif|jpe?g|png|pdf|gz|zip)$ no-gzip dont-vary

	# Make sure proxies don't deliver the wrong content
	Header append Vary User-Agent env=!dont-vary
</Location>

<Files *.js>
	ForceType text/javascript
</Files>

- After restarting apache and reloading the default index.html mod_deflate
crashes and wants to start a debug session - no content is delivery to the
client browser
Comment 1 Takashi Sato 2008-02-01 03:34:53 UTC
I've succeeded to reproduce the crash.
Comment 2 Takashi Sato 2008-02-01 05:07:12 UTC
(In reply to comment #1)
> I've succeeded to reproduce the crash.

I'm able to reproduce it with the official apache_2.0.63-win32-x86-no_ssl.msi,
but I can't debug because dist/httpd/binaries/win32/symbols/apache_2.0.63-
win32-x86-no_ssl-symbols.zip is missing.
So I tried to build debug build with httpd-2.0.63-win32-src.zip, VC++2005 and 
zlib 1.1.4, and it works fine.
Comment 3 Takashi Sato 2008-02-21 17:25:00 UTC
apache_2.0.63-win32-x86-no_ssl-symbols.zip has become available, so I'm 
debugging the ASF official build.
but I can't find out what is wrong because of lack of my skill.


 	ntdll.dll!7c951669() 	
 	ntdll.dll!7c95082c() 	
	mod_deflate.so!gen_codes(ct_data_s * tree=0x00010008, int max_code=18, 
unsigned short * bl_count=0x00997b5c)  line 604 + 0x1a bytes	C
 	mod_deflate.so!build_tree(internal_state * s=0x0000ffff, tree_desc_s * 
desc=0x00000001)  line 700 + 0x12 bytes	C
 	mod_deflate.so!send_all_trees(internal_state * s=0x002c0000, int 
lcodes=0, int dcodes=10127080, int blcodes=666)  line 860 + 0x13 bytes	C
 	msvcrt.dll!77bdc2de() 	
 	mod_deflate.so!zcfree(void * opaque=0x00000000, void * 
ptr=0x009a86e8)  line 314 + 0xb bytes	C
 	mod_deflate.so!deflateEnd(z_stream_s * strm=0x00993818)  line 586 + 
0x12 bytes	C
 	mod_deflate.so!deflate_out_filter(ap_filter_t * f=0x00987e1d, 
apr_bucket_brigade * bb=0x009938e0)  line 502	C
 	libhttpd.dll!ap_pass_brigade(ap_filter_t * next=0x00993650, 
apr_bucket_brigade * bb=0x009937f0)  line 512 + 0x7 bytes	C
 	libhttpd.dll!default_handler(request_rec * r=0x009936b8)  line 3651
	C
 	libhttpd.dll!ap_run_handler(request_rec * r=0x00990cd8)  line 153 + 
0x1f bytes	C
 	libhttpd.dll!ap_invoke_handler(request_rec * r=0x00990cb8)  line 368
	C
 	mod_negotiation.so!handle_map_file(request_rec * r=0x0098dea8)  line 
2943	C
 	libhttpd.dll!ap_run_handler(request_rec * r=0x00986fa8)  line 153 + 
0x1f bytes	C
 	libhttpd.dll!ap_invoke_handler(request_rec * r=0x00986fa8)  line 368
	C
 	libhttpd.dll!ap_process_http_connection(conn_rec * c=0x0097f068)  line 
253 + 0x6 bytes	C
 	libhttpd.dll!ap_run_process_connection(conn_rec * c=0x0097f068)  line 
43 + 0x1f bytes	C
 	libhttpd.dll!ap_process_connection(conn_rec * c=0x0097f068, void * 
csd=0x0097ef98)  line 176 + 0x6 bytes	C
 	libhttpd.dll!worker_main(void * thread_num_val=0x0097f060)  line 734
	C
 	msvcrt.dll!77bea3b0() 	
 	kernel32.dll!7c80b703() 	
Comment 4 Vlad Sharanhovich 2008-05-18 11:35:21 UTC
After upgrading from 2.0.58 to 2.0.63 mod_deflate started to cause all king of problems. I run Apache on Windows Server 2008. mod_deflate results in lock up of Apache, which causes Apache to use 100% CPU in some occasions. In other occasions mod_deflate just produces an empty output. After I reverted only this module back to .58 version everything come back to normal.
Comment 5 Ruediger Pluem 2008-05-18 13:18:21 UTC
The funny thing is that the code of mod_deflate in 2.0.58 and 2.0.63 is exactly the same.
Comment 6 Vlad Sharanhovich 2008-05-18 22:04:21 UTC
Then it is compiled differently. The size of .so file is bigger in .63.
Comment 7 Yury 2008-07-24 10:30:47 UTC
Something similar is with apache_2.0.63-win32-x86-openssl-0.9.7m.msi
When I upgraded from 2.0.50 to 2.0.63, deflate stopped working properly. From what I saw by 'lynx -verbose -mime_header http://127.0.0.1/', I can add, that the size of output is rediculously small. File with 42k bytes in it, being compressed by 'gzip -9' to 8k bytes was outputted by Apache+mod_deflate to 124 bytes  (and could not be read as deflated output). Also Apache raised an exception (but stayed resident).
Comment 8 William A. Rowe Jr. 2008-08-01 12:43:39 UTC
FYI, Apache 2.2 is built using zlib.dll version 1.2.3 dynamically, instead
of using the sources of 1.1.4 statically.  You might try upgrading to 2.2.

In the interim, if we repackage apache 2.0.63, I'll be sure to study what
is going on here and see if we need to change the build mechanics for 2.0.64.
Comment 9 Roy T. Fielding 2009-04-03 18:44:58 UTC
Since this is apparently a problem with an old binary build
on a specific platform, it should have been fixed in the newer builds.