Re: segfault with mod_perl, Oraperl, XML::Parser

2001-08-03 Thread Scott Kister

Thanks everyone for their help, I tried all the suggestions with no
luck, and I definitely configured Apache without expat. I finally
ended up parsing the XML in perl instead of using Expat. Since I
already had handlers, it was quite easy, although still needs better
validation and error handling.

When I get a chance I'll see if this works on mod_perl 2.0. If anyone
does get this to work on Solaris 2.8 x86, please let me know.

Thanks, Scott

#!./perl
use DBD::Oracle;
use XML::Parser::Expat;
my $parser = new XML::Parser::Expat;
$parser-parse('foo id=me here emwe/em go /foo');

# perl-5.6.1
# mod_perl-1.26
# apache 1.3.20
# expat-1.95.1
# DBD-Oracle-1.06
# DBI-1.15
# XML-Parser-2.30

# config_args='-Dcc=gcc -Ubincompat5005 -Uuselargefiles -Uusemymalloc -des'

On Tue, July 31 16:37 +0100, Tim Bunce wrote:
 On Mon, Jul 30, 2001 at 03:30:48PM -0400, Philip Mak wrote:
  On Mon, 30 Jul 2001, Scott Kister wrote:
  
   uselargefiles=define
  
  Have you tried turning off uselargefiles?
  
  I might be off track here, but recently I tried to install mod_perl on
  Solaris 5.8. It kept segfaulting until I turned off uselargefiles and
  binary compatibility with 5.00503. You could try recompiling perl with
  this configure line, then recompiling mod_perl and see what happens:
  
  sh Configure -des -Dcc=gcc -Ubincompat5005 -Uuselargefiles
 
 And   -Uusemymalloc
 
 (or something like that) to get perl to use the system's own malloc.
 
 Tim.



Re: segfault with mod_perl, Oraperl, XML::Parser

2001-08-03 Thread Matt Sergeant

On 03 Aug 2001 10:26:37 -0700, Scott Kister wrote:
 Thanks everyone for their help, I tried all the suggestions with no
 luck, and I definitely configured Apache without expat. I finally
 ended up parsing the XML in perl instead of using Expat. Since I
 already had handlers, it was quite easy, although still needs better
 validation and error handling.

Try XML::LibXML.

--
Matt/

/||** Founder and CTO  **  **   http://axkit.com/ **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
 \\//
 //\\
//  \\




Re: segfault with mod_perl, Oraperl, XML::Parser

2001-08-01 Thread Tim Bunce

On Mon, Jul 30, 2001 at 03:30:48PM -0400, Philip Mak wrote:
 On Mon, 30 Jul 2001, Scott Kister wrote:
 
  uselargefiles=define
 
 Have you tried turning off uselargefiles?
 
 I might be off track here, but recently I tried to install mod_perl on
 Solaris 5.8. It kept segfaulting until I turned off uselargefiles and
 binary compatibility with 5.00503. You could try recompiling perl with
 this configure line, then recompiling mod_perl and see what happens:
 
 sh Configure -des -Dcc=gcc -Ubincompat5005 -Uuselargefiles

And -Uusemymalloc

(or something like that) to get perl to use the system's own malloc.

Tim.



Re: segfault with mod_perl, Oraperl, XML::Parser

2001-07-30 Thread Scott Kister

I've been looking into this some more without much progress. Is anyone
on this list successfully using modperl, DBD::Oracle, and XML::Parser
on Solaris 2.8 x86?

Are there any known symbol conflicts with Oracle's libclntsh.so and
Expat? Any good alternative perl XML Parsers to Expat?

Thanks, Scott

On Sun, July 22 13:30 -0700, Scott Kister wrote:
 
 This program core dumps when run under mod_perl on Solaris 2.8 x86.
 
 #!./perl
 use Oraperl;  # use DBD::Oracle; fails as well
 use XML::Parser;
 my $parser = new XML::Parser;
 $parser-parsestring(''); # fails with valid xml here as well
 
 It runs fine on Linux and Sparc Solaris. It also works fine from the
 command line, or if I remove the use Oraperl line. I'm using the
 following releases. I had the same problem under apache 1.3.19 and
 mod_perl-1.25, and with perl compiled with and without usemymalloc.
 I also tried Apache with mod_perl as a DSO and statically linked.
 
 apache 1.3.20
 expat-1.95.1
 mod_perl-1.26
 perl-5.6.1
 DBD-Oracle-1.06
 DBI-1.15
 XML-Parser-2.30
 
 I searched the web and found a known problem with symbol conflict with
 apache's expat, but I have --disable-rule=EXPAT. I also saw a
 recommendation to use XML-Parser-2.29, which I tried with no success.
 Has anyone here seen this problem or have ideas on how to solve it?
 
 The gdb backtrace:
 (gdb) bt
 #0  0xdefd3f98 in ?? ()
 #1  0xdfbd7da9 in ?? ()
 #2  0xdfbdeee2 in ?? ()
 #3  0xdfbd31a9 in ?? ()
 #4  0xdf78c6d1 in Perl_pp_entersub ()
