Description of problem:
I have tried Apache 2.0.40 on Redhat 9.0 (installed by rpm package from
redhat). Apache web server hangs, when i hit the web server multiple times
simultaneously. This behaviour does not happen with source verison (i have
downloaded source code of 2.0.40 and build on RH 9.0).
Version-Release number of selected component (if applicable):
Redhat 9.0, Apache httpd 2.0.45
Steps to Reproduce:
I have Apache DSO module which connects to remote application and returning
html page. I am getting html page when single request is submitted and web
server hangs when i simultaneously hit web server with different request. This
does not occurrs with source version of apache httpd 2.0.40 ( downloaded from
apache.org). Same appplication working fine in RedHat 8.0 (both binary and
Did you recompile your module on Red Hat Linux 9? This report is too vague to
be able to determine that the problem isn't in your custom module.
Try running "strace" on an httpd child and see where the hang occurs.
Yes, I have recompiled my DSO module on RH 9.0. Moreover, I have tried with cgi
module (that does same operation as our DSO module) and it's working without
any issues. I am getting this problem only through DSO module.
Since the hang is in your custom module you need to work out what is causing the
hang. Once you have reproduced the hang, find an httpd child which is hung
(via "ps axf", for instance), and run
# strace -p 12354
on it to see where it is blocked. Enabling the server-status page may help.
Please attach your httpd.conf too.
I could not able to trace the child process. It says
trace: ptrace(PTRACE_SYSCALL, ...): Operation not permitted
detach: ptrace(PTRACE_DETACH, ...): Operation not permitted
any other way to trace it.
You need to get the latest kernel from up2date and reboot into it to fix
strace'ing httpd children, unfortunately.
Created attachment 92912 [details]
httpd config file
Can you confirm that the attached httpd.conf hasn't been truncated, the last two
# Disable autoindex for the root direc
Created attachment 92913 [details]
latest http config file
I have attached latest httpd config file.
I have upgraded the kernel to 2.4.20-18.9. I have applied strace to child
process which hangs and got the following out put.
futex(0x405ac520, FUTEX_WAIT, 5, NULL
I have noticed that, child process is hanged in the following scenario
I have dso module which process the incoming request. I am hitting this module
and stopped intermediately (I am forcing to stop the request by pressing stop
button in the web browser) before request is fully processed. Child process is
hanged when i tried to access same module again.
I presume you have not configured use of the httpd.worker threaded MPM? This is
a hang when calling pthread_mutex_lock. Does your custom module use threads or
My web server MPM is configured to use pre-fork not worker. I am using the web
server which installed along with RH 9.0 and it is configured to use pre-fork
I am using same configuration in RH 8.0 and it is working with out any issues.
Also I have installed apache source and built a binaries on RH 9.0. This source
version of apache is configured with pre-fork model and it is working with out
Is the apache binaries shipped with RH 9.0 is compiled with new pthread (NPTL)
in RH 9.0 ?
Yes, the default threading library on RHL9 is NPTL. You can try starting httpd
# service httpd stop # wait for shutdown
# LD_ASSUME_KERNEL=2.2.9 /usr/sbin/httpd
to use the old thread library. Does this make a difference? Can you confirm
that your custom module does use threads and mutexes?
Yes, my custom module uses threads and mutexes. I have tried with
# LD_ASSUME_KERNEL=2.2.9 /usr/sbin/httpd
Now, child process does not hang and everything works as expected.
Regarding source version of Apache 2.0.40
Source version of apache (MDM is prefork) also hangs. I have configured apache
source MDM to use worker and still the web server is hangs. I have given the
strace output for web server.
8933 ? S 0:00 /usr/local/apache2/bin/httpd -k start
8934 ? S 0:00 \_ /usr/local/apache2/bin/httpd -k start
8935 ? S 0:00 \_ /usr/local/apache2/bin/httpd -k start
8937 ? S 0:00 \_ /usr/local/apache2/bin/httpd -k start
strace -p 8934
strace -p 8935
strace -p 8937
This is happens only when the request is stopped intermediately. I couldn't
able to run using LD_ASSUME_KERNEL with my source version of apache (httpd does
not start and no error is returned).
Binary apache is working with out any issues with
If that's worker then you need to use "ps axmf" to see all the threads. Syed,
if your module is hanging in versions of httpd compiled from source too, it's
hard to say that this is a bug in our httpd package - it's more likely that this
is some problem in the thread or mutex handling in your module which is exposed
by NPTL. I suggest you review the source of your module carefully looking for
deadlocks etc - I'm going to close this bug.
Any idea, How this is working in RH 8.0 and working in RH 9.0 with
On 9 if you use LD_ASSUME_KERNEL, it uses the same threading library as 8.0. On
9, if you don't use LD_ASSUME_KERNEL, it uses NPTL.