develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [perl #24463] DBI tests fail with perl 5.8.2 and -Duseithreads -Dusemultiplicity -Duse64bitint

Thread Previous | Thread Next
From:
Stas Bekman
Date:
November 13, 2003 12:02
Subject:
Re: [perl #24463] DBI tests fail with perl 5.8.2 and -Duseithreads -Dusemultiplicity -Duse64bitint
Message ID:
3FB3E312.6040203@stason.org
Enache Adrian wrote:
> On Tue, Nov 11, 2003 a.d., Tim Bunce wrote:
> 
>>On Mon, Nov 10, 2003 at 11:10:06PM -0000, timbo@dansat.data-plan.com (via RT) wrote:
>>
>>>DBI 1.38 (and probably other versions) fail tests on a perl 5.8.2
>>>configured with -Duseithreads -Dusemultiplicity -Duse64bitint
>>>
>>>t/05thrclone...........Usage: DBI::_clone_dbis() at t/05thrclone.t line 32.
>>># Looks like your test died before it could output anything.
> 
> 
> Change 21589 broke it.
> It adds a
> 	PERL_SET_CONTEXT(proto_perl)
> in the perl_clone_using function (sv.c:109999).
> 
> So when the CLONE method from the DBI stash is called (at sv.c:11658),
> it will get (via the dSP, etc macros) the PL_stack_base, PL_stack_sp
> pointers _not_ from the new interpreter (my_perl), but from the old one
> (the proto_perl in sv.c).
> 
> Fortunately this should happen only with -DDEBUGGING builds.
> 
> I have no idea why that PERL_SET_CONTEXT has been put there. The
> change description says something about eggs and chickens. That kind
> of problems go far beyond my understanding.

Well, I suggested that patch so I -Dm -Mthreads won't segfault :( Can you 
think of a test that would have detected a breakage?

Obviously the only proper solution is to fix Perl_PerlIO to cope with this.

Perl_reentrant_init() does a bunch of NEW calls, so are we having a problem of 
allocating from the wrong pool because of using the parent interpreter?

does calling
   PERL_SET_CONTEXT(cloned_perl);
after the cloning helps the problem?

What I'd love to see is 5.8.3 having completely avoid calling functions 
relying on PL_curinterp. This mix and match of my_perl and PL_curinterp is 
simply busted. I don't know how many days I've spent already trying to resolve 
mysterious segfaults (usually on destroy) caused because of the wrong contexts :(


__________________________________________________________________
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


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About