Bug 39111 - Potential bug brought by mmapfile (mod_file_cache)
Summary: Potential bug brought by mmapfile (mod_file_cache)
Status: RESOLVED LATER
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_file_cache (show other bugs)
Version: 2.2.0
Hardware: All Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: MassUpdate
Depends on:
Blocks:
 
Reported: 2006-03-27 03:11 UTC by Xuekun Hu
Modified: 2018-11-07 21:09 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xuekun Hu 2006-03-27 03:11:17 UTC
A few weeks ago, I tried to use mod_file_cache which tested under our
pressure test, however I met some strange behaviors. Now I can use ab
to reproduce it.

I'm using Apache2.2.0 on 4P Xeon(EM64T) and EL4U2 ( 2.6.9-22.ELsmp, 64bit).

Apache configuration:
<IfModule mod_file_cache.c>
mmapfile /usr/local/apache2/htdocs/index.html        #just cache one file
</IfModule>
ThreadLimit     600
<IfModule worker.c>
StartServers        10
MaxClients         500000
ServerLimit     5000
MinSpareThreads      1000
MaxSpareThreads      2000
ThreadsPerChild     100
MaxRequestsPerChild  0
ListenBackLog   3000
</IfModule>
MaxRequestsPerChild  0

Now I test with "/usr/local/apache2/bin/ab -n 100000 -c 10
localhost/index.html", during the tests, some threads segmentation
fault.

I used gdb to get the backtrace, however looks like these segmentation
fault will happen in different places. Most are:
#0  0x0000003d26e2e989 in kill () from /lib64/tls/libc.so.6
#1  <signal handler called>
#2  0x00000000006fe818 in ?? ()
#3  0x000000000042d5fa in ap_rgetline_core (s=0x45007058, n=8192,
read=0x45007060, r=0x2ac4e2fd28, fold=0, bb=0x2ac4e31248) at
protocol.c:222
#4  0x000000000042dbd8 in ap_get_mime_headers_core (r=0x2ac4e2fd28,
bb=0x2ac4e31248) at protocol.c:681
#5  0x000000000042e4b2 in ap_read_request (conn=0x6e86c0) at protocol.c:909
#6  0x0000000000462540 in ap_process_http_connection (c=0x6e86c0) at
http_core.c:189
#7  0x0000000000440ac3 in ap_run_process_connection (c=0x6e86c0) at
connection.c:43
#8  0x000000000046d877 in worker_thread (thd=0x63cea8, dummy=Variable
"dummy" is not available.
) at worker.c:531
#9  0x0000003d279060aa in start_thread () from /lib64/tls/libpthread.so.0
#10 0x0000003d26ec5b43 in clone () from /lib64/tls/libc.so.6
#11 0x0000000000000000 in ?? ()

#0  0x0000003d26e2e989 in kill () from /lib64/tls/libc.so.6
#1  <signal handler called>
#2  0x0000000000443668 in add_any_filter_handle (frec=0x5b61a8, ctx=0x0,
r=0x7257e8, c=0x715990, r_filters=0x725a68, p_filters=0x725a78,
c_filters=0x715a08)
   at util_filter.c:330
#3  0x000000000044390a in ap_add_input_filter_handle (f=Variable "f" is not
available.
) at util_filter.c:415
#4  0x000000000042e639 in ap_read_request (conn=0x715990) at protocol.c:1022
#5  0x0000000000462540 in ap_process_http_connection (c=0x715990) at
http_core.c:189
#6  0x0000000000440ac3 in ap_run_process_connection (c=0x715990) at
connection.c:43
#7  0x000000000046d877 in worker_thread (thd=0x63d208, dummy=Variable "dummy"
is not available.
) at worker.c:531
#8  0x0000003d279060aa in start_thread () from /lib64/tls/libpthread.so.0
#9  0x0000003d26ec5b43 in clone () from /lib64/tls/libc.so.6
#10 0x0000000000000000 in ?? ()

#0  0x0000003d26e2e989 in kill () from /lib64/tls/libc.so.6
#1  <signal handler called>
#2  ap_invoke_filter_init (filters=0x2c) at config.c:312
#3  0x000000000043a6f3 in ap_invoke_handler (r=0x2ac4e02978) at config.c:344
#4  0x0000000000464bb0 in ap_process_request (r=0x2ac4e02978) at
http_request.c:258
#5  0x00000000004625cd in ap_process_http_connection (c=0x7138b0) at
http_core.c:171
#6  0x0000000000440ac3 in ap_run_process_connection (c=0x7138b0) at
connection.c:43
#7  0x000000000046d877 in worker_thread (thd=0x63d598, dummy=Variable "dummy"
is not available.
) at worker.c:531
#8  0x0000003d279060aa in start_thread () from /lib64/tls/libpthread.so.0
#9  0x0000003d26ec5b43 in clone () from /lib64/tls/libc.so.6
#10 0x0000000000000000 in ?? ()

Are these threads segmentation fault due to over pressure? I also
tested cachefile directive and without mod_file_cache, both works OK.

Any ideas? Should I submit a bug request?

Thx, Xuekun
Comment 1 William A. Rowe Jr. 2018-11-07 21:09:55 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.