Re: Segmentation fault (11) with mod_perl 1.23...

2000-06-01 Thread Mark Haviland

Doug MacEachern wrote:

> On Thu, 25 May 2000, Mark Haviland wrote:
> > No...I was hoping to be able to use it as a DSO, but maybe I can't win
> > on this one
>
> it would be worth testing a static build to confirm that the problem is
> dso related.  if it is, where to go from there i'm not sure, the dso
> troubles are supposed to have been ironed out.  can you send me your
> perl -V?

Finally - some free time to compile :).

I just got done compiling a static version mod_perl inside the httpd.
After modifying the config file to match my 'dynamic' httpd (ie. adding the
PerlRequire with a different config.pl file that has a 'use Sybase::CTlib;'
in it.), I fired it up and...no core dump or segmentation fault.  And, I'm
now able to successfully query my db.  So, it looks like something is wrong
with DSO and perl...the dynaloader ???  Any ideas ??

Here's my perl -V:

[root@hsimrhpc1 logs]# perl -V

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=linux, osvers=2.2.5-22smp, archname=i386-linux
uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2
09:11:51 edt 1999 i686 unknown '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='cc', optimize='-O2 -m486 -fno-strength-reduce',
gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lposix -lcrypt
libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Built under linux
  Compiled at Feb  2 2000 15:35:58
  @INC:
/usr/lib/perl5/5.00503/i386-linux
/usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux
/usr/lib/perl5/site_perl/5.005
.





Re: Segmentation fault (11) with mod_perl 1.23...

2000-05-23 Thread Doug MacEachern

On Tue, 23 May 2000, Mark Haviland wrote:

> Doug,
> 
> Sorry for the consistent eMails, but I guess I wasn't entirely correct in my
> statment about my version of perl being the problem.  After some more tests, I've
> found that things go wrong (ie. I get a Segfault) when I attempt to pre load the
> Sybase::CTlib module (or any module that uses it) in the PerlRequire file.  But,
> when I have the 'use Sybase::CTlib' inside of my handler, then everything is ok.

the next step would be to get a stacktrace (mod_perl built with
PERL_DEBUG=1 prefered), see the SUPPORT doc for hints.




Re: Segmentation fault (11) with mod_perl 1.23...

2000-05-23 Thread Mark Haviland

Doug,

Sorry for the consistent eMails, but I guess I wasn't entirely correct in my
statment about my version of perl being the problem.  After some more tests, I've
found that things go wrong (ie. I get a Segfault) when I attempt to pre load the
Sybase::CTlib module (or any module that uses it) in the PerlRequire file.  But,
when I have the 'use Sybase::CTlib' inside of my handler, then everything is ok.

Any ideas ?

-Mark

Mark Haviland wrote:

