Stas Bekman wrote: >Steve Hay wrote: > > >>The weird thing is that no warnings appear in the error_log. So I added >>this instead of the use warnings line: >> >>$SIG{__WARN__} = sub { >> open LOG, '>C:\\Temp\\stderr.txt'; >> print LOG @_; >> close LOG; >>}; >> >>and now I get this written to that log: >> >>Attempt to free temp prematurely: SV 0x2fb241c, Perl interpreter: >>0x2fa6014 at >>C:/Temp/bug-reporting-skeleton-mp2/t/response/TestPerl/ithreads.pm line 70. >> >> > > > >>Why didn't that warning make it to the error_log? >> >> > >probably because you added new code affecting memory alocations, which has >again restored the problem. try putting this WARN handler in startup >instead and may be you won't get any warnings now. > > 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.
>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 SV = PV(0x30d6318) at 0x304d484 REFCNT = 1 FLAGS = (TEMP,POK,pPOK) PV = 0x2cfd904 "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 0x304d484, Perl interpreter: 0x3186f0c at C:/Temp/bug-reporting-skeleton-mp2/t/response/TestPerl/ithreads.pm line 73. Scalars leaked: 1 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? - Steve ------------------------------------------------ Radan Computational Ltd. We would like to take this opportunity to wish all our customers, suppliers and colleagues seasons greetings. We will not be sending corporate greetings cards this year. Instead, we will be making a donation to charity. The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.