Re: svn commit: r1676417 - /perl/modperl/trunk/src/modules/perl/modperl_interp.c

Steve Hay <[email protected]>
Newsgroups gmane.comp.apache.mod-perl.devel
Message-ID <CADED=K72uF5E8qytfyoiHyLT+ecz2rVJWbMOK4RATiyOnEv=3g@mail.gmail.com>
On 10 May 2015 at 13:47, Steve Hay <[email protected]> wrote:
> On 28 April 2015 at 07:51,  <[email protected]> wrote:
>> Author: jkaluza
>> Date: Tue Apr 28 06:51:12 2015
>> New Revision: 1676417
>>
>> URL: http://svn.apache.org/r1676417
>> Log:
>> Initialize interp->refcnt to 1 in modperl_interp_select.
>>
>> Reasoning:
>> 1. All calls of MP_INTERPa do not increment interp->refcnt, so refcnt
>>    used to be 0 before this commit. But there is always matching
>>    MP_INTERP_PUTBACK, which calls modperl_interp_unselect which decreases
>>    the refcnt, so it was possible to get negative refcnt or crash with
>>    threaded MPMs, because reference counting has been broken.
>> 2. modperl_interp_select increases the refcount if it finds the PerlInterp in
>>    ccfg, so it makes sense to increase it (it means set to 1) during
>>    initialization too. Otherwise the refcnt would be incremented for the caller
>>    in some cases, but wouldn't be in other.
>>
>> This commit fixes the crash seen on worker MPM when PerlInterp has been used
>> by two threads and the first one freed PerlInterp during
>> modperl_interp_unselect.
>>
>> Modified:
>>     perl/modperl/trunk/src/modules/perl/modperl_interp.c
>>
>
> I cannot understand why, but since this patch was applied I find that
> t\modules\proxy.t fails every time when I run the full "nmake test",
> but it always succeeds when I run it in isolation so I'm at a loss to
> find out what is going wrong. All other tests (apart from those known
> Win32-specific failures documented in README) still pass. Reverting
> the patch "fixes" the proxy.t problem, but probably isn't the right
> solution.
>

That was testing with 2.4.12, but I have the same problem with 2.2.29
too, so it's not 2.4-specific.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.