> Doug,
>
> I think I just figured out my problem.  I upgraded my system, but was using a
> version of perl that I had compiled before my upgrade (duh!).  I set up an
> httpd server that came with redhat 6.2 (and mod_perl 1.23) and things seems to
> work fine.  It looks like i need to recompile perl :).
>
> -Mark
>
> Mark Haviland wrote:
>
> > Hi Doug,
> >
> > Sorry for the delayed response - I just got back into town yesterday so was
> > 'out of action' for awhile.
> >
> > Doug MacEachern wrote:
> >
> > > On Fri, 12 May 2000, Mark Haviland wrote:
> > >
> > > > Hey all...
> > > >
> > > > I just upgraded my box to redhat 6.2.2 and compiled Apache 1.3.12 with
> > > > mod_perl (1.23) as a DSO (outside the Apache tree using apxs).  Now,
> > > > modules that use to work are suddenly causing seg faults.  The one in
> > > > particular that doens't seem to jive with mod_perl is Sybase::CTlib.
> > > > Has anybody else seen this problem ?
> > >
> > > what versions of things did you upgrade from?  where you using dso with
> > > the older versions?
> >
> > I upgraded from mod_perl 1.21.  Yes I was using dso with the prior
> > version.  Here's some info about the version of perl that I compiled
> > against:
> >
> > Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
> >   Platform:
> > osname=linux, osvers=2.2.5-15, archname=i686-linux
> > uname='linux hsimrhpc1.harmonic.com 2.2.5-15 #1 mon apr 19 23:00:46 edt
> > 1999 i686 unknown '
> > hint=previous, useposix=true, d_sigaction=define
> > usethreads=undef useperlio=undef d_sfio=undef
> >   Compiler:
> > cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
> > (egcs-1.1.2 release)
> > cppflags='-Dbool=char -DHAS_BOOL'
> > ccflags ='-Dbool=char -DHAS_BOOL'
> > stdchar='char', d_stdstdio=undef, usevfork=false
> > intsize=4, longsize=4, ptrsize=4, doublesize=8
> > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
> > alignbytes=4, usemymalloc=n, prototype=define
> >   Linker and Libraries:
> > ld='cc', ldflags =' -L/usr/local/lib'
> > libpth=/usr/local/lib /lib /usr/lib
> > libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
> > libc=, so=so, useshrplib=false, libperl=libperl.a
> >   Dynamic Linking:
> > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
> > cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
> >
> > Characteristics of this binary (from libperl):
> >   Built under linux
> >   Compiled at Oct 13 1999 10:39:19
> >   %ENV:
> > PERL5LIB="/usr/hsi/perl5/lib"
> >   @INC:
> > /usr/hsi/perl5/lib
> > /usr/hsi/perl5/lib/5.00503/i686-linux
> > /usr/hsi/perl5/lib/5.00503
> > /usr/hsi/perl5/lib/site_perl/5.005/i686-linux
> > /usr/hsi/perl5/lib/site_perl/5.005
> > .
> >
> > >
> > >
> > > > unload_xs_so: 0x8396fc0
> > >
> > > hmm, i wonder if the dso "fix" broke things for you, what happens if you
> > > comment out this line of mod_perl.c:
> > > unload_xs_so(librefs);
> >
> > I uncommented the line and now the server (httpd) just cores when I attempt
> > to start...
> >
> > /usr/hsi/apache-1.3.12/bin/hsi-httpd -X -f
> > /usr/hsi/apache-1.3.12/conf/hsi-httpd.conf.2080
> > perl_parse args: '/dev/null' ...allocating perl interpreter...ok
> > constructing perl interpreter...ok
> > ok
> > running perl interpreter...ok
> > mod_perl: 0 END blocks encountered during server startup
> > loading perl module 'Apache'...loading perl module
> > 'Apache::Constants::Exports'...ok
> > ok
> > loading perl module 'Tie::IxHash'...ok
> > perl_section: 
> > perl_section: 
> > perl_section: 
> > perl_section: 
> > perl_section: 
> > perl_section: 
> > perl_section: 
> > PerlRequire: arg=`conf/startup_cfg.pl'
> > attempting to require `conf/startup_cfg.pl'
> > Segmentation fault (core dumped)
> >
> > It seems that is cores when it reaches the line for "use  Sybase::CTlib;"
> > in my 'conf/statup_cfg.pl' file.
> >
> > Now, when I look at the CTlib.pm I notice the following:
> >
> > package Sybase::CTlib;
> >
> > require Exporter;
> > use AutoLoader;
> > require DynaLoader;
> >
> > use Carp;
> > .
> > .
> > .
> >
> > Perhaps something to do with the Exporter or DynaLoader ??
> >
> > -Mark




Re: Segmentation fault (11) with mod_perl 1.23...

2000-05-23 Thread Mark Haviland

Doug,

I think I just figured out my problem.  I upgraded my system, but was using a
version of perl that I had compiled before my upgrade (duh!).  I set up an
httpd server that came with redhat 6.2 (and mod_perl 1.23) and things seems to
work fine.  It looks like i need to recompile perl :).

-Mark

Mark Haviland wrote:

