On Tuesday, 07 February 2012 18:01:50 Torsten Förtsch wrote:
> What to do now? I'd suggest to revert change 1145161 and get 2.0.6 out
> (perhaps with Steve's latest patch). Steve, do you use perl 5.14? If
> yes, can you try if you see the "panic: free from wrong pool" also with
> 5.12?
On Wednesday, 08 February 2012 09:33:52 Steve Hay wrote:
> I think my patch is good, but clearly isn't the whole story.

By now I think Steve's patch should not be necessary. I believe the wrong 
context is a result of using the wrong interpreter pool in the directory 
merge.

I think it is a bug if at that point aTHX differs from PERL_GET_CONTEXT. So, I 
added the following macros to the threading branch.

#ifdef MP_DEBUG
#  define MP_ASSERT(exp) ap_assert(exp)
#else
#  define MP_ASSERT(exp) ((void)0)
#endif

#ifdef USE_ITHREADS
#  define MP_ASSERT_CONTEXT(perl) MP_ASSERT((perl) == PERL_GET_CONTEXT)
#else
#  define MP_ASSERT_CONTEXT(perl) ((void)0)
#endif

The latter macro is then used in modperl_module_config_obj_cleanup() to check 
the context:

static apr_status_t modperl_module_config_obj_cleanup(void *data)
{
    config_obj_cleanup_t *cleanup =
        (config_obj_cleanup_t *)data;
    dTHXa(cleanup->perl);

    MP_ASSERT_CONTEXT(aTHX);

    modperl_svptr_table_delete(aTHX_ cleanup->table, cleanup->ptr);

    MP_TRACE_c(MP_FUNC, "deleting ptr 0x%lx from table 0x%lx",
               (unsigned long)cleanup->ptr,
               (unsigned long)cleanup->table);

    return APR_SUCCESS;
}

Meanwhile, I have reverted change 1145161 in trunk.

Fred, could you please roll another rc?

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net


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

Reply via email to