Hello. I've searched the internet and found many things relating to this,
but I thought I would present my own specific problem. I'm trying to
install mod_perl with IBM HTTP Server (which is really just apache 1.3.12)
on AIX 4.3.3.

Everything installs fine, but when I tried to use Net::LDAP, apache
segfaults. When I analyze the core file, I'm told that boot_IO is where
the problem occurred. Has anyone conquered this problem? The mod_perl
readme says that if you are installing on AIX with perl 5.00503 you have
to apply a patch to prevent segfaulting when an XS module is called. I
applied it and re-compiled.

I also tried using perl 5.6.1, which yielded the same results. I've traced
it down to the 'use IO::Handle;' clause. I'm using the VisualAge C (vac)
compiler to compile everything (gcc hasn't worked very well for most
things on this platform.)

All things in this message that don't work in mod_perl work fine if
they're not run from apache under mod_perl.

The following details the method to my madness:

# lslpp -l |grep vac
  vac.msg.en_US.C            5.0.1.0  COMMITTED  C for AIX Compiler
  vacpp.cmp.rte              4.0.2.0  COMMITTED  VisualAge C++ Compiler
  vac.C                      5.0.1.0  COMMITTED  C for AIX Compiler
# lslpp -l |grep xlC
  xlC.aix43.rte              4.0.2.2  APPLIED    C Set ++ Runtime for AIX
  xlC.cpp                    4.3.0.1  COMMITTED  C for AIX Preprocessor
  xlC.msg.en_US.cpp          4.3.0.1  COMMITTED  C for AIX Preprocessor
  xlC.msg.en_US.rte          4.0.2.0  COMMITTED  C Set ++ Runtime
  xlC.rte                    4.0.2.0  COMMITTED  C Set ++ Runtime

<installed the mod_perl patch on perl_5.00503/ext/DynaLoader/dl_aix.xs>

# cd /usr/build/perl_5.00503
# ./Configure -de
# make
# make install

# perl -MCPAN -e shell;
(answer configuration questions...)

cpan> install HTML::HeadParser
cpan> install LWP::UserAgent

# cd /usr/build/mod_perl-1.25
# perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/HTTPServer/bin/apxs \
  EVERYTHING=1
# make
# make install

# cd /usr/HTTPServer/bin
# ./apachectl configtest
Syntax OK

At this point, lots of perl scripts will run fine under mod_perl, until
one of them calls 'use IO::Handle;' ... then:

# ./apachectl configtest
./apachectl[145]: 19372 Segmentation fault(coredump)

Now I analyze the core file to find out what is causing the dump..
surprise!

# dbx /usr/HTTPServer/bin/httpd core
Type 'help' for help.
reading symbolic information ...warning: no source compiled with -g

[using memory image in core]

Segmentation fault in boot_IO at 0xd178d39c ($t1)
0xd178d39c (boot_IO+0xc) 80830000        lwz   r4,0x0(r3)

----------------------------------------------------

Thinking it might be IBM HTTP Server implementation, I built apache from
source with the following method (I did this with Apache 1.3.12 and Apache
1.3.20):

# cd /usr/build/apache_1.3.12
# ./configure --enable-module=so \
              --enable-module=proxy \
              --enable-shared=proxy \
              --prefix=/usr/local/apache
# make
# make install

Then I repeated the mod_perl installation. Same darn segfault.

Does anyone have any insight into this? It's becoming a very painful
battle.

If you're curious, here's my output from perl -V:

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=aix, osvers=4.3.3.0, archname=aix
    uname='aix proxysvr 3 4 0025507c4c00 '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=
    cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192
-I/usr/local/include'
    ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192
-I/usr/local/include'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lnsl -lgdbm -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW
    libc=, so=a, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-bE:perl.exp'
    cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp
-bE:$(BASEEXT).exp -b noentry -lc -L/usr/local/
lib'


Characteristics of this binary (from libperl):
  Built under aix
  Compiled at Jul  8 2001 23:40:44
  @INC:
    /usr/local/lib/perl5/5.00503/aix
    /usr/local/lib/perl5/5.00503
    /usr/local/lib/perl5/site_perl/5.005/aix
    /usr/local/lib/perl5/site_perl/5.005

Thanks for your time,
Matt

Reply via email to