Matt Williamson | 4 Sep 2007 22:12

seg faults when running modperl and GD::Graph

I noticed that my server is segfaulting when I run a script using
GD::Graph

e.g.

[Fri Aug 31 09:26:14 2007] [notice] child pid 6385 exit signal
Segmentation fault (11)
[Fri Aug 31 09:26:18 2007] [notice] child pid 6386 exit signal
Segmentation fault (11)
[Fri Aug 31 09:26:23 2007] [notice] child pid 6387 exit signal
Segmentation fault (11)
[Fri Aug 31 09:30:06 2007] [notice] child pid 6394 exit signal
Segmentation fault (11)
[Fri Aug 31 09:30:52 2007] [notice] child pid 6462 exit signal
Segmentation fault (11)
[Fri Aug 31 09:31:01 2007] [notice] child pid 6448 exit signal
Segmentation fault (11)
[Fri Aug 31 09:31:06 2007] [notice] child pid 6463 exit signal
Segmentation fault (11)

I am running an ex-cgi script under ModPerl::Registry

<Location /perl>
     SetHandler perl-script
     PerlResponseHandler ModPerl::Registry
     Options +ExecCGI
     PerlOptions +ParseHeaders
</Location>

I have read some other places on the web about seg faults, suggesting
(Continue reading)

Rafael Caceres | 4 Sep 2007 22:37
Picon

Re: seg faults when running modperl and GD::Graph

If you have PHP (with mod_php) enabled on that server, that's the
culprit and it can be fixed by compiling PHP without GD support.

On Tue, 2007-09-04 at 13:12 -0700, Matt Williamson wrote:
> I noticed that my server is segfaulting when I run a script using
> GD::Graph
> 
> e.g.
> 
> [Fri Aug 31 09:26:14 2007] [notice] child pid 6385 exit signal
> Segmentation fault (11)
> [Fri Aug 31 09:26:18 2007] [notice] child pid 6386 exit signal
> Segmentation fault (11)
> [Fri Aug 31 09:26:23 2007] [notice] child pid 6387 exit signal
> Segmentation fault (11)
> [Fri Aug 31 09:30:06 2007] [notice] child pid 6394 exit signal
> Segmentation fault (11)
> [Fri Aug 31 09:30:52 2007] [notice] child pid 6462 exit signal
> Segmentation fault (11)
> [Fri Aug 31 09:31:01 2007] [notice] child pid 6448 exit signal
> Segmentation fault (11)
> [Fri Aug 31 09:31:06 2007] [notice] child pid 6463 exit signal
> Segmentation fault (11)
> 
> I am running an ex-cgi script under ModPerl::Registry
> 
> <Location /perl>
>      SetHandler perl-script
>      PerlResponseHandler ModPerl::Registry
>      Options +ExecCGI
(Continue reading)

Matt Williamson | 4 Sep 2007 23:06

RE: seg faults when running modperl and GD::Graph

Ok, thanks.

I am not so familiar with php. I have 

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

And
<IfModule mod_php5.c>
  AddType application/x-httpd-php .php .phtml .php3
  AddType application/x-httpd-php-source .phps
</IfModule>

So I guess I have mod_php5.

Do I have to recompile, or do you think I might find a php without GD as
a pre-compiled ubuntu package?

I actually don't think I need php on this system, would removing it have
the same effect?

Matt

> -----Original Message-----
> From: Rafael Caceres [mailto:rcaceres <at> aasa.com.pe]
> Sent: Tuesday, September 04, 2007 1:38 PM
> To: Matt Williamson
> Cc: modperl <at> perl.apache.org
> Subject: Re: seg faults when running modperl and GD::Graph
> 
> If you have PHP (with mod_php) enabled on that server, that's the
(Continue reading)

Matt Williamson | 5 Sep 2007 06:47

RE: seg faults when running modperl and GD::Graph

I don't think it can be php.

I disabled php on the server, and I still get the seg faults

[Tue Sep 04 21:45:19 2007] [notice] Apache/2.0.55 (Ubuntu)
mod_perl/2.0.2 Perl/v5.8.7 configured -- resuming normal operations

[Tue Sep 04 21:45:29 2007] [notice] child pid 18466 exit signal
Segmentation fault (11)
[Tue Sep 04 21:45:30 2007] [notice] child pid 18467 exit signal
Segmentation fault (11)
[Tue Sep 04 21:45:32 2007] [notice] child pid 18468 exit signal
Segmentation fault (11)

Any other ideas?

Matt

> -----Original Message-----
> From: Rafael Caceres [mailto:rcaceres <at> aasa.com.pe]
> Sent: Tuesday, September 04, 2007 1:38 PM
> To: Matt Williamson
> Cc: modperl <at> perl.apache.org
> Subject: Re: seg faults when running modperl and GD::Graph
> 
> If you have PHP (with mod_php) enabled on that server, that's the
> culprit and it can be fixed by compiling PHP without GD support.
> 
> On Tue, 2007-09-04 at 13:12 -0700, Matt Williamson wrote:
> > I noticed that my server is segfaulting when I run a script using
(Continue reading)

Manoj Bist | 5 Sep 2007 07:13
Picon

Re: seg faults when running modperl and GD::Graph

One option would to be run apache under single threaded mode(option
-X) under gdb  and see where it is crashing.  Once you identify the
.so where it is crashing, you can try reproducing the crash outside
apache context.

