perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject Re: [mp2 patch] Support for Perl 5.10 [Was: MP_CODE_ATTRS() is broken under perl 5.10.0]
Date Mon, 28 Jan 2008 08:21:17 GMT
Randy Kobes wrote:
> On Sat, 26 Jan 2008, Philippe M. Chiasson wrote:
> 
>> Randy Kobes wrote:
>>> On Thu, 24 Jan 2008, Philippe M. Chiasson wrote:
>>>
>>> [ ... ]
>>>> Following is a patch (probably will change some more before I am done) 
>>>> that
>>>> gets rid of this hacking attribute handling and passes it around with 
>>>> magic.
>>> Great work! And thanks for the explanations :)
>> No problems, happy to hear it works.
> 
> This XS stuff is pretty hairy at times - it was really
> insightful as you walked us through it ...
> 
>>> I've applied a modified version of this patch (attached)
>>> to Win32 ActivePerl 5.10 (build 1002) with Apache/2.2.8;
>>> there's some problems with the t/perl/ithreads*.t tests,
>>> which I'll look at more carefully, but all the filter
>>> tests now pass.
>> Nice, that's pretty good. If you can at least figure out
>> what's going on with these tests, that sure would help.
> 
> My Apache crashed on all the t/perl/ithreads*.t tests,
> as well as in the ithreads test in ModPerl-Registry (after
> removing the Apache2-Reload stuff), but all the others 
> passed. I'll start a new message about this when I gather 
> some new information, but I was wondering if I should be
> looking for Win32-specific things - does anyone have
> experience with a threaded perl-5.10 on these tests?

I've reproduced, and for posterity, the stacktraces look like this:

[Switching to process 10138 thread 0x1103]
0x004cecfe in Perl_savepvn (my_perl=0x3097200, pv=0x1 <Address 0x1 out of bounds>, len=5)
at util.c:944
944             return (char *) CopyD(pv,newaddr,len,char);
(gdb) up
#1  0x005768de in Perl_mg_dup (my_perl=0x3097200, mg=0x29efae0, param=0xb0102468) at sv.c:9787
9787                    nmg->mg_ptr     = SAVEPVN(mg->mg_ptr, mg->mg_len);
(gdb) bt
#0  0x004cecfe in Perl_savepvn (my_perl=0x3097200, pv=0x1 <Address 0x1 out of bounds>,
len=5) at util.c:944
#1  0x005768de in Perl_mg_dup (my_perl=0x3097200, mg=0x29efae0, param=0xb0102468) at sv.c:9787
#2  0x005789da in Perl_sv_dup (my_perl=0x3097200, sstr=0x2775520, param=0xb0102468) at sv.c:10139
#3  0x0057f208 in perl_clone (proto_perl=0x220b400, flags=2) at sv.c:11259
#4  0x01ba5b56 in S_ithread_create (my_perl=0x220b400, init_function=0x30aa260, stack_size=0,
gimme=0, exit_opt=0, params=0x30a84b0) at threads.xs:666
#5  0x01baa75f in XS_threads_create (my_perl=0x220b400, cv=0x2241080) at threads.xs:953
#6  0x00531ced in Perl_pp_entersub (my_perl=0x220b400) at pp_hot.c:2847
#7  0x004cb433 in Perl_runops_debug (my_perl=0x220b400) at dump.c:1931
#8  0x0050e468 in Perl_call_sv (my_perl=0x220b400, sv=0x309c640, flags=4) at perl.c:2646
#9  0x003d18d1 in modperl_callback (my_perl=0x220b400, handler=0x3092ec8, p=0x308aa18, r=0x308aa50,
s=0x807eb8, args=0x22c1490) at modperl_callback.c:101
#10 0x003d3276 in modperl_callback_run_handlers (idx=6, type=4, r=0x308aa50, c=0x0, s=0x807eb8,
pconf=0x0, plog=0x0, ptemp=0x0, run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:262
#11 0x003d401f in modperl_callback_per_dir (idx=6, r=0x308aa50, run_mode=MP_HOOK_RUN_FIRST)
at modperl_callback.c:369
#12 0x003c7a7d in modperl_response_handler_run (r=0x308aa50, finish=1) at mod_perl.c:999
#13 0x003c7c0e in modperl_response_handler (r=0x308aa50) at mod_perl.c:1043
#14 0x000025d9 in ap_run_handler ()
#15 0x00002e16 in ap_invoke_handler ()
#16 0x0002cd0a in ap_process_request ()
#17 0x00029031 in ap_process_http_connection ()
#18 0x000121c0 in ap_run_process_connection ()
#19 0x0001263c in ap_process_connection ()
#20 0x00032fec in process_socket ()
#21 0x000339ed in worker_thread ()
#22 0x000ba138 in apr_threadattr_guardsize_set ()
#23 0x9463f075 in _pthread_start ()
#24 0x9463ef32 in thread_start ()
(gdb) print *mg
$2 = {
   mg_moremagic = 0xcc4a00,
   mg_virtual = 0x220b400,
   mg_private = 1,
   mg_type = 0 '\0',
   mg_flags = 0 '\0',
   mg_len = 5,
   mg_obj = 0x0,
   mg_ptr = 0x1 <Address 0x1 out of bounds>
}

Looks to me like perl having trouble cloning something that doesn't smell
like valid magic. Just for kicks, I've quickly verified that it isn't caused
by my latest patch (that introduced more magic).

/me ponders
-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Mime
View raw message