Re: boot_IO error

2001-07-11 Thread Jens-Uwe Mager

On Tue, Jul 10, 2001 at 09:34:18PM -0500, Matt Glosson wrote:
 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.)
 

Well, I repeat a post from me in April here:

There have been quite a few problems getting modperl and assorted
sub-modules to work since the change that httpd uses the AIX native
dlopen under AIX 4.3 and above. In particular this conflicts with perl,
as this still uses the dlopen emulation code. Older AIX versions where
both httpd and perl use the dlopen layer are not affected.
 
I have put together a patch to Apache, perl and modperl that also turns
on runtime linking (-brtl), which makes the AIX dynamic loading behave
more like the ELF style dynamic linking. In particular this fixes
problems with modules like Apache::Request and HTML::Embperl that need
to reference symbols from both httpd and modperl with modperl either
linked statically into httpd or as DSO.
 
Perl after this patch also uses the AIX native dlopen, thus if you need
binary compatibility to older compiled perl modules do not use this
patch. The dlopen emulation code used deferred imports which the native
dlopen does not handle.
 
The patch is in three parts and can be found at:
 
http://www.han.de/~jum/aix/
 
download the following files:   
 
apache_1.3.19.rtl.patch
modperl.rtl.patch
perl-5.6.1.dlopen.patch

The apache_1.3.19.rtl.patch does also apply to 1.3.20 cleanly.

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:  +49 5131 709320
FAX:+49 5131 709325
Internet:   [EMAIL PROTECTED]



boot_IO error

2001-07-10 Thread Matt Glosson

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.)

The following details the method to my madness:

# lslpp -l |grep vac
  vac.msg.en_US.C5.0.1.0  COMMITTED  C for AIX Compiler
Messages -
  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  APPLIEDC Set ++ Runtime for AIX
4.3
  xlC.cpp4.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.rte4.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) 8083lwz   r4,0x0(r3)



Thinking it might be IBM HTTP Server implimentation, 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.

This is what my perl -V looks like:
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=aix, osvers=4.3.3.0, archname=aix
uname='aix funny 3 4 01716600 '
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=16384'
ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384'
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 ='-s'
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW -lC_r
libc=/lib/libc.a, 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'


Characteristics of this binary (from libperl):
  Built under aix
  Compiled at Aug 14 1999 08:59:55
  @INC:
/usr/opt/perl5/lib/5.00503/aix
/usr/opt/perl5/lib/5.00503
/usr/opt/perl5/lib/site_perl/5.005/aix
/usr/opt/perl5/lib/site_perl/5.005

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

Thanks,
Matt Glosson