If you suspect it to be a memory corruption issue you can try running
apache under valgrind.

On 9/4/07, Matt Williamson <matt <at> sanasecurity.com> wrote:
> I don't think it can be php.
>
> I disabled php on the server, and I still get the seg faults
>
> [Tue Sep 04 21:45:19 2007] [notice] Apache/2.0.55 (Ubuntu)
> mod_perl/2.0.2 Perl/v5.8.7 configured -- resuming normal operations
>
>
> [Tue Sep 04 21:45:29 2007] [notice] child pid 18466 exit signal
> Segmentation fault (11)
> [Tue Sep 04 21:45:30 2007] [notice] child pid 18467 exit signal
> Segmentation fault (11)
> [Tue Sep 04 21:45:32 2007] [notice] child pid 18468 exit signal
> Segmentation fault (11)
>
> Any other ideas?
>
> Matt
>
>
>
(Continue reading)

William A. Rowe, Jr. | 5 Sep 2007 08:59

Re: seg faults when running modperl and GD::Graph

Manoj Bist wrote:
> One option would to be run apache under single threaded mode(option
> -X) under gdb  and see where it is crashing.  Once you identify the
> .so where it is crashing, you can try reproducing the crash outside
> apache context.

See also http://httpd.apache.org/dev/debugging.html

Briggs, Chris | 5 Sep 2007 09:36

Error running mod_perl on Apache within FreeBSD jail


I am running Apache 1.3 in a FreeBSD jail which works as expected. 

Next I added in mod_perl 1.0 by installing, adding the entry to the
httpd.conf file to load dynamically and copy across the libraries to the
jail. 

I also copied the usr/bin/perl file and the directories under perl5 to
the jail, however apache will no longer start as it is displaying an
error as follows: 

Can't open perl script "/dev/null": Operation not supported 

I have tried removing and recreating the /dev/null device in the jail,
(as it was already there and working for the standard Apache install)
but to no avail. Any ideas as to what to try next - is anyone else using
Apache/Perl in a FreeBSD jail, I want to make the server secure as it
will be storing confidential data, however, perhaps there is a better
way.

Thank you in advance for any help

Chris

Important: Fidelity Investments International (Reg. No.1448245),
Fidelity Investment Services Limited (Reg. No. 2016555), Fidelity
Pensions Management (Reg. No. 2015142) and Financial Administration
Services Limited (Reg. No. 1629709, a Fidelity Group company) are all
registered in England and Wales, are authorised and regulated in the UK
by the Financial Services Authority and have their registered offices at
(Continue reading)

Robert Landrum | 5 Sep 2007 16:51

[mp1] Eval in Mason causes segfault

I've run into a strange error recently and wanted to see if anyone else 
had come across this.

Basically, I have have a set of database handles created as globals in 
the HTML::Mason::Commands namespace.  To use these, we assign them to an 
object. i.e.:

my $obj = new Foo;
$obj->{my_dbh} = $my_dbh;
...

Sometimes a mason component will need to make use of more than one of 
these exported global database handles.  To achieve this, I did the 
following...

for my $dbhname (qw(some other handles)) {
   eval "\$obj->{${dbhname}_dbh} = \$${dbhname}_dbh;";
}

In essence:
   $obj->{some_dbh} = $some_dbh;
   $obj->{other_dbh} = $other_dbh;
   $obj->{handles_dbh} = $handles_dbh;

Randomly this will throw a segfault.

Just for kicks, I tried:

for my $dbhname (qw(some other handles)) {
   eval "\$obj->{${dbhname}_dbh} = 
(Continue reading)

Rafael Caceres | 5 Sep 2007 17:07
Picon

RE: seg faults when running modperl and GD::Graph

Matt,
I had the problem with PHP4, but you can do a quick test commenting the
LoadModule php5_module line on your httpd.conf file and testing before
going full course. If that prevents the crash, then my guess is you'll
have to build PHP5 yourself.

Rafael
On Tue, 2007-09-04 at 14:06 -0700, Matt Williamson wrote:
> Ok, thanks.
> 
> I am not so familiar with php. I have 
> 
> LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
> 
> And
> <IfModule mod_php5.c>
>   AddType application/x-httpd-php .php .phtml .php3
>   AddType application/x-httpd-php-source .phps
> </IfModule>
> 
> So I guess I have mod_php5.
> 
> Do I have to recompile, or do you think I might find a php without GD as
> a pre-compiled ubuntu package?
> 
> I actually don't think I need php on this system, would removing it have
> the same effect?
> 
> Matt
> 
(Continue reading)

Aaron Dalton | 5 Sep 2007 17:19
Picon
Favicon

Basic Auth

I have done some Googling, but can't seem to find an answer to what
appears to me to be a pretty straightforward question.  I am running
Apache 2.2.4 with SSL and mod_perl.  I have a virtual host protected by
Basic Auth.  That host is managed by a home-rolled, mod_perl handler.  I
want my handler to have access to the username provided when the user
authenticated.  I thought what I wanted was $r->get_remote_logname(),
but that's not working.  How do I obtain this information?

Thank you for your time and patience.
--

-- 
Aaron Dalton       |   Super Duper Games
aaron <at> daltons.ca   |   http://superdupergames.org
Attachment (smime.p7s): application/x-pkcs7-signature, 5510 bytes

Gmane