Summary: | Error in pool management on multiprocessor envoirment | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Gabriel Kalkuhl <kalkuhl> |
Component: | All | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | CLOSED INVALID | ||
Severity: | critical | ||
Priority: | P3 | ||
Version: | 2.0.47 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All |
Description
Gabriel Kalkuhl
2004-06-21 09:11:29 UTC
Hello, I am also having the same issue. If i change the ThreadsPerChild then i am able to vary how long the server will run before restarting. While it restarts it fails to serve any pages and returns error in browser. System ------------------- Dell Dual P3 1gz Win2k with all updates as of 10/25/2004 Apache 2.0.52 OpenSSL 0.9.7d PHP (tried many version and all have same issue from 4.3.2 - 5.0.2 and 5.1.x CVS) Any advice or help in focusing this issue would be very helpfull. Thank You, David [Sun Oct 24 11:52:37 2004] [notice] Parent: child process exited with status 1 -- Restarting. [Sun Oct 24 11:52:40 2004] [notice] Parent: Created child process 4060 [Sun Oct 24 11:52:40 2004] [notice] Disabled use of AcceptEx() WinSock2 API [Sun Oct 24 11:52:43 2004] [notice] Child 4060: Child process is running [Sun Oct 24 11:52:43 2004] [notice] Child 4060: Acquired the start mutex. [Sun Oct 24 11:52:43 2004] [notice] Child 4060: Starting 1920 worker threads. [Sun Oct 24 11:52:44 2004] [notice] Child 4060: Listening on port 443. [Sun Oct 24 11:52:44 2004] [notice] Child 4060: Listening on port 80. [Sun Oct 24 11:52:44 2004] [notice] Child 4060: Listening on port 80. [Sun Oct 24 11:58:17 2004] [notice] Parent: child process exited with status 1 -- Restarting. [Sun Oct 24 11:58:20 2004] [notice] Parent: Created child process 10080 [Sun Oct 24 11:58:20 2004] [notice] Disabled use of AcceptEx() WinSock2 API [Sun Oct 24 11:58:23 2004] [notice] Child 10080: Child process is running [Sun Oct 24 11:58:23 2004] [notice] Child 10080: Acquired the start mutex. [Sun Oct 24 11:58:23 2004] [notice] Child 10080: Starting 1920 worker threads. [Sun Oct 24 11:58:23 2004] [notice] Child 10080: Listening on port 443. [Sun Oct 24 11:58:23 2004] [notice] Child 10080: Listening on port 80. [Sun Oct 24 11:58:23 2004] [notice] Child 10080: Listening on port 80. Hello David! I think many of the listed PHP errors for Apache 2 depends on this Bug. I wonder why Apache team members ignore this bug! However for fixing it, you have to change the memory management to protect the pool memory. I've not the time to do this and it's a bit dangerous because of race conditions and dead lock states. This bug should be fixed by someone who created this pool management. The Bug fix for me was to completely switch back to Apache 1. Sorry, not really helpful Gabriel apr_pool_destroy(apr_pool_t * 0x007d8db8) line 797 + 13 bytes trace_add(server_rec * 0x0077c290, request_rec * 0x00000000, x_cfg *...) "Then I made heavy request to normal URL’s and to mod_example simultaneous." it looks very much like mod_example is not thread-safe; so this may just be a good demonstration of that. Do you have an example of a crash using any module other than mod_example? I agree with switching back to apache 1. I'm currently in the process of compiling the latest stable version of apache 1 with ssl after getting a few emails from some colleagues of mine with the same issue. It is unfortunate that this issue is so ingrained into the apache2 version. It may just be my imagination, but I believe that the apache team is focusing on apache2. If this is true then for people like us to upgrade this is a mandatory fix, I just can’t have customers getting errors every 5.5 minutes. Thnx for the fast response and I would love to know if you or the Apache team ever decides this is really an issue they would like to fix. - David All that the "Child process exited with status 3221225477 -- Restarting." messages means is that a child process crashed. This may be because of a bug in a module, or it may be because of a bug in httpd -- it's impossible to tell without a backtrace. If you can either: a) get a simple reproduction case for the problem, or b) get a backtrace from a crash there is a chance of looking at this further. I concur with Joe's comment that mod_example is not thread-safe. (Any threaded Apache with mod_example should be expected to crash.) As he says, we need a recipe to reproduce, or other crash data, from a configuration without mod_example . Hello Joe, yes, the error appeared to me first by using mod_cplusplus with EasySoap++. I implemented a SOAP server with this modules. My module worked fine for some time. On the first dual processor machine we installed this software it crashed. After some reviews in the cplusplus module and EasySoap++ I found that the error appers in the apache pool management. For better demonstration I implemented the delay in mod_example. It will cras as soon as you make simultanous requests to normal http service and mod_example. By the way, I saw some other bug reports from poeple using PHP with the same behavior (see bug 24095). Are there some restrictions on making 'long' operations during request handling? Gabriel Sorry, comments where made at the same time. Sorry Jeff, but I'm a bit confused about hearing that mod_example isn't thread safe. Mod_example doesn't do anything like piping some text to the output. The only modification I've done is to insert a sleep between the output lines so the module behaves like doing a slow database acces (which originaly was my intention). Mod_example doesn't crash if I remove the sleep. If this is not thread safe, then all modules which generate some text output aren't thread safe. Gabriel Look at mod_example's trace_add function and how it stores pointers to pools in global variables - it is not a well-behaved example module at all! The first thing to do must be to take mod_example completely out of the picture, and try and trigger whatever problem it is you're seeing. Yes, PHP users report crashes too, sometimes these are PHP bugs and sometimes not. Bug #32051 is a tracking bug for mod_example not being thread safe. This bug is invalid because the issue comes from a user basing their module on mod_example. Your right! I removed all the trace_add stuff in mod_example and it works fine. No more crashes anymore! By the way, I'm a bit dissapointed about mod_example. Normaly example means, that someone wíll show how to do something. In this case mod_example should be titled: "Here we show you, how to write bad code and how you shouldn't write modules". Now I can go on searching on mod_cplusplus, which is only third party for apache. Thanks for spending time on my mistakes! Gabriel I've implemented the one-minute fix you suggested, by adding a warning to mod_example http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/experimental/mod_example.c |