perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: t/perl/ithreads.t revisited
Date Mon, 13 Dec 2004 17:51:45 GMT
Steve Hay wrote:

> I moved the installing of the WARN handler to a .pl file PerlRequire'd 
> from httpd.conf.  I still get the above warning written to stderr.txt.  
> Don't know what that proves.

Neither do I :(

>>Try adding sv_dump(sv) before SvREFCNT_dec() and hopefully it'll reveal 
>>what sv it segfaults on? I think it tries to cleanup some modperl object 
>>which didn't get cloned. in the call earlier:
>>
>>thread->interp = perl_clone(aTHX, CLONEf_KEEP_PTR_TABLE | CLONEf_CLONE_HOST);
>>
> 
> sv_dump() just writes to SDTERR rather than warn()'ing, so I got rid of 
> the WARN handler and put a crude hack into the ithreads handler() instead:
> 
>     close STDERR;
>     open STDERR, '>C:\\Temp\\stderr.txt';
> 
> I now get this in the stderr.txt file:
> 
> SV = PV(0x31f64d0) at 0x31960b8
>   REFCNT = 1
>   FLAGS = (TEMP,POK,pPOK)
>   PV = 0x31f7ed4 "ModPerl::Util::exit: (120000) exit was called at 
> C:/apache2/perl5/site/lib/Apache/Test.pm line 238"\0
>   CUR = 98
>   LEN = 99
> Attempt to free temp prematurely: SV 0x31960b8, Perl interpreter: 
> 0x2b51784 at 
> C:/Temp/bug-reporting-skeleton-mp2/t/response/TestPerl/ithreads.pm line 56.
> Scalars leaked: 1

Aha! looks like we make some progress!

> So the offending SV is an error  message itself, caused by the exit in 
> these lines in Apache/Test.pm:
> 
>         # trying to emulate a dual variable (ala errno)
>         unless ($meets_condition) {
>             my $reason = join ', ',
>               @SkipReasons ? @SkipReasons : "no reason given";
>             print "1..0 # skipped: $reason\n";
>             @SkipReasons = (); # reset
>             exit; #XXX: Apache->exit
>         }
> 
> In the test sequence "reload.t, api.t, itherads.t", the above "exit" 
> section is only reached by the api.t tests, because they skip on Win32.  
> So what happens for you if you artifically make the api.t tests skip on 
> your platform too?  Can you reproduce the failure then?

you mean re-enable t/perl/ithreads.t, skip api.t and run:

% t/TEST t/modules/reload.t t/perl/api.t t/perl/ithreads.t

just did that, and see no problem.

but let me look at our exit code. (I wish I could reproduce it here)

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message