Hi all,
 We are using Inline-0.44 as a perl module in Apache 2.0.52 with 
mod_perl/1.999.20 in Solaris 2.8. There is some error in Apache's error_log, 
please see the details as reference.
 
 If we use Inline as Example 1, even without any real C program, Apache server 
always reports the previous handler "exits signal Segmentation fault" and 
restarts the whole handler. This error happens every time except for the first 
time when Apache server restarts. And It doesn't happen either if no more http 
request to it.
 
 However, just as example 2, if we comment the contents only regarding Inline, 
everything seems in order -  Apache doesn't report any error and the process ID 
keeps as the previous one.
 
 Any advice for us? Thanks in advance.

==================== Example 1.  With Inline 
==============================================
package OPGLIB::PrepaidGW;
use strict;
use warnings;
use Error qw(:try);
use Apache2 ();
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Connection ();
use Apache::Log ();
use Apache::Const -compile => qw(OK :log);
use APR::Const    -compile => qw(ENOTIME SUCCESS);
use XML::Simple;        #XML library
use Data::Dumper;       #For Debugging only
use Switch;             #For switch statement
#Our own libraries
use OPGLIB::XMLHandler;
use OPGLIB::IPCHandler;
use OPGLIB::GlobalVars qw(%REQCODE %RESCODE);
#Create global object
my $xmlHandler = OPGLIB::XMLHandler->new();
my $ipcHandler = OPGLIB::IPCHandler->new();
use Inline Config =>
        DIRECTORY => '/usr/apache2.0.52/htdocs/OPG/Inline',
        ENABLE => 'UNTAINT';
use Inline 'C' => << 'OPG_C_Code'; 
OPG_C_Code
Inline->init;
#Main handler function
sub handler {
        
        #Get the http request
        my $r = shift;
        my $c = $r->connection;
        $r -> warn ("Start: PID - $$");
        $r -> warn ("End of PID - $$");
}
1;
 

-----------------------------------------------------------
[Wed Feb 23 15:28:34 2005] [notice] Apache/2.0.52 (Unix) mod_ssl/2.0.52 
OpenSSL/0.9.7b mod_perl/1.999.20 Perl/v5.8.5 configured -- resuming normal 
operations
[Wed Feb 23 15:28:41 2005] [warn] Start: PID - 10233
[Wed Feb 23 15:28:41 2005] [warn] End of PID - 10233
[Wed Feb 23 15:28:45 2005] [notice] child pid 10233 exit signal Segmentation 
fault (11)
[Wed Feb 23 15:28:45 2005] [warn] Start: PID - 10234
[Wed Feb 23 15:28:45 2005] [warn] End of PID - 10234
[Wed Feb 23 15:28:48 2005] [notice] child pid 10234 exit signal Segmentation 
fault (11)
[Wed Feb 23 15:30:01 2005] [warn] Start: PID - 10238
[Wed Feb 23 15:30:01 2005] [warn] End of PID - 10238
[Wed Feb 23 15:30:11 2005] [notice] child pid 10238 exit signal Segmentation 
fault (11)
[Wed Feb 23 15:30:12 2005] [warn] Start: PID - 10246
[Wed Feb 23 15:30:12 2005] [warn] End of PID - 10246

========================Example 2: Without Inline 
only==================================================
 
package OPGLIB::PrepaidGW;
use strict;
use warnings;

use Error qw(:try);
use Apache2 ();
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Connection ();
use Apache::Log ();
use Apache::Const -compile => qw(OK :log);
use APR::Const    -compile => qw(ENOTIME SUCCESS);

use XML::Simple;        #XML library
use Data::Dumper;       #For Debugging only
use Switch;             #For switch statement

#Our own libraries
use OPGLIB::XMLHandler;
use OPGLIB::IPCHandler;
use OPGLIB::GlobalVars qw(%REQCODE %RESCODE);

#Create global object
my $xmlHandler = OPGLIB::XMLHandler->new();
my $ipcHandler = OPGLIB::IPCHandler->new();

#Main handler function

sub handler {
        
        #Get the http request
        my $r = shift;
        my $c = $r->connection;
        $r -> warn ("Start: PID - $$");
        $r -> warn ("End of PID - $$");
}
1;

---------------------------------------------------------------------------------------------------------------------------------
[Wed Feb 23 15:32:37 2005] [notice] Apache/2.0.52 (Unix) mod_ssl/2.0.52 
OpenSSL/0.9.7b mod_perl/1.999.20 Perl/v5.8.5 configured -- resuming normal 
operations
[Wed Feb 23 15:32:47 2005] [warn] Start: PID - 12272
[Wed Feb 23 15:32:47 2005] [warn] End of PID - 12272
[Wed Feb 23 15:32:48 2005] [warn] Start: PID - 12272
[Wed Feb 23 15:32:48 2005] [warn] End of PID - 12272
[Wed Feb 23 15:32:53 2005] [warn] Start: PID - 12272
[Wed Feb 23 15:32:53 2005] [warn] End of PID - 12272
[Wed Feb 23 15:32:56 2005] [warn] Start: PID - 12272
[Wed Feb 23 15:32:56 2005] [warn] End of PID - 12272

Ming Jun
Feb. 23



---------------------------------
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
美女明星应有尽有,搜遍美图、艳图和酷图
1G就是1000兆,雅虎电邮自助扩容!

Reply via email to