You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jan Theofel <th...@etes.de> on 2002/11/25 17:46:50 UTC

segmentation fault using a startup file

Hello,

I have another problem using Perl::PerlRun with a startup file in
apache. The line added to the apache configuration file was:

PerlRequire /home/www/[...]/shop/engine/apachestartup.pl

(Re)starting apache results in the following segmentation fault:
--- snip ---
mailgate:/home/www/[...]/shop/engine # /etc/init.d/apache start
Starting httpd [ Mailman PERL PHP4 Nagios ]/etc/init.d/apache: line 202:
14959 Segmentation fault      $HTTPD_BIN $INET6 -t -f
/etc/httpd/httpd.conf $MODULES >/var/log/httpd/rcapache.log 2>&1


Syntax
OK                                                                                                                                            failed
mailgate:/home/www/[...]/shop/engine #
--- snap ---

In the startup file I just load some libraries as my book tells me that
the time to run the scripts will be shorter this way. (Later I want to
add Apache::DBI for a persistante database connection.)

As soon as I remove the comment one of the modules which have a # at
their line, I get the segmantation fault. (All modules named eq* are my
own modules for that shop.)

--- snip ---
#!/usr/bin/perl -w

  $ENV{MOD_PERL} or die "ERROR: not running under mod_perl.\n";

  use lib "/home/www/[...]/shop/engine/";
  use strict;

  # use these Perl modules
  use Apache::PerlRun;
#  use Apache::DBI;
  use CGI;
  use URI::Escape;
  use File::Basename;
  use Digest::MD5;
  use IO::Scalar;
  use XML::Parser;
  use Storable;
  use XML::Simple;
  use XML::Writer;
  use Crypt::GeneratePassword;
  use MIME::QuotedPrint;
  use Mail::Sendmail;
  use Text::Iconv;

  # use these own Perl modules
  use eqcore;
#  use eqtools;
#  use eqdbtools;
#  use eqdebug;
#  use eqtemplate;
#  use pago;

  return 1;
--- snap ---

Here are the versions of the installed software:

# rpm -q apache
apache-1.3.23-142
# rpm -q mod_perl
mod_perl-1.26-347
# rpm -q perl
perl-5.6.1-159

(Perl 5.6.x is needed for some other modules which have nothing to do
with this shop.)

Thanks,
Jan

-- 
Jan Theofel                              Fon: +49 (7 11) 48 90 83 - 0 
ETES - EDV-Systemhaus GbR                Fax: +49 (7 11) 48 90 83 - 50 
Libanonstrasse 58 A * D-70184 Stuttgart  Web: http://www.etes.de


______________________________________
Inflex - eMail Scanning and Protection
Queries to: postmaster@etes.de

Re: segmentation fault using a startup file

Posted by Stas Bekman <st...@stason.org>.
Ged Haywood wrote:
> On 27 Nov 2002, Jan Theofel wrote:

>>Especially because we use SuSE Linux Enterprise Server which is a
>>hihgly integrated system and we would loose the benefits of this
>>system when we compile apache on our own.
> 
> 
> I don't understand that at all.  Can somebody help me out here?

Sure. Many (linux|other) systems nowadays rely on Apache and Perl to do 
the UI to the system. Therefore they sometimes (always?) patch or change 
these tools to do what they want them to do. And when you want to add 
your own things collisions might happen.

Therefore if you want to keep the system intact, build your own Apache 
and your own Perl in a different directory. You especially want this if 
you are a developer that need to make sure that the product works with 
various versions.

e.g. I have:

% ls  ~/perl/
5.005_03  5.6.0  5.6.0-ithread  5.6.1  5.6.1-ithread  5.8.0 
5.8.0-ithread  blead  blead-ithread

% ls ~/httpd/
1.3  2.0  prefork  prefork-apreq  threaded  worker

Of course you probably don't need them all, but you get the idea.

the only caveat of installing your own Apache is that you can't use port 
80, if the system's Apache uses it. A simple rewrite rule solves this 
problem.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: segmentation fault using a startup file

Posted by "Ken Y. Clark" <kc...@logsoft.com>.
On Wed, 27 Nov 2002, Ged Haywood wrote:

> Date: Wed, 27 Nov 2002 20:56:01 +0000 (GMT)
> From: Ged Haywood <ge...@www2.jubileegroup.co.uk>
> To: Jan Theofel <th...@etes.de>
> Cc: mod_perl mailinglist <mo...@perl.apache.org>
> Subject: Re: segmentation fault using a startup file
>
> Hi Jan,
>
> On 27 Nov 2002, Jan Theofel wrote:
>
> > Am Mit, 2002-11-27 um 17.33 schrieb Ged Haywood:
> > >
> > > What is it about compiling your own Apache that troubles you?
> >
> > It is a lot of work to do.
>
> Only the first couple of times.  Takes me about two minutes nowadays.

I agree.  The first few times I compiles anything on Unix, I thought
"Wow, this is hard."  Now I understand how things fit together and why
it's a Good Thing to compile your own stuff.  I feel dirty now when I
use RPMs of Perl, Apache, or vi.

> > Especially because we use SuSE Linux Enterprise Server which is a
> > hihgly integrated system and we would loose the benefits of this
> > system when we compile apache on our own.
>
> I don't understand that at all.  Can somebody help me out here?

A few months ago I tried out some different Linux distros.  I liked
Debian a lot until I got this wierd feeling about system dependencies
on their own Perl.  I ditched it within hours of that as I felt that
it might prove easy to break the system.  If you feel that you can't
compile your own Apache on SuSE, you should probably consider a
different distro for your web server and rely on those other nice bits
on systems where you can do without the flexibility of compiling your
own stuff.  What will you do when the next security hole is found in
Apache and you can't upgrade for fear of breaking your system?

