Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 37687 invoked from network); 26 May 2008 22:33:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 May 2008 22:33:55 -0000 Received: (qmail 51424 invoked by uid 500); 26 May 2008 22:33:56 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 51364 invoked by uid 500); 26 May 2008 22:33:55 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 51353 invoked by uid 99); 26 May 2008 22:33:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2008 15:33:55 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2008 22:33:08 +0000 Received: by nf-out-0910.google.com with SMTP id b2so1058312nfb.43 for ; Mon, 26 May 2008 15:33:23 -0700 (PDT) Received: by 10.210.47.7 with SMTP id u7mr430444ebu.14.1211841203700; Mon, 26 May 2008 15:33:23 -0700 (PDT) Received: from xeelee.e-reka.si ( [90.157.168.65]) by mx.google.com with ESMTPS id i4sm33641541nfh.1.2008.05.26.15.33.22 (version=SSLv3 cipher=RC4-MD5); Mon, 26 May 2008 15:33:23 -0700 (PDT) Message-ID: <483B3A9B.5010205@xbc.nu> Date: Tue, 27 May 2008 00:32:59 +0200 From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: David Glasser CC: Martin von Gagern , dev@apr.apache.org, dev@subversion.tigris.org Subject: Re: apr cleanup unloads neon library too soon in git-svn References: <483B3084.9000806@gmx.net> <1ea387f60805261521t5fc3094eh1578e7dbae1d48c2@mail.gmail.com> In-Reply-To: <1ea387f60805261521t5fc3094eh1578e7dbae1d48c2@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org David Glasser wrote: > On Mon, May 26, 2008 at 2:49 PM, Martin von Gagern > wrote: > >> Hi! >> >> For the full details and several stack traces, please refer to >> https://bugs.gentoo.org/show_bug.cgi?id=223747 >> >> The problem is that in some cases (running git-svn) when the APR cleanup >> (apr_terminate) cleans its pools (apr_pool_destroy), it will unload shared >> libraries (libsvn_ra_neon-1.so.0) while there are still neon objects around. >> When the cleanup tries to clean those, their cleanup function >> (cleanup_session) is no longer available, which causes a segmentation fault. >> >> I see two possible solutions. One is to have the APR cleanup code ensure >> that libraries get unloaded only after all other objects from the current >> part of the pool hierarchy have been cleaned. The other would be to have >> subversion pool management restructured in some way, such that the DSO pool >> gets cleared after the other objects. >> >> As I don't know which solution would be the better one, I post to both >> lists, APR and Subversion. Please also have a look at the corresponding >> discussion on the other list. I'll try to attach links to the threads in >> both mail archives to the Gentoo bug report stated above. Stay tuned. >> > > Could we maybe make all of our "global" pools be children of the > DSO-managing pool? > That would imply having a global pool for all DSO stuff, which means we'd need a process-global pool context for all SVN libraries. We don't have the init API for that, and even if we did, we couldn't make its use mandatory before 2.0. This is a well-known gotcha in APR pool/DSO combinations, which only really work in an httpd-like architecture where DSO loading is strictly hierarchical. IMHO you can only be truly solved if you can create truly global pools that aren't children of the "one true" global APR pool. Which, I believe, is going to happen in apr-1.3; so /maybe/ our DSO-loading code should try to detect, possibly at runtime, if that feature exists, and use it. -- Brane