apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: apr_global_mutex_create never returns
Date Fri, 07 Jan 2005 17:25:12 GMT
At 10:47 AM 1/7/2005, Jeff Walter wrote:

>I took a gander at the APR SHM stuff, the only thing happening after the
>file is closed is:
>apr_pool_cleanup_register(new_m->pool, new_m, shm_cleanup_owner,
>    apr_pool_cleanup_null);
>*m = new_m;
>return APR_SUCCESS;
>If all it is doing is registering a cleanup handler, what could possibly
>cause it to segfault?

Every time this bites me, I discover the pool cleanup was registered
in a pool that outlived the module's lifetime, and it had been unloaded
before the callback was triggered.

Loadable modules shouldn't register in process or global pools
unless you are extraordinarily careful.  Dunno your scope for
new_m->pool but I'm guessing that's what bit you.


View raw message