from /server/local/apache/libexec/libperl.so
 #5  0xdf786f92 in Perl_runops_standard ()
from /server/local/apache/libexec/libperl.so
 #6  0xdf7484d6 in S_call_body () from /server/local/apache/libexec/libperl.so
 #7  0xdf74829a in Perl_call_sv () from /server/local/apache/libexec/libperl.so
 #8  0xdf729676 in perl_call_handler ()
from /server/local/apache/libexec/libperl.so
 #9  0xdf728ef4 in perl_run_stacked_handlers ()
from /server/local/apache/libexec/libperl.so
 #10 0xdf727734 in perl_handler () from /server/local/apache/libexec/libperl.so
 #11 0x80739a5 in ap_invoke_handler ()
 #12 0x8088398 in process_request_internal ()
 #13 0x8088402 in ap_process_request ()
 #14 0x807f2db in child_main ()
 #15 0x807f564 in make_child ()
 #16 0x807f8ec in perform_idle_server_maintenance ()
 #17 0x807fe21 in standalone_main ()
 #18 0x8080460 in main ()
 #19 0x8056adf in _start ()
 
 I turned on the nontstop debugging. The output from where it seg faults
 is as follows.
 
 entering XML::Parser::Expat::parse
  438:   my $self = shift;
  439:   my $arg = shift;
  440:   croak Parse already in progress (Expat) if $self-{_State_};
  441:   $self-{_State_} = 1;
  442:   my $parser = $self-{Parser};
  443:   my $ioref;
  444:   my $result = 0;
  446:   if (defined $arg) {
  447: if (ref($arg) and UNIVERSAL::isa($arg, 'IO::Handle')) {
  455:   eval {
  456: $ioref = *{$arg}{IO};
  456: $ioref = *{$arg}{IO};
 -- end of output, seg fault here
 
 XML/Parser.pm
 455  sub Char {
 456my $expat = shift;
 457my $text = shift;
 458my $class = ${$expat}{Pkg}::Characters;
 459my $clist = $expat-{Curlist};
 
 
 perl configure options:
  -Dprefix=/server/local -Uusemymalloc -Ubincompat5005 -des
 
 % perl -V
 Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
   Platform:
 osname=solaris, osvers=2.8, archname=i86pc-solaris
 uname='sunos x86-b 5.8 generic_108529-06 i86pc i386 i86pc '
 config_args='-Dprefix=/server/local -Uinstallusrbinperl -Ubincompat5005 -des'
 hint=recommended, useposix=true, d_sigaction=define
 usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
 useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
 use64bitint=undef use64bitall=undef uselongdouble=undef
   Compiler:
 cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64',
 optimize='-O',
 cppflags='-fno-strict-aliasing -I/usr/local/include'
 ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='solaris2.8'
 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, usemymalloc=y, prototype=define
   Linker and Libraries:
 ld='cc', ldflags =' -L/usr/local/lib '
 libpth=/usr/local/lib /usr/lib /usr/ccs/lib
 libs=-lsocket -lnsl -ldl -lm -lc
 perllibs=-lsocket -lnsl -ldl -lm -lc
 libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
   Dynamic Linking:
 dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
 cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
 
 
 Characteristics of this binary (from libperl): 
   Compile-time options: USE_LARGE_FILES
   Built under 

Re: segfault with mod_perl, Oraperl, XML::Parser

2001-07-30 Thread Philip Mak

On Mon, 30 Jul 2001, Scott Kister wrote:

 uselargefiles=define

Have you tried turning off uselargefiles?

I might be off track here, but recently I tried to install mod_perl on
Solaris 5.8. It kept segfaulting until I turned off uselargefiles and
binary compatibility with 5.00503. You could try recompiling perl with
this configure line, then recompiling mod_perl and see what happens:

sh Configure -des -Dcc=gcc -Ubincompat5005 -Uuselargefiles




segfault with mod_perl, Oraperl, XML::Parser

2001-07-22 Thread Scott Kister

apologies if this comes through twice, my first try didn't seem to
make it

This program core dumps when run under mod_perl on Solaris 2.8 x86.

#!./perl
use Oraperl;
use XML::Parser;
my $parser = new XML::Parser;
$parser-parsestring(''); # fails with valid xml here as well

It runs fine on Linux and Sparc Solaris. It also works fine from the
command line, or if I remove the use Oraperl line. I'm using the
following releases. I had the same problem under apache 1.3.19 and
mod_perl-1.25, and with perl compiled with and without usemymalloc.
I also tried Apache with mod_perl as a DSO and statically linked.

apache 1.3.20
expat-1.95.1
mod_perl-1.26
perl-5.6.1
DBD-Oracle-1.06
DBI-1.15
XML-Parser-2.30

I searched the web and found a known problem with symbol conflict with
apache's expat, but I have --disable-rule=EXPAT. I also saw a
recommendation to use XML-Parser-2.29, which I tried with no success.
Has anyone here seen this problem or have ideas on how to solve it?

The gdb backtrace:
(gdb) bt
#0  0xdefd3f98 in ?? ()
#1  0xdfbd7da9 in ?? ()
#2  0xdfbdeee2 in ?? ()
#3  0xdfbd31a9 in ?? ()
#4  0xdf78c6d1 in Perl_pp_entersub ()
   from /server/local/apache/libexec/libperl.so
#5  0xdf786f92 in Perl_runops_standard ()
   from /server/local/apache/libexec/libperl.so
#6  0xdf7484d6 in S_call_body () from /server/local/apache/libexec/libperl.so
#7  0xdf74829a in Perl_call_sv () from /server/local/apache/libexec/libperl.so
#8  0xdf729676 in perl_call_handler ()
   from /server/local/apache/libexec/libperl.so
#9  0xdf728ef4 in perl_run_stacked_handlers ()
   from /server/local/apache/libexec/libperl.so
#10 0xdf727734 in perl_handler () from /server/local/apache/libexec/libperl.so
#11 0x80739a5 in ap_invoke_handler ()
#12 0x8088398 in process_request_internal ()
#13 0x8088402 in ap_process_request ()
#14 0x807f2db in child_main ()
#15 0x807f564 in make_child ()
#16 0x807f8ec in perform_idle_server_maintenance ()
#17 0x807fe21 in standalone_main ()
#18 0x8080460 in main ()
#19 0x8056adf in _start ()

I turned on the nontstop debugging. The output from where it seg faults
is as follows.

entering XML::Parser::Expat::parse
 438: my $self = shift;
 439: my $arg = shift;
 440: croak Parse already in progress (Expat) if $self-{_State_};
 441: $self-{_State_} = 1;
 442: my $parser = $self-{Parser};
 443: my $ioref;
 444: my $result = 0;
 446: if (defined $arg) {
 447:   if (ref($arg) and UNIVERSAL::isa($arg, 'IO::Handle')) {
 455: eval {
 456:   $ioref = *{$arg}{IO};
 456:   $ioref = *{$arg}{IO};
-- end of output, seg fault here

XML/Parser.pm
455  sub Char {
456my $expat = shift;
457my $text = shift;
458my $class = ${$expat}{Pkg}::Characters;
459my $clist = $expat-{Curlist};


perl configure options:
 -Dprefix=/server/local -Uusemymalloc -Ubincompat5005 -des

% perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=solaris, osvers=2.8, archname=i86pc-solaris
uname='sunos x86-b 5.8 generic_108529-06 i86pc i386 i86pc '
config_args='-Dprefix=/server/local -Uinstallusrbinperl -Ubincompat5005 -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='solaris2.8'
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, usemymalloc=y, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Jul 20 2001 22:45:47
  @INC:
/server/local/lib/perl5/5.6.1/i86pc-solaris
/server/local/lib/perl5/5.6.1
/server/local/lib/perl5/site_perl/5.6.1/i86pc-solaris
/server/local/lib/perl5/site_perl/5.6.1
/server/local/lib/perl5/site_perl
.