Strange process behavior
Hi, We are experiencing a strange problem on our web servers for our site, and are not sure if the problem is mod_perl related, but thought we would turn here for help in case someone else has experienced this issue. Unfortunately, we are not sure exactly when the problem started, so we can’t point to any particular change that might have prompted it. We are using Apache 1.3.42 with mod_perl 1.31 and Perl 5.8.3 on Solaris 9. What is happening is that a particular Apache child process starts having an issue where the wrong content is being returned for a request. The content returned is always from the correct script, but it has the wrong data. For example, if we request a product detail page for a particular product, we might get a different product, or we might get a message that the product does not exist, when it does. After adding a lot of logging to our logs, we discovered that the Apache request object will have the correct information, but the CGI object never seems to get the global values reset, so is always has the query_string of the request where things started to go wrong. The process will continue to get and respond to requests, but the CGI object’s query_string never changes, so the user either gets no information or the wrong information. For example, if we had a request for mysite.com/product?sku=12345, and the process that served this request starts to have the problem, then we see that for every request that process gets, logging $q->query_string gives us ‘sku=12345’. It seems like the initialize_globals() CGI method is never being executed in the process cleanup. There doesn’t seem to be any particular request that triggers this behavior. We have checked the server load when we discover the issue is occurring and everything seems normal. The problem process does not seem to be using any more memory or CPU than any of the other processes, and the number of processes is fine. Has anyone experienced anything like this? Any ideas how we can track down the problem? Thank you in advance for any help you can give us. Sharon
Re: Strange process behavior
Hi, > After adding a lot of logging to our logs, we discovered that the Apache > request object will have the correct information, but the CGI object never > seems to get the global values reset, so is always has the query_string of > the request where things started to go wrong. The process will continue to > get and respond to requests, but the CGI object’s query_string never > changes, so the user either gets no information or the wrong information. This can happen when you do an internal redirect, which does not trigger a cleanup. Some options: - Use something else instead of CGI.pm. Apache::Request is one possibility. - Put in a call to initialize_globals() in an early phase, like FixupHandler, so you know it has been run. If the process seems to become broken and always serve the wrong pages after a certain point, you may have something else wrong, like a variable scoping issue. - Perrin
Re: [RELEASE CANDIDATE] Apache-SizeLimit 0.92 RC2
On Thu, Sep 16, 2010 at 8:45 PM, Fred Moyer wrote: > This is RC2, no changes from RC1 except package. Please test and report back. > > MD5 (Apache-SizeLimit-0.92-rc2.tar.gz) = 8d761fc151c43f00f6991b411ac0371b > > http://people.apache.org/Apache-SizeLimit-0.92-rc2.tar.gz Whoops, there was an error in that url :) Should be http://people.apache.org/~phred/Apache-SizeLimit-0.92-rc2.tar.gz Please take this for a test and report back. I'd like to be able to release this sometime this week, it is the only dependency standing in the way of mod_perl 2.0.5. +1, darwin, 5.12.2, httpd 2.2.15. > > Export USE_SMAPS, VERSION, and REQUEST_COUNT to Apache::SizeLimit > from Apache::SizeLimit::Core. > Call _platform_check_size as a class method to prevent error when > USE_SMAPS=0, RT #33303 > Reported by: jgoodri...@alum.dartmouth.edu > [Fred Moyer ] > > *** HEADS UP - SHARED CODE BASE - HEADS UP *** > Apache-SizeLimit has been hybridized. > It has been split into 3 packages. > 1) Apache::SizeLimit - User API for httpd 1.3.x / mod_perl 1.x > 2) Apache2::SizeLimit - User API for httpd 2.x / mod_perl 2.x > > 3) Apache::SizeLimit::Core - Interal Shared Functionality > _NEVER_ use this module directly. > [Philip M. Gollucci ] > > Skip tests on OS X (darwin) due to broken getrusage(3) > [Fred Moyer , > Philip M. Gollucci ] > > Added a SUPPORT section to the docs. > [Dave Rolsky ] >
Re: [RELEASE CANDIDATE] Apache-SizeLimit 0.92 RC2
On Monday, September 20, 2010 19:44:54 Fred Moyer wrote: > http://people.apache.org/~phred/Apache-SizeLimit-0.92-rc2.tar.gz > > Please take this for a test and report back. +1, linux x86_64, perl 5.12.1, Apache/2.2.16 (prefork MPM) Torsten Förtsch -- Need professional modperl support? Hire me! (http://foertsch.name) Like fantasy? http://kabatinte.net
Re: Strange process behavior
[ please reply-all to keep it on the list ] On Mon, Sep 20, 2010 at 4:07 PM, Sharon Pattison wrote: > We would still like to track down the cause of the problem, if we can. The > process does indeed seem to become broken at a particular point and the CGI > object has an incorrect query_string for each request until the process > dies. That sounds like it may be a problem with the scoping of the variables you load data into from CGI rather than CGI itself. Hard to say until you get a way to reproduce it. > If you have any other suggestions for finding the root of the problem, we > would love to hear your ideas. If you can write a test to determine if this is happening, you can log the process ID and then use that to look back through your access_log (if you log process ID there) and see what the sequence was that broke the process. Try to write a test that runs at some point in the request and checks the URL against the values you see from CGI.pm. - Perrin
Re: [RELEASE CANDIDATE] Apache-SizeLimit 0.92 RC2
On 21/09/10 03:44, Fred Moyer wrote: On Thu, Sep 16, 2010 at 8:45 PM, Fred Moyer wrote: This is RC2, no changes from RC1 except package. Please test and report back. MD5 (Apache-SizeLimit-0.92-rc2.tar.gz) = 8d761fc151c43f00f6991b411ac0371b http://people.apache.org/Apache-SizeLimit-0.92-rc2.tar.gz Whoops, there was an error in that url :) Should be http://people.apache.org/~phred/Apache-SizeLimit-0.92-rc2.tar.gz Please take this for a test and report back. I'd like to be able to release this sometime this week, it is the only dependency standing in the way of mod_perl 2.0.5. +1, darwin, 5.12.2, httpd 2.2.15. tested ok on fedora 13 and debian lenny. Only test was a pod test?
Mixed Children on amd64
Hi, I wrote a web application for case management (legal, insurance) with mod_perl. The app is visible at : http://marica.fr/ I recently purchased a 'dedibox' (http://www.online.net/serveur-dedie/offre-dedibox-v3.xhtml) intended to host it, and configured it with Debian. My setup is as follow : Two instances of Apache2 sit on the server, one with mod_ssl enabled, the other without. The former serves registered users on port 443, the latter serves only the demo account which is visible on the home page. After an initial connection to a common session database (using Apache::Session and cookies for session management), each server connects to a different PostgreSQL database for the data. This system has been running fine for several months on various 32bit systems. Problem description : When I use this new machine (it is currently disabled), my registered users on occasion will retrieve the data from the demo account instead of their own, as if the children spawned by the two apache2 processes got mixed up. This never happened before, so I'm guessing it is related to the fact that this is a 64bit processor, which I never used before. Could someone let me know from looking at the information below what I might have done wrong in my installation? Thank you. Below are the commands used to compile Perl and the 2 instances (without/with mod_ssl) of Apache2/mod_perl/libapreq. Then follows the output of `cat /proc/cpuinfo` and `Perl -V` # uname -a Linux sd-21096 2.6.32-bpo.4-amd64 #1 SMP Thu Apr 8 10:20:24 UTC 2010 x86_64 GNU/Linux #Apache2/mod_perl version Apache/2.2.16 (Unix) mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.12.1 # #Perl # wget -c http://www.cpan.org/src/perl-5.12.1.tar.gz tar -xzf perl-5.12.1.tar.gz #./Configure -des -Dcc=gcc -Dprefix=/home/perl/5.12.1 -Dextras="Compress::Zlib Bundle::LWP ExtUtils::XSBuilder CGI::Cookie URI::Escape" #configure for 64bit platform CFLAGS='-m64 -mtune=nocona' ./Configure -des -A ccflags=-fPIC -Dcc=gcc -Dprefix=/home/perl/5.12.1 -Dextras="Compress::Zlib Bundle::LWP ExtUtils::XSBuilder CGI::Cookie URI::Escape" # #Apache2 # #source wget -c http://apache.cict.fr/httpd/httpd-2.2.16.tar.gz tar -xzf httpd-2.2.16.tar.gz mkdir -p /home/httpd/2.2.16 cd /home/user1/src/httpd-2.2.16 ./buildconf ./configure --prefix=/home/httpd/2.2.16 --enable-rewrite make && make install # #mod_perl # wget -c http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz /home/perl/5.12.1/bin/perl Makefile.PL MP_AP_PREFIX=/home/httpd/2.2.16 make && make test && make install Test Summary Report --- t/hooks/authen_basic.t(Wstat: 0 Tests: 4 Failed: 1) Failed test: 4 t/hooks/authz.t (Wstat: 0 Tests: 4 Failed: 1) Failed test: 4 t/modules/apache_status.t (Wstat: 0 Tests: 15 Failed: 2) Failed tests: 14-15 Files=238, Tests=2404, 163 wallclock secs ( 2.98 usr 1.48 sys + 122.83 cusr 15.66 csys = 142.95 CPU) Result: FAIL Failed 3/238 test programs. 4/2404 subtests failed. [warning] server localhost:8529 shutdown [ error] error running tests (please examine t/logs/error_log) ++ | Please file a bug report: http://perl.apache.org/bugs/ | ++ make[1]: *** [mod_perl.so] Erreur 1 make[1]: quittant le répertoire « /home/user1/src/mod_perl-2.0.4/src/modules/perl » For details on getting started with mod_perl 2, see: | | | | http://perl.apache.org/docs/2.0/user/intro/start_fast.html | | # #Libapreq2 # #source wget -c http://mirror.mkhelif.fr/apache/httpd/libapreq/libapreq2-2.12.tar.gz /home/perl/5.12.1/bin/perl Makefile.PL --with-apache2-apxs=/home/httpd/2.2.16/bin/apxs --with-expat=/home/httpd/2.2.16/ make make test make install Test Summary Report --- t/apreq/cgi.t (Wstat: 0 Tests: 71 Failed: 5) Failed tests: 52, 56, 60, 64, 68 t/apreq/upload.t (Wstat: 0 Tests: 80 Failed: 10) Failed tests: 41, 45, 49, 53, 57, 61, 65, 69, 73, 77 Files=11, Tests=287, 15 wallclock secs ( 2.00 usr 0.07 sys + 7.36 cusr 0.97 csys = 10.40 CPU) Result: FAIL Failed 2/11 test programs. 15/287 subtests failed. [warning] server localhost:8529 shutdown [ error] error running tests (please examine t/logs/error_log) make[1]: *** [run_tests] Erreur 1 make[1]: quittant le répertoire « /home/user1/src/libapreq2-2.12/glue/perl » make: *** [perl_test] Erreur 2 # #Apache2-ssl # mkdir -p /home/httpd/2.2.16-ssl cd /home/user1/src/httpd-2.2.16 ./buildconf ./configure --prefix=/home/httpd/2.2.16-ssl --enable-rewrite --enable-ssl make clean && make && make install cd /home/user1/src/mod_perl-2.0.4 make clean /home/perl/5.12.1/bin/perl Makefile.PL MP_AP_PREFIX=/home/httpd/2.2.16-ssl make && make install cd /home/user1/src/libapreq2-2.12 make clean /home/perl/5.12.1/bin/perl Makefile.PL --with-apache2-apxs=/home/httpd/2.2.16-ssl/bin/ap