> Hi Doug,
>
> Sorry for the delayed response - I just got back into town yesterday so was
> 'out of action' for awhile.
>
> Doug MacEachern wrote:
>
> > On Fri, 12 May 2000, Mark Haviland wrote:
> >
> > > Hey all...
> > >
> > > I just upgraded my box to redhat 6.2.2 and compiled Apache 1.3.12 with
> > > mod_perl (1.23) as a DSO (outside the Apache tree using apxs).  Now,
> > > modules that use to work are suddenly causing seg faults.  The one in
> > > particular that doens't seem to jive with mod_perl is Sybase::CTlib.
> > > Has anybody else seen this problem ?
> >
> > what versions of things did you upgrade from?  where you using dso with
> > the older versions?
>
> I upgraded from mod_perl 1.21.  Yes I was using dso with the prior
> version.  Here's some info about the version of perl that I compiled
> against:
>
> Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
>   Platform:
> osname=linux, osvers=2.2.5-15, archname=i686-linux
> uname='linux hsimrhpc1.harmonic.com 2.2.5-15 #1 mon apr 19 23:00:46 edt
> 1999 i686 unknown '
> hint=previous, useposix=true, d_sigaction=define
> usethreads=undef useperlio=undef d_sfio=undef
>   Compiler:
> cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
> (egcs-1.1.2 release)
> cppflags='-Dbool=char -DHAS_BOOL'
> ccflags ='-Dbool=char -DHAS_BOOL'
> stdchar='char', d_stdstdio=undef, usevfork=false
> intsize=4, longsize=4, ptrsize=4, doublesize=8
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
> alignbytes=4, usemymalloc=n, prototype=define
>   Linker and Libraries:
> ld='cc', ldflags =' -L/usr/local/lib'
> libpth=/usr/local/lib /lib /usr/lib
> libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
> libc=, so=so, useshrplib=false, libperl=libperl.a
>   Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
> cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
>
> Characteristics of this binary (from libperl):
>   Built under linux
>   Compiled at Oct 13 1999 10:39:19
>   %ENV:
> PERL5LIB="/usr/hsi/perl5/lib"
>   @INC:
> /usr/hsi/perl5/lib
> /usr/hsi/perl5/lib/5.00503/i686-linux
> /usr/hsi/perl5/lib/5.00503
> /usr/hsi/perl5/lib/site_perl/5.005/i686-linux
> /usr/hsi/perl5/lib/site_perl/5.005
> .
>
> >
> >
> > > unload_xs_so: 0x8396fc0
> >
> > hmm, i wonder if the dso "fix" broke things for you, what happens if you
> > comment out this line of mod_perl.c:
> > unload_xs_so(librefs);
>
> I uncommented the line and now the server (httpd) just cores when I attempt
> to start...
>
> /usr/hsi/apache-1.3.12/bin/hsi-httpd -X -f
> /usr/hsi/apache-1.3.12/conf/hsi-httpd.conf.2080
> perl_parse args: '/dev/null' ...allocating perl interpreter...ok
> constructing perl interpreter...ok
> ok
> running perl interpreter...ok
> mod_perl: 0 END blocks encountered during server startup
> loading perl module 'Apache'...loading perl module
> 'Apache::Constants::Exports'...ok
> ok
> loading perl module 'Tie::IxHash'...ok
> perl_section: 
> perl_section: 
> perl_section: 
> perl_section: 
> perl_section: 
> perl_section: 
> perl_section: 
> PerlRequire: arg=`conf/startup_cfg.pl'
> attempting to require `conf/startup_cfg.pl'
> Segmentation fault (core dumped)
>
> It seems that is cores when it reaches the line for "use  Sybase::CTlib;"
> in my 'conf/statup_cfg.pl' file.
>
> Now, when I look at the CTlib.pm I notice the following:
>
> package Sybase::CTlib;
>
> require Exporter;
> use AutoLoader;
> require DynaLoader;
>
> use Carp;
> .
> .
> .
>
> Perhaps something to do with the Exporter or DynaLoader ??
>
> -Mark




Re: Segmentation fault (11) with mod_perl 1.23...

