perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@cpan.org>
Subject Re: OBSD update
Date Tue, 06 May 2003 06:35:21 GMT
On Tue, 2003-05-06 at 14:19, Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> > On Tue, 2003-05-06 at 11:45, Stas Bekman wrote:
> > 
> >>Philippe M. Chiasson wrote:
> >>
> >>
> >>>Well, you did just beat me to the punch ! I have been spending the last
> >>>few days battling the OpenBSD build and was preparing to send out my
> >>>SUCCESS story.
> >>
> >>Great work, Philippe. I'll comment on the patch in a separate email.
> > 
> > 
> > Too bad you beat me to the punch ;-p
> 
> ;)
> 
> >>Unfortunately OpenBSD 2.9 still doesn't work with your patch. Here is the 
> >>segfault and how to reproduce it:
> >>
> >>LD_LIBRARY_PATH=/data/stas/perl/5.6.1/lib/5.6.1/OpenBSD.i386-openbsd/CORE:$LD_LIBRARY_PATH

> >>gdb
> > 
> > 
> > You have to set LD_LIBRARY_PATH for perl ? (let me guess, otherwise it
> > picks up the libperl.so from somewhere else)
> 
> Yup, it picks /usr/lib/perl's one.

> >>Did you have the same segfault before you managed to make it work?
> > 
> > 
> > Nope, as I showed you, I got this 100% bogus stack trace full of end()s
> > ;-( But I can try on my end. This was perl 5.6.1, anything special about
> > it? ithreads, etc ? I'll give it a shot and see if I can reproduce that.
> 
> No ithreads, on OpenBSD-2.9 both 5.8.0 and 5.6.1 fail to compile if you supply 
> -Dusethreads
> 
> I've used:
> 
> make distclean
> ./Configure -des -Dprefix=/data/stas/perl/5.6.1 \
> -Dopenbsd_distribution=false -Doptimize='-g' -Duseshrplib -Dusedevel
> make -j2
> LD_PRELOAD=`pwd`/libperl.so LD_LIBRARY_PATH=`pwd` make test
> LD_PRELOAD=`pwd`/libperl.so LD_LIBRARY_PATH=`pwd` make install
> 
> > How come it looks like your perl (or libperl.so) doesn't have debugging
> > symbols...
> 
> I was just trying to check if the debug flags could be a reason for a fault, 
> but no. Here is one with debug symbols enabled:
> 
> #0  0x4036971b in S_new_xpvhv () at sv.c:655
> #1  0x4036a2a1 in Perl_sv_upgrade (sv=0x7fe454, mt=11) at sv.c:1102
> #2  0x40357ba1 in Perl_newHV () at hv.c:1006
> #3  0x402e9524 in perl_construct (my_perl=0x39f030) at perl.c:284
> #4  0x402bf4e4 in modperl_startup (s=0x1cdd28, p=0x183018) at mod_perl.c:166
> #5  0x402c07dc in modperl_init (base_server=0x1cdd28, p=0x183018) at 
> mod_perl.c:353
> #6  0x402c0998 in modperl_hook_init (pconf=0x183018, plog=0x0, ptemp=0x0, 
> s=0x1cdd28)
>      at mod_perl.c:486
> #7  0x402c09d4 in modperl_run () at mod_perl.c:497
> #8  0x402c5032 in modperl_cmd_load_module (parms=0xdfbfda5c, mconfig=0x1d63c8,
>      arg=0x1e34e8 "TestDirective::perlloadmodule3") at modperl_cmd.c:499
> #9  0x7d7b2 in L413 () at config.c:713
> #10 0x7e4c1 in ap_walk_config_sub (current=0x1e34c8, parms=0xdfbfda5c,
>      section_vector=0x1cfbd8) at config.c:1082
> #11 0x7e545 in ap_walk_config (current=0x1d6688, parms=0xdfbfda5c, 
> section_vector=0x1cfbd8)
>      at config.c:1121
> #12 0x7f2d4 in ap_process_config_tree (s=0x1cdd28, conftree=0x1d6688, p=0x183018,
>      ptemp=0x187018) at config.c:1594
> #13 0x83066 in L67 () at main.c:638
> 

