You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Mike Schilli <m...@perlmeister.com> on 2006/01/09 03:13:24 UTC

Apache core dumps on loading mod_perl

Hi all,

using perl-5.8.5, apache 1.3.x and mod_perl 1.29, I'm getting a core dump
when libperl.so gets loaded via LoadModule perl_module path/libperl.so.
Does the following gdb stack trace ring a bell with anyone?

  #0  0x203eeba0 in .cerror () from /usr/lib/libc.so.4
  #1  0x00000006 in ?? ()
  #2  0x402c7413 in ?? ()
  #3  0x9fbfcea0 in ?? ()
  #4  0x2062e7aa in ioctl () from /usr/lib/libc_r.so.4
  #5  0x203ee5bb in tcgetattr () from /usr/lib/libc.so.4
  #6  0x203ecb82 in isatty () from /usr/lib/libc.so.4
  #7  0x203ec23e in __smakebuf () from /usr/lib/libc.so.4
  #8  0x203dc50f in __srefill () from /usr/lib/libc.so.4
  #9  0x203dc3df in __srget () from /usr/lib/libc.so.4
  #10 0x20390434 in fgetc () from /usr/lib/libc.so.4
  #11 0x205a4312 in PerlIOStdio_read (my_perl=0x107000, f=0xcc710,
      vbuf=0x9fbfd03b, count=1) at perlio.c:2996
  #12 0x205a247e in Perl_PerlIO_read (my_perl=0x107000, f=0xcc710,
      vbuf=0x9fbfd03b, count=1) at perlio.c:1564
  #13 0x205a65fe in PerlIO_getc (f=0xcc710) at perlio.c:4771
  #14 0x2054d46c in Perl_sv_gets (my_perl=0x107000, sv=0x1228d8, fp=0xcc710,
      append=0) at sv.c:6341
  #15 0x204ecf2c in S_filter_gets (my_perl=0x107000, sv=0x1228d8, fp=0xcc710,
      append=0) at toke.c:2109
  #16 0x204ee220 in Perl_yylex (my_perl=0x107000) at toke.c:2507
  #17 0x20502987 in Perl_yyparse (my_perl=0x107000) at perly.c:1470
  #18 0x204df141 in S_parse_body (my_perl=0x107000, env=0x0,
      xsinit=0x20487210 <mod_perl_xs_init>) at perl.c:1768
  #19 0x204de0b4 in perl_parse (my_perl=0x107000,
      xsinit=0x20487210 <mod_perl_xs_init>, argc=2, argv=0x9fbff8a0, env=0x0)
      at perl.c:1272
  #20 0x2048780c in perl_startup (s=0x9ccc8, p=0x9cca0) at mod_perl.c:702
  #21 0x204871d3 in perl_module_init (s=0x9ccc8, p=0x9cca0) at mod_perl.c:569
  #22 0x0004cd73 in ap_init_modules (p=0x9cca0, s=0x9ccc8) at
http_config.c:1726
  #23 0x00056c79 in main (argc=4, argv=0x9fbff9e0) at http_main.c:6459

Any help appreciated.

-- Mike

Mike Schilli
m@perlmeister.com

Re: Apache core dumps on loading mod_perl

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Mike Schilli wrote:
> FreeBSD 4.10.

This is a well kown issue.

ITHREADS are just not going to work on the 4.x series... You'll have to 
upgrade to at least 5.3..  Likely 5.4.  I'd really recommend 
reinstalling from scratch or doing a bin upgrade as I don't think you'll 
be able to cross the 5.2.1 -> 5.3 boundrary do to signifigant changes in 
the build process internals.  Other option is to compile perl without 
ithreads.  It will be siginifigantly faster anyway.

If you straight upgrade via /usr/src, make sure you edit
/etc/libmap.conf
to link against libpthread.so instead of libc_r.so

Given this new insite, this core dump now makes sense:
  #4  0x2062e7aa in ioctl () from /usr/lib/libc_r.so.4

BOOM!

P.S.

   If you haven't guessed, I'm a FreeBSD contributor and bin fan :)

   Had I read it closer, I could have guessed you were on FreeBSD pre SMPng!

-- 
------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

"I wanna hold ya till I die ... I wanna hold ya till the fear in me 
subsides."

Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

Re: Apache core dumps on loading mod_perl

Posted by Mike Schilli <m...@perlmeister.com>.
On Sun, 8 Jan 2006, Philip M. Gollucci wrote:

> What operating system/version is this on ?

FreeBSD 4.10.

-- Mike

Mike Schilli
m@perlmeister.com

> Mike Schilli wrote:
> > Are you saying that mod_perl 1.29 requires perl to be compiled without
> > perlio? My perl needs ithreads/perlio, so that would be a problem. Here's
> > the relevant part of perl -V (sorry, can't post all of it):
> No, I was just pointing out that the coredump happened in the PerlIO
> routines..... If you need it, then I guess that plan won't work.
>
> >
> >     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
>
>
> --
> ------------------------------------------------------------------------
> "Love is not the one you can picture yourself marrying,
> but the one you can't picture the rest of your life without."
>
> "It takes a minute to have a crush on someone, an hour to like someone,
> and a day to love someone, but it takes a lifetime to forget someone..."
>
> "I wanna hold ya till I die ... I wanna hold ya till the fear in me
> subsides."
>
> Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
> Consultant / http://p6m7g8.net/Resume/resume.shtml
> Senior Software Engineer - TicketMaster - http://ticketmaster.com
> 1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F
>

Re: Apache core dumps on loading mod_perl

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Mike Schilli wrote:
> Are you saying that mod_perl 1.29 requires perl to be compiled without
> perlio? My perl needs ithreads/perlio, so that would be a problem. Here's
> the relevant part of perl -V (sorry, can't post all of it):
No, I was just pointing out that the coredump happened in the PerlIO 
routines..... If you need it, then I guess that plan won't work.

> 
>     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
What operating system/version is this on ?


-- 
------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

"I wanna hold ya till I die ... I wanna hold ya till the fear in me 
subsides."

Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

Re: Apache core dumps on loading mod_perl

Posted by Mike Schilli <m...@perlmeister.com>.
On Sun, 8 Jan 2006, Philip M. Gollucci wrote:

> Try compiling your perl without PerlIO
> Configure -Uuseperlio

Are you saying that mod_perl 1.29 requires perl to be compiled without
perlio? My perl needs ithreads/perlio, so that would be a problem. Here's
the relevant part of perl -V (sorry, can't post all of it):

    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

-- Mike

Mike Schilli
m@perlmeister.com

Re: Apache core dumps on loading mod_perl

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Mike Schilli wrote:
>   #11 0x205a4312 in PerlIOStdio_read (my_perl=0x107000, f=0xcc710,
>       vbuf=0x9fbfd03b, count=1) at perlio.c:2996
>   #12 0x205a247e in Perl_PerlIO_read (my_perl=0x107000, f=0xcc710,
>       vbuf=0x9fbfd03b, count=1) at perlio.c:1564
>   #13 0x205a65fe in PerlIO_getc (f=0xcc710) at perlio.c:4771
Try compiling your perl without PerlIO

Configure -Uuseperlio

In the future, send a perl -V

or better yet,
http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems

HTH


-- 
------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

"I wanna hold ya till I die ... I wanna hold ya till the fear in me 
subsides."

Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F