Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 75149 invoked from network); 25 Sep 2003 07:39:36 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 25 Sep 2003 07:39:36 -0000 Received: (qmail 80759 invoked by uid 500); 25 Sep 2003 07:32:33 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 80538 invoked by uid 500); 25 Sep 2003 07:32:31 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 80525 invoked from network); 25 Sep 2003 07:32:31 -0000 Message-ID: <3F729A18.2000305@stason.org> Date: Thu, 25 Sep 2003 00:32:40 -0700 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 Cc: Blair Zajac , dev@apr.apache.org Subject: Re: segfault in apr_atomic_cas References: <3F721608.2030708@stason.org> <3F723195.8983E6E9@orcaware.com> <3F72355A.1000800@stason.org> In-Reply-To: <3F72355A.1000800@stason.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Stas Bekman wrote: [...] > I have a dirty workaround, setting global_pool->mutex to NULL, at least > I can do some debugging. If anybody needs it to work now here is a dirty workaround that works for me. notice that it disables the mutex on the global pool, so you may have problems in the threaded environment. Index: memory/unix/apr_pools.c =================================================================== RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v retrieving revision 1.197 diff -u -r1.197 apr_pools.c --- memory/unix/apr_pools.c 18 Jul 2003 23:10:04 -0000 1.197 +++ memory/unix/apr_pools.c 25 Sep 2003 07:30:01 -0000 @@ -1505,8 +1505,14 @@ { apr_pool_t *pool; + if (allocator == (apr_allocator_t *)0xdeadbeaf) { + allocator = NULL; + global_pool->mutex = NULL; + + } + *newpool = NULL; - + if (!parent) { parent = global_pool; } Index: misc/unix/start.c =================================================================== RCS file: /home/cvs/apr/misc/unix/start.c,v retrieving revision 1.70 diff -u -r1.70 start.c --- misc/unix/start.c 6 Jan 2003 23:44:32 -0000 1.70 +++ misc/unix/start.c 25 Sep 2003 07:30:01 -0000 @@ -93,6 +93,24 @@ if ((status = apr_pool_initialize()) != APR_SUCCESS) return status; +#if APR_POOL_DEBUG + { + apr_pool_t *pool = NULL; + apr_status_t rv; + + if ((rv = apr_pool_create_ex(&pool, NULL, NULL, + (apr_allocator_t *)0xdeadbeaf) + ) != APR_SUCCESS) { + return rv; + } + + if ((status = apr_atomic_init(pool)) != APR_SUCCESS) { + return status; + } + } +#endif + + if (apr_pool_create(&pool, NULL) != APR_SUCCESS) { return APR_ENOPOOL; } @@ -102,7 +120,7 @@ if ((status = apr_atomic_init(pool)) != APR_SUCCESS) { return status; } - + apr_signal_init(pool); return APR_SUCCESS; __________________________________________________________________ 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