ky

Re: segmentation fault using a startup file

Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi Jan,

On 27 Nov 2002, Jan Theofel wrote:

> Am Mit, 2002-11-27 um 17.33 schrieb Ged Haywood:
> > 
> > What is it about compiling your own Apache that troubles you?
> 
> It is a lot of work to do.

Only the first couple of times.  Takes me about two minutes nowadays.

> Especially because we use SuSE Linux Enterprise Server which is a
> hihgly integrated system and we would loose the benefits of this
> system when we compile apache on our own.

I don't understand that at all.  Can somebody help me out here?

73,
Ged.


Re: segmentation fault using a startup file

Posted by Jan Theofel <th...@etes.de>.
Hello,

Am Mit, 2002-11-27 um 17.33 schrieb Ged Haywood:
> 
> On 27 Nov 2002, Jan Theofel wrote:
> 
> > Am Mon, 2002-11-25 um 17.46 schrieb Jan Theofel:
> > > 
> > > (Re)starting apache results in the following segmentation fault:
> > 
> > The problem with this segmentation fault is XML::Simple
> > [snip]
> > All I could find is that you can either:
> > 1. Compile your own apache
> > [snip]
> 
> What is it about compiling your own Apache that troubles you?

It is a lot of work to do. Especially because we use SuSE Linux
Enterprise Server which is a hihgly integrated system and we would loose
the benefits of this system when we compile apache on our own.

Jan

-- 
Jan Theofel                              Fon: +49 (7 11) 48 90 83 - 0 
ETES - EDV-Systemhaus GbR                Fax: +49 (7 11) 48 90 83 - 50 
Libanonstrasse 58 A * D-70184 Stuttgart  Web: http://www.etes.de


______________________________________
Inflex - eMail Scanning and Protection
Queries to: postmaster@etes.de

Re: segmentation fault using a startup file

Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi there,

On 27 Nov 2002, Jan Theofel wrote:

> Am Mon, 2002-11-25 um 17.46 schrieb Jan Theofel:
> > 
> > (Re)starting apache results in the following segmentation fault:
> 
> The problem with this segmentation fault is XML::Simple
> [snip]
> All I could find is that you can either:
> 1. Compile your own apache
> [snip]

What is it about compiling your own Apache that troubles you?

73,
Ged.


Re: segmentation fault using a startup file

Posted by Jan Theofel <th...@etes.de>.
Hello,

Am Mon, 2002-11-25 um 17.46 schrieb Jan Theofel:
> 
> (Re)starting apache results in the following segmentation fault:

The problem with this segmentation fault is XML::Simple which I use
togeather with mod_perl. This seems to be a knowen problem but without a
known solution.

All I could find is that you can either:
1. Compile your own apache
2. Use another XML parser perl module

Is someone here with another solution?

Thanks,
Jan

-- 
Jan Theofel                              Fon: +49 (7 11) 48 90 83 - 0 
ETES - EDV-Systemhaus GbR                Fax: +49 (7 11) 48 90 83 - 50 
Libanonstrasse 58 A * D-70184 Stuttgart  Web: http://www.etes.de


______________________________________
Inflex - eMail Scanning and Protection
Queries to: postmaster@etes.de

RE: segmentation fault using a startup file

Posted by "Beau E. Cox" <be...@beaucox.com>.
Yeah, Randy, I second the motion.
We know that DBI 1.28 does _NOT_ work!

Aloha => Beau.

-----Original Message-----
From: Randy Kobes [mailto:randy@theoryx5.uwinnipeg.ca]
Sent: Monday, November 25, 2002 7:34 AM
To: Jan Theofel
Cc: mod_perl mailinglist
Subject: Re: segmentation fault using a startup file


On 25 Nov 2002, Jan Theofel wrote:

> Hello,
> 
> I have another problem using Perl::PerlRun with a startup file in
> apache. The line added to the apache configuration file was:
> 
> PerlRequire /home/www/[...]/shop/engine/apachestartup.pl
> 
> (Re)starting apache results in the following segmentation fault:
[ .. ] 
> As soon as I remove the comment one of the modules which have a # at
> their line, I get the segmantation fault. (All modules named eq* are my
> own modules for that shop.)
> 
> --- snip ---
> #!/usr/bin/perl -w
> 
>   $ENV{MOD_PERL} or die "ERROR: not running under mod_perl.\n";
> 
>   use lib "/home/www/[...]/shop/engine/";
>   use strict;
> 
>   # use these Perl modules
>   use Apache::PerlRun;
> #  use Apache::DBI;

Do you have the latest DBI (1.30), and also the latest
appropriate DBD::* driver? If not, try upgrading to see if that
helps.

-- 
best regards,
randy kobes




Re: segmentation fault using a startup file

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On 25 Nov 2002, Jan Theofel wrote:

> Hello,
> 
> I have another problem using Perl::PerlRun with a startup file in
> apache. The line added to the apache configuration file was:
> 
> PerlRequire /home/www/[...]/shop/engine/apachestartup.pl
> 
> (Re)starting apache results in the following segmentation fault:
[ .. ] 
> As soon as I remove the comment one of the modules which have a # at
> their line, I get the segmantation fault. (All modules named eq* are my
> own modules for that shop.)
> 
> --- snip ---
> #!/usr/bin/perl -w
> 
>   $ENV{MOD_PERL} or die "ERROR: not running under mod_perl.\n";
> 
>   use lib "/home/www/[...]/shop/engine/";
>   use strict;
> 
>   # use these Perl modules
>   use Apache::PerlRun;
> #  use Apache::DBI;

Do you have the latest DBI (1.30), and also the latest
appropriate DBD::* driver? If not, try upgrading to see if that
helps.

-- 
best regards,
randy kobes