You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by iansmith <ia...@sportsmogul.com> on 2002/12/18 23:48:58 UTC

mod_perl troubles with RedHat 8.0 and Perl 5.8.0

I have compiled apache_1.3.27 with mod_perl-1.27 and got no errors.
I have mod_perl as a shared module.

I can run Apache without mod_perl fine, but when I activate the
mod_perl module, it gives me this in error_log for every connection
and fails to deliver any pages at all.

[notice] child pid 27049 exit signal Segmentation fault (11)

My perl is: This is perl, v5.8.0 built for i386-linux-thread-multi

I looked over the mod_perl documentation, but can't seem to find
anything that says what works and what does not.

Do I need to compile a non-threaded version of Perl?

Thanks.

--
Ian


Re: mod_perl troubles with RedHat 8.0 and Perl 5.8.0

Posted by Aaron Johnson <so...@gina.net>.
On Wed, 2002-12-18 at 17:48, iansmith wrote:
> I have compiled apache_1.3.27 with mod_perl-1.27 and got no errors.
> I have mod_perl as a shared module.
> 
> I can run Apache without mod_perl fine, but when I activate the
> mod_perl module, it gives me this in error_log for every connection
> and fails to deliver any pages at all.
> 
> [notice] child pid 27049 exit signal Segmentation fault (11)
> 
> My perl is: This is perl, v5.8.0 built for i386-linux-thread-multi
> 
> I looked over the mod_perl documentation, but can't seem to find
> anything that says what works and what does not.
> 

I had a similar issue with a fresh install of Mandrake 9.0.
(see below for the 'perl -V output')

I Embperl (2.0b9dev5 or 2.0b8) wouldn't work without compiling my own
non-threaded version of Perl. 

For my own install of Perl I used all the default Perl compile settings
and everything went fine.

The biggest problem for me under Mandrake with self compiled version of
Perl was the MDK::Common module that drakxconf uses and along with that
Gtk-Perl.  I have yet to get them all working 100%, but my mod_perl
server is running great.  The other stuff I can work around.

I was mainly trying to get Embperl setup. My Apache::ASP sites seemed to
work fine with the default Perl.

I realize this isn't exactly like your problem, but possibly there is a
commonality of troubles with the threaded 5.8 Perl and mod_perl.

Oddly enough on a machine I upgraded from Mandrake 8.2 to 9.0 (Perl
5.6.1 to 5.8.0) everything compiled and worked.

I should also not that my Apache/mod_perl compile was done using the
Apachetoolbox utility and mod_perl was static not DSO.

Aaron Johnson

Mandrake 9 default perl -V:

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.19-2mdkenterprise,
archname=i386-linux-thread-multi
    uname='linux no.mandrakesoft.com 2.4.19-2mdkenterprise #1 smp tue
aug 13 00:17:42 cest 2002 i686 unknown unknown gnulinux '
    config_args='-des -Darchname=i386-linux -Dcc=gcc -Doptimize=-O3
-fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
-fno-strength-reduce -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr
-Dman3ext=3pm -Dcf_by=MandrakeSoft -Dmyhostname=localhost
-Dperladmin=root@localhost -Dd_dosuid -Ud_csh -Duseshrplib -Dusethreads'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro
-march=i586 -ffast-math -fno-strength-reduce',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-I/usr/include/gdbm'
    ccversion='', gccversion='3.2 (Mandrake Linux 9.0 3.2-1mdk)',
gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldl -lm -lpthread -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
    libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.2.5'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
  Built under linux
  Compiled at Sep  6 2002 23:24:44
  @INC:
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl/5.6.1
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    .


> Do I need to compile a non-threaded version of Perl?
> 
> Thanks.
> 
> --
> Ian
> 
> 
> 


Re: mod_perl troubles with RedHat 8.0 and Perl 5.8.0

Posted by Aaron Johnson <so...@gina.net>.
On Thu, 2002-12-19 at 13:12, Adam Batkin wrote:
> >>When I do an:
> >>rpm -ql perl | grep 'perldoc'
> >>
> >>I only get:
> >>/usr/share/man/man1/perldoc.1.bz2
> > 
> > 
> > I get....
> > 
> > [root@www2 root]# rpm -ql perl | grep 'perldoc'
> > /usr/bin/perldoc
> > /usr/share/man/man1/perldoc.1.gz
> > 
> > 
> 
> On Mandrake:
> urpmi perl-doc
> Which will install the package named perl-doc-5.8.0-13mdk which will 
> provide you with your missing perldoc script.
> 

Thanks for the info.  I was a bit more selective in my package install
on this go around so maybe I missed the perl-doc packages.

