perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: OBSD update
Date Tue, 06 May 2003 06:19:34 GMT
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:

> You have to set LD_LIBRARY_PATH for perl ? (let me guess, otherwise it
> picks up the 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 

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`/ LD_LIBRARY_PATH=`pwd` make test
LD_PRELOAD=`pwd`/ LD_LIBRARY_PATH=`pwd` make install

> How come it looks like your perl (or 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 
#6  0x402c0998 in modperl_hook_init (pconf=0x183018, plog=0x0, ptemp=0x0, 
     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, 
     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

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

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

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/ warning: minor version >= 1 expected, 
using it anyway

why "using anyway"....

It also looks like it doesn't like LD_PRELOAD:

cd perl-5.6.1
LD_PRELOAD=`pwd`/ LD_LIBRARY_PATH=`pwd` make test
/usr/libexec/ preload: /data/stas/ cannot 
map object

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message