2000-05-23 Thread Mark Haviland

Hi Doug,

Sorry for the delayed response - I just got back into town yesterday so was
'out of action' for awhile.

Doug MacEachern wrote:

> On Fri, 12 May 2000, Mark Haviland wrote:
>
> > Hey all...
> >
> > I just upgraded my box to redhat 6.2.2 and compiled Apache 1.3.12 with
> > mod_perl (1.23) as a DSO (outside the Apache tree using apxs).  Now,
> > modules that use to work are suddenly causing seg faults.  The one in
> > particular that doens't seem to jive with mod_perl is Sybase::CTlib.
> > Has anybody else seen this problem ?
>
> what versions of things did you upgrade from?  where you using dso with
> the older versions?

I upgraded from mod_perl 1.21.  Yes I was using dso with the prior
version.  Here's some info about the version of perl that I compiled
against:

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=linux, osvers=2.2.5-15, archname=i686-linux
uname='linux hsimrhpc1.harmonic.com 2.2.5-15 #1 mon apr 19 23:00:46 edt
1999 i686 unknown '
hint=previous, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release)
cppflags='-Dbool=char -DHAS_BOOL'
ccflags ='-Dbool=char -DHAS_BOOL'
stdchar='char', d_stdstdio=undef, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Built under linux
  Compiled at Oct 13 1999 10:39:19
  %ENV:
PERL5LIB="/usr/hsi/perl5/lib"
  @INC:
/usr/hsi/perl5/lib
/usr/hsi/perl5/lib/5.00503/i686-linux
/usr/hsi/perl5/lib/5.00503
/usr/hsi/perl5/lib/site_perl/5.005/i686-linux
/usr/hsi/perl5/lib/site_perl/5.005
.

>
>
> > unload_xs_so: 0x8396fc0
>
> hmm, i wonder if the dso "fix" broke things for you, what happens if you
> comment out this line of mod_perl.c:
> unload_xs_so(librefs);

I uncommented the line and now the server (httpd) just cores when I attempt
to start...

/usr/hsi/apache-1.3.12/bin/hsi-httpd -X -f
/usr/hsi/apache-1.3.12/conf/hsi-httpd.conf.2080
perl_parse args: '/dev/null' ...allocating perl interpreter...ok
constructing perl interpreter...ok
ok
running perl interpreter...ok
mod_perl: 0 END blocks encountered during server startup
loading perl module 'Apache'...loading perl module
'Apache::Constants::Exports'...ok
ok
loading perl module 'Tie::IxHash'...ok
perl_section: 
perl_section: 
perl_section: 
perl_section: 
perl_section: 
perl_section: 
perl_section: 
PerlRequire: arg=`conf/startup_cfg.pl'
attempting to require `conf/startup_cfg.pl'
Segmentation fault (core dumped)

It seems that is cores when it reaches the line for "use  Sybase::CTlib;"
in my 'conf/statup_cfg.pl' file.

Now, when I look at the CTlib.pm I notice the following:

package Sybase::CTlib;

require Exporter;
use AutoLoader;
require DynaLoader;

use Carp;
.
.
.


Perhaps something to do with the Exporter or DynaLoader ??

-Mark




Re: Segmentation fault (11) with mod_perl 1.23...

2000-05-15 Thread Doug MacEachern

On Fri, 12 May 2000, Mark Haviland wrote:

> Hey all...
> 
> I just upgraded my box to redhat 6.2.2 and compiled Apache 1.3.12 with
> mod_perl (1.23) as a DSO (outside the Apache tree using apxs).  Now,
> modules that use to work are suddenly causing seg faults.  The one in
> particular that doens't seem to jive with mod_perl is Sybase::CTlib.
> Has anybody else seen this problem ?

what versions of things did you upgrade from?  where you using dso with
the older versions?

> unload_xs_so: 0x8396fc0

hmm, i wonder if the dso "fix" broke things for you, what happens if you
comment out this line of mod_perl.c:
unload_xs_so(librefs);