I am building perl 5.6.1 on my OpenBSD box as we speak, more on that one
later

> >>>1. On my machine, by default, the max file descriptors is set to 64, and
> >>>it's not sufficient, 128 did it.
> >>
> >>how do I change it on OpenBSD? that's the only thing that I haven't tried yet.
> > 
> > 
> > Look at /etc/login.conf
> > 
> > Mine looks like this:
> > default:\
> >         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bi /usr/local/bin:\
> >         :umask=022:\
> >         :datasize-max=256M:\
> >         :datasize-cur=64M:\
> >         :maxproc-max=128:\
> >         :maxproc-cur=64:\
> >         :openfiles-cur=128:\
> >         :stacksize-cur=4M:\
> >         :localcipher=blowfish,6:\
> >         :ypcipher=old:\
> >         :tc=auth-defaults:\
> >         :tc=auth-ftp-defaults:
> > 
> > The one you are looking for is openfiles-cur
> 
> Yup, I have 64. Do you have to reboot after changing this setting? (It's not 
> my machine, It's Carl who let's me mess with it).


Once changed, just logout/login and it is there.

you can check that it worked with

$> ulimit -n
128

> >>>5. LD_LIBRARY_PATH. This one is the only one I don't understand quite
> >>>yet. By default, it's set to /usr/local/lib:/usr/X11R6/lib on my
> >>>machine. And the perl that ships with my OpenBSD will simply segfault in
> >>>a completely bogus way:
> >>>
> >>>(gdb) bt
> >>>#0  0x400078cf in end ()
> >>>#1  0x40013060 in end ()
> >>>#2  0x400074a8 in end ()
> >>>#3  0x40007182 in end ()
> >>>#4  0x400085bd in end ()
> >>>
> >>>The secret to fixing it for me so far, has been to make sure
> >>>/usr/X11R6/lib isn't in my LD_LIBRARY_PATH. At this point, all attempts
> >>>to figure out WHY have failed miserably.
> >>
> >>You have to specify it explicitly when you invoke your mod_perl. We probably

> >>should supply a support for this from within Apache::Test.
> > 
> > 
> > Well, I was also planning on doing some more digging on the strange
> > segfaults I've been seeing with /usr/X11R6/lib, but it's very strange,
> > IMO.
> 
> IMHO, overriding LD_LIBRARY_PATH is probably the simplest. At least for the 
> tests.

Well, more or less. For example, on my setup, you need to keep
/usr/local/lib and 'know' to remove /usr/X11R6/bin ...

> What I don't understand why the perl executable picks wrong libraries - they 
> don't even much on the version numbers. Without LD_LIBRARY_PATH it complains:
> 
> /usr/libexec/ld.so: warning: libperl.so.6.0: minor version >= 1 expected, 
> using it anyway
> 
> why "using anyway"....

You can try setting
LD_TRACE_LOADED_OBJECTS=1

to get a more detailled of what ld loaded ...

> 
> It also looks like it doesn't like LD_PRELOAD:
> 
> cd perl-5.6.1
> LD_PRELOAD=`pwd`/libperl.so LD_LIBRARY_PATH=`pwd` make test
> /usr/libexec/ld.so: preload: /data/stas/perl.org/perl-5.6.1/libperl.so: cannot 
> map object
> 

On a funnier note, I've found where RANLIB comes from

linux #> perl -V:ranlib
':'
openbsd $> perl -V:ranlib
'ranlib'

So we are getting it from Config.pm, but annoyingly enough, it says to
use ranlib even though we don't want to.

So, after all, maybe the DARWIN hack is for the same reason...

> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
-- 
Philippe M. Chiasson <gozer@cpan.org>

Mime
View raw message