You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Aliet Santiesteban Sifontes <al...@tesla.cujae.edu.cu> on 2005/09/19 21:43:10 UTC

mp2 crashing Apache server

Hi list, I'm in the process of migrating our CGI applications to 
mod_perl, we are using:
Windows 2003 Enterprise Server, ActivePerl 5.8.7 Build 813, 
Apache-2.0.54. Perl with modules:
   1. ActivePerl-DocTools     [0.5]
   2. Archive-Tar            [1.23]
   3. Archive-Zip            [1.14]
   4. CGI-Session            [3.95]
   5. Compress-Zlib          [1.34]
   6. Data-Dump               [1.6]
   7. DBD-mysql            [3.0002]
   8. DBI                    [1.48]
   9. Digest-HMAC             [1.1]
  10. Digest-MD2              [2.3]
  11. Digest-MD4          [1.5.0.1]
  12. Digest-SHA1            [2.10]
  13. File-CounterFile        [1.4]
  14. Font-AFM               [1.19]
  15. HTML-Parser            [3.45]
  16. HTML-Tagset             [3.4]
  17. HTML-Tree              [3.18]
  18. IO-String               [1.6]
  19. IO-Zlib                 [1.4]
  20. libwww-perl         [5.803.0~
  21. MD5                     [2.3]
  22. MIME-Base64-Scripts     [1.0]
  23. mod_perl              [2.0.1]
  24. SOAP-Lite           [0.55.0.~
  25. Term-ReadLine-Perl  [1.2.3.1]
  26. TermReadKey            [2.30]
  27. Text-Autoformat        [1.12]
  28. Text-Reform            [1.11]
  29. Tk                  [804.27.~
  30. Unicode-String          [2.7]
  31. URI                    [1.35]
  32. XML-Parser          [2.34.0.~
  33. XML-Simple             [2.14]
Active Perl ships with cgi-3.10, U updated to 3.11 as mod_perl says.
Mod_Perl configured as instructions on site:
in httpd.conf
LoadFile "D:/Perl/bin/perl58.dll"
LoadModule perl_module modules/mod_perl.so
PerlRequire "D:/Apache2/conf/includes.pl"
PerlSwitches -wT
Alias /intercompras/cgi-bin/ "D:/Apache2/htdocs/intercompras/cgi-bin/"
<Location /intercompras/cgi-bin/>
     SetHandler perl-script
     PerlResponseHandler ModPerl::Registry
     Options +ExecCGI +FollowSymLinks
     PerlOptions +ParseHeaders
</Location>
in includes.pl
use lib qw(D:/Apache2/htdocs/intercompras/cgi-bin);
1;
Mod_Perl installed as documentation says, via ppm por Apache 2, Mod_perl 
2.0.1.
Well, the sites runs ok in normal CGI mode, but when I switch to 
mod_perl Apache sarts crashing, the strange is that the first run works 
ok, but the second run of the same file crash the apache server, here 
the output log:
Mon Sep 19 14:35:05 2005] [notice] Server built: Jul 24 2005 23:42:22
[Mon Sep 19 14:35:05 2005] [notice] Parent: Created child process 3844
[Mon Sep 19 14:35:06 2005] [notice] Child 3844: Child process is running
[Mon Sep 19 14:35:06 2005] [notice] Child 3844: Acquired the start mutex.
[Mon Sep 19 14:35:06 2005] [notice] Child 3844: Starting 250 worker threads.
[Mon Sep 19 14:35:16 2005] [notice] Parent: child process exited with 
status 3221225477 -- Restarting.
The scripts is something like this:
se DBI;
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use Master;
# Let's require session stuff
use lib::SessionUtil;
our ($cgi);
our ($session);
$cgi = &lib::SessionUtil::Get_CGI_Object();
$session = &lib::SessionUtil::Get_Session_Object();
#---------------------------
# Path vars
my ($htmltop,$htmldir,$servertop,$serverdir,$htmlfullpath) = 
&Master::directoriosinc;
...blala....
print $cgi->header,                    # create the HTTP header
         $cgi->start_html(-onload=>"top.isRow=1;
                                    top.CantRows=$CantRows;
                                    top.Limitado=1;
                                    top.Cause='$isError';
                                    top.CGISESSID='$sid'
                                    top.Nav='$htmldir/$Sector/nav.html';
                                    document.location.href='$isLocation';
                                    top.isTitleLeft='Procesando el login 
...';
                                    top.setTitle();"), # start the HTML
$cgi->end_html;                  # end the HTML
others scripts are like this more or less.
Any ideas on how to fix this, it has me crazy.
Best Regards






Re: mp2 crashing Apache server

Posted by Aliet Santiesteban Sifontes <al...@tesla.cujae.edu.cu>.
Here my minimal script that cause this to happen:

File Listing.pl
-------------------------------------
use DBI;
use CGI;
use strict;
use diagnostics;
use CGI::Carp qw(fatalsToBrowser);
# Let's require session stuff
use lib::SessionUtil;
my  $cgi;
$cgi = &lib::SessionUtil::Get_CGI_Object();
my $onload;
$onload = "if 0==1){
                top.Nav='test';
             };
             if (top.Nav > '' ) {
                top.frames.Navigation.location.href=top.Nav;
            top.Nav='';
                };
                top.CountRows='3';
                top.isRow='';
                top.CantRows='3';
                top.frames.Path.location.href='test1';
                top.isTitleLeft='test3';
                top.isTitleRight='test4';
                top.setTitle();
                top.ListCode='2';
                top.Level = '2';
                top.Origen = '2';
                top.IDAux = '2';
                top.Filtro='1';";
print $cgi->header;                    # create the HTTP header
print $cgi->start_html(-onload=>"$onload"); # start the HTML
print $cgi->end_html;

File lib/SessionUtil.pm
---------------------------------------------
package lib::SessionUtil;
use DBI;
use strict;
use CGI::Session qw/-ip-match/;
use CGI;
our $cgi;
$cgi = new CGI;

sub Get_CGI_Object {
    return $cgi;
}
1;

With this, I can reproduce the error, any ideas on how to fix this??
Best Regards...
Philip M. Gollucci wrote:
> Aliet Santiesteban Sifontes wrote:
>> Windows 2003 Enterprise Server, ActivePerl 5.8.7 Build 813, 
>> Apache-2.0.54. Perl with modules:
>>   8. DBI                    [1.48]
> good.
>
>> Active Perl ships with cgi-3.10, U updated to 3.11 as mod_perl says.
> good.
>
>> in includes.pl
>> use lib qw(D:/Apache2/htdocs/intercompras/cgi-bin);
>> 1;
> did you ever use mod_perl2 and the like ?
> http://perl.apache.org/docs/2.0/user/handlers/server.html#Startup_File
>
>> Mon Sep 19 14:35:05 2005] [notice] Server built: Jul 24 2005 23:42:22
>> [Mon Sep 19 14:35:05 2005] [notice] Parent: Created child process 3844
>> [Mon Sep 19 14:35:06 2005] [notice] Child 3844: Child process is running
>> [Mon Sep 19 14:35:06 2005] [notice] Child 3844: Acquired the start 
>> mutex.
>> [Mon Sep 19 14:35:06 2005] [notice] Child 3844: Starting 250 worker 
>> threads.
>> [Mon Sep 19 14:35:16 2005] [notice] Parent: child process exited with 
>> status 3221225477 -- Restarting.
> Can you implement a minimal script that causing this to happen and 
> show that to the list ?
>
>
>






Re: mp2 crashing Apache server

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Aliet Santiesteban Sifontes wrote:
> Windows 2003 Enterprise Server, ActivePerl 5.8.7 Build 813, 
> Apache-2.0.54. Perl with modules:
>   8. DBI                    [1.48]
good.

> Active Perl ships with cgi-3.10, U updated to 3.11 as mod_perl says.
good.

> in includes.pl
> use lib qw(D:/Apache2/htdocs/intercompras/cgi-bin);
> 1;
did you ever use mod_perl2 and the like ?
http://perl.apache.org/docs/2.0/user/handlers/server.html#Startup_File

> Mon Sep 19 14:35:05 2005] [notice] Server built: Jul 24 2005 23:42:22
> [Mon Sep 19 14:35:05 2005] [notice] Parent: Created child process 3844
> [Mon Sep 19 14:35:06 2005] [notice] Child 3844: Child process is running
> [Mon Sep 19 14:35:06 2005] [notice] Child 3844: Acquired the start mutex.
> [Mon Sep 19 14:35:06 2005] [notice] Child 3844: Starting 250 worker 
> threads.
> [Mon Sep 19 14:35:16 2005] [notice] Parent: child process exited with 
> status 3221225477 -- Restarting.
Can you implement a minimal script that causing this to happen and show that to the list ?



-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com