> It's not a bad build (or at least not for that reason). For some reason 
> a large number of modules are broken out into their own RPM packages 
> under Mandrake (and I have definitely observed the same on RedHat)...I 
> usually just use CPAN to get my modules and bypass RPM though since CPAN 
> is just damn cool.
> 

Well the fact remains for me anyway that I couldn't get Embperl 2.0b9
from CVS, which contains improvements to all for for correct operation
under Perl 5.8. to run properly under the Mandrake 9.0 Perl.  So perhaps
the issue is Embperl specific.  I have posted information to the Embperl
mailing list as well.  See the Embperl mailing list archives for more
information on the issues with 5.8.
http://www.ecos.de/~mailarc/embperl/

> (Neat fact: In the Mandrake 9.0 Contribs section there is actually an 
> RPM included for Mason 1.03)
> 
> -Adam Batkin
> 
> 
> 
> 


Re: mod_perl troubles with RedHat 8.0 and Perl 5.8.0

Posted by Adam Batkin <de...@batkin.net>.
>>When I do an:
>>rpm -ql perl | grep 'perldoc'
>>
>>I only get:
>>/usr/share/man/man1/perldoc.1.bz2
> 
> 
> I get....
> 
> [root@www2 root]# rpm -ql perl | grep 'perldoc'
> /usr/bin/perldoc
> /usr/share/man/man1/perldoc.1.gz
> 
> 

On Mandrake:
urpmi perl-doc
Which will install the package named perl-doc-5.8.0-13mdk which will 
provide you with your missing perldoc script.

It's not a bad build (or at least not for that reason). For some reason 
a large number of modules are broken out into their own RPM packages 
under Mandrake (and I have definitely observed the same on RedHat)...I 
usually just use CPAN to get my modules and bypass RPM though since CPAN 
is just damn cool.

(Neat fact: In the Mandrake 9.0 Contribs section there is actually an 
RPM included for Mason 1.03)

-Adam Batkin



Re: mod_perl troubles with RedHat 8.0 and Perl 5.8.0

Posted by iansmith <ia...@sportsmogul.com>.
On 19 Dec 2002, Aaron Johnson wrote:
> How does your perl -V differ from the Mandrake one?  The default install
> of Perl didn't have a perldoc either, I am wondering if it is a bad
> build.

Mine is....

[root@www2 root]# perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.18-11smp, archname=i386-linux-thread-multi
    uname='linux daffy.perf.redhat.com 2.4.18-11smp #1 smp thu aug 15
06:41:59 edt 2002 i686 i686 i386 gnulinux '
    config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686
-Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red
Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux
-Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads
-Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm
-Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio
-Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less
-isr'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -march=i386 -mcpu=i686',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-I/usr/include/gdbm'
    ccversion='', gccversion='3.2 20020822 (Red Hat Linux Rawhide 3.2-5)',
gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
    libc=/lib/libc-2.2.92.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.2.92'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
  Built under linux
  Compiled at Sep  1 2002 23:56:49
  @INC:
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    .


> When I do an:
> rpm -ql perl | grep 'perldoc'
>
> I only get:
> /usr/share/man/man1/perldoc.1.bz2

I get....

[root@www2 root]# rpm -ql perl | grep 'perldoc'
/usr/bin/perldoc
/usr/share/man/man1/perldoc.1.gz



Re: mod_perl troubles with RedHat 8.0 and Perl 5.8.0

Posted by Aaron Johnson <so...@gina.net>.
On Wed, 2002-12-18 at 20:30, Stas Bekman wrote:
> iansmith wrote:
> > I have compiled apache_1.3.27 with mod_perl-1.27 and got no errors.
> > I have mod_perl as a shared module.
> > 
> > I can run Apache without mod_perl fine, but when I activate the
> > mod_perl module, it gives me this in error_log for every connection
> > and fails to deliver any pages at all.
> > 
> > [notice] child pid 27049 exit signal Segmentation fault (11)
> > 
> > My perl is: This is perl, v5.8.0 built for i386-linux-thread-multi
> > 
> > I looked over the mod_perl documentation, but can't seem to find
> > anything that says what works and what does not.
> > 
> > Do I need to compile a non-threaded version of Perl?
> 
> Certainly Aaron's solution should work, but it'd be nice to figure out 
> the cause of segfaults, because a threaded 5.8 perl works just fine with 
> mod_perl for me (Mandrake 9.0). Though I built it by myself, I should 
> try using the Perl supplied by Mandrake.
> 

How does your perl -V differ from the Mandrake one?  The default install
of Perl didn't have a perldoc either, I am wondering if it is a bad
build.

When I do an:
rpm -ql perl | grep 'perldoc'

I only get:
/usr/share/man/man1/perldoc.1.bz2

I don't think it is just a thread issue.

Aaron

> Before you rebuild it, if you can get the segfault backtrace, that would 
> be great. If you don't know how, check:
> http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems
> 
> __________________________________________________________________
> 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: mod_perl troubles with RedHat 8.0 and Perl 5.8.0

Posted by Stas Bekman <st...@stason.org>.
iansmith wrote:
> On Thu, 19 Dec 2002, Stas Bekman wrote:
> 
>>Before you rebuild it, if you can get the segfault backtrace, that would
>>be great. If you don't know how, check:
>>http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems
> 
> 
> Tried to do a "make test" in the mod_perl directory and got...
> 
>    Syntax error on line 3 of mod_perl-1.27/t/conf/httpd.conf:
>    Invalid command '=pod', perhaps mis-spelled or defined by a module not
>    included in the server configuration

Usually that happens when mod_perl hasn't been compiled yet. Are you 
sure you have followed the right order of build as explained at the 
install page?

> I did a manual run with gdb and got this when it crashed...
> 
>   Starting program: /var/www-1/source/apache_1.3.27/src/httpd -X
>   [New Thread 8192 (LWP 5250)]
>   Program received signal SIGSEGV, Segmentation fault.
>   [Switching to Thread 8192 (LWP 5250)]
> 
>   #0  0x400c8dfd in perl_header_parser () from /var/www-1/libexec/libperl.so
>   #1  0x0806acdd in run_method ()
>   #2  0x0806add7 in ap_header_parse ()
>   #3  0x0807f198 in process_request_internal ()
>   #4  0x0807f552 in ap_process_request ()
>   #5  0x08076816 in child_main ()
>   #6  0x080769b6 in make_child ()
>   #7  0x08076b1d in startup_children ()
>   #8  0x0807714a in standalone_main ()
>   #9  0x08077968 in main ()
>   #10 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
> 
> Any ideas?  Thanks.

Any chance you can recompile mod_perl with DEBUG enabled and get the 
trace again, so that we can see the arguments to the faulty call?


-- 


__________________________________________________________________
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: mod_perl troubles with RedHat 8.0 and Perl 5.8.0

Posted by iansmith <ia...@sportsmogul.com>.
On Thu, 19 Dec 2002, Stas Bekman wrote:
> Before you rebuild it, if you can get the segfault backtrace, that would
> be great. If you don't know how, check:
> http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems

Tried to do a "make test" in the mod_perl directory and got...

   Syntax error on line 3 of mod_perl-1.27/t/conf/httpd.conf:
   Invalid command '=pod', perhaps mis-spelled or defined by a module not
   included in the server configuration

I did a manual run with gdb and got this when it crashed...

  Starting program: /var/www-1/source/apache_1.3.27/src/httpd -X
  [New Thread 8192 (LWP 5250)]
  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 8192 (LWP 5250)]

  #0  0x400c8dfd in perl_header_parser () from /var/www-1/libexec/libperl.so
  #1  0x0806acdd in run_method ()
  #2  0x0806add7 in ap_header_parse ()
  #3  0x0807f198 in process_request_internal ()
  #4  0x0807f552 in ap_process_request ()
  #5  0x08076816 in child_main ()
  #6  0x080769b6 in make_child ()
  #7  0x08076b1d in startup_children ()
  #8  0x0807714a in standalone_main ()
  #9  0x08077968 in main ()
  #10 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6

Any ideas?  Thanks.

--
Ian


Re: mod_perl troubles with RedHat 8.0 and Perl 5.8.0

Posted by Stas Bekman <st...@stason.org>.
iansmith wrote:
> I have compiled apache_1.3.27 with mod_perl-1.27 and got no errors.
> I have mod_perl as a shared module.
> 
> I can run Apache without mod_perl fine, but when I activate the
> mod_perl module, it gives me this in error_log for every connection
> and fails to deliver any pages at all.
> 
> [notice] child pid 27049 exit signal Segmentation fault (11)
> 
> My perl is: This is perl, v5.8.0 built for i386-linux-thread-multi
> 
> I looked over the mod_perl documentation, but can't seem to find
> anything that says what works and what does not.
> 
> Do I need to compile a non-threaded version of Perl?

Certainly Aaron's solution should work, but it'd be nice to figure out 
the cause of segfaults, because a threaded 5.8 perl works just fine with 
mod_perl for me (Mandrake 9.0). Though I built it by myself, I should 
try using the Perl supplied by Mandrake.

Before you rebuild it, if you can get the segfault backtrace, that would 
be great. If you don't know how, check:
http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems

__________________________________________________________________
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