Re: Thread issues in svnserve

2013-05-10 Thread Ivan Zhakov
On Fri, May 10, 2013 at 1:16 PM, Philip Martin wrote: > Ivan Zhakov writes: > >> Another way add some kind of svn__shared_pool_t with atomic reference >> counter and destroying attached pool when counter reaches zero. >> >> Something like this: > > An implementation of your idea: > > Index: subve

Re: Thread issues in svnserve

2013-05-10 Thread Philip Martin
Ivan Zhakov writes: > Another way add some kind of svn__shared_pool_t with atomic reference > counter and destroying attached pool when counter reaches zero. > > Something like this: An implementation of your idea: Index: subversion/svnserve/svnserve.c ==

Re: Thread issues in svnserve

2013-05-09 Thread Philip Martin
Ivan Zhakov writes: > Another way add some kind of svn__shared_pool_t with atomic reference > counter and destroying attached pool when counter reaches zero. > > Something like this: > [[[ > svn__shared_pool_t * svn__shared_pool_attach(apr_pool_t *pool) > { > svn__shared_pool_t sp = apr_pcall

Re: Thread issues in svnserve

2013-05-09 Thread Ivan Zhakov
On Thu, May 9, 2013 at 10:57 PM, Branko Čibej wrote: > On 09.05.2013 18:43, Ivan Zhakov wrote: >> On Thu, May 9, 2013 at 8:41 PM, Philip Martin >> wrote: >>> Branko Čibej writes: >>> On 09.05.2013 17:14, Ivan Zhakov wrote: >> Perhaps we have to look at the httpd code? >> > httpd

Re: Thread issues in svnserve

2013-05-09 Thread Branko Čibej
On 09.05.2013 18:43, Ivan Zhakov wrote: > On Thu, May 9, 2013 at 8:41 PM, Philip Martin > wrote: >> Branko Čibej writes: >> >>> On 09.05.2013 17:14, Ivan Zhakov wrote: > Perhaps we have to look at the httpd code? > httpd doesn't create worker thread dynamically, so they can allocate

Re: Thread issues in svnserve

2013-05-09 Thread Ivan Zhakov
On Thu, May 9, 2013 at 8:41 PM, Philip Martin wrote: > Branko Čibej writes: > >> On 09.05.2013 17:14, Ivan Zhakov wrote: Perhaps we have to look at the httpd code? >>> httpd doesn't create worker thread dynamically, so they can allocate >>> apr_thread_t in global pool. Also it has dedic

Re: Thread issues in svnserve

2013-05-09 Thread Philip Martin
Branko Čibej writes: > On 09.05.2013 17:14, Ivan Zhakov wrote: >>> Perhaps we have to look at the httpd code? >>> >> httpd doesn't create worker thread dynamically, so they can allocate >> apr_thread_t in global pool. Also it has dedicated win32 mpm that uses >> CreateThread Windows API directly.

Re: Thread issues in svnserve

2013-05-09 Thread Ivan Zhakov
On Thu, May 9, 2013 at 8:38 PM, Ivan Zhakov wrote: > On Thu, May 9, 2013 at 8:10 PM, Philip Martin > wrote: >> Ivan Zhakov writes: >> >>> But currently APR doesn't access apr_threadattr_t from worker thread >>> and doesn't need access to apr_thread_t from main thread. So using >>> iterpool for a

Re: Thread issues in svnserve

2013-05-09 Thread Ivan Zhakov
On Thu, May 9, 2013 at 8:10 PM, Philip Martin wrote: > Ivan Zhakov writes: > >> But currently APR doesn't access apr_threadattr_t from worker thread >> and doesn't need access to apr_thread_t from main thread. So using >> iterpool for apr_threadattr_t and connection_pool for apr_thread_t >> fixes

Re: Thread issues in svnserve

2013-05-09 Thread Philip Martin
Philip Martin writes: > I think we may be able to create non-detached threads and then > explicitly detach: Oops! I forgot to pass iterpool to apr_thread_create. Doesn't seem to work when I fix it. -- Philip

Re: Thread issues in svnserve

2013-05-09 Thread Philip Martin
Ivan Zhakov writes: > But currently APR doesn't access apr_threadattr_t from worker thread > and doesn't need access to apr_thread_t from main thread. So using > iterpool for apr_threadattr_t and connection_pool for apr_thread_t > fixes problem, but only with current APR implementation. I don't

Re: Thread issues in svnserve

2013-05-09 Thread Branko Čibej
On 09.05.2013 17:14, Ivan Zhakov wrote: >> Perhaps we have to look at the httpd code? >> > httpd doesn't create worker thread dynamically, so they can allocate > apr_thread_t in global pool. Also it has dedicated win32 mpm that uses > CreateThread Windows API directly. I'm beginning to think that

Re: Thread issues in svnserve

2013-05-09 Thread Ivan Zhakov
On Thu, May 9, 2013 at 6:32 PM, Philip Martin wrote: > Philip Martin writes: > >> It might be better to pass iterpool instead of connection_pool into >> apr_thread_create. The problem with tattr also applies to memory >> allocated by apr_thread_create such as *new. At present *new is not >> acc

Re: Thread issues in svnserve

2013-05-09 Thread Philip Martin
Philip Martin writes: > It might be better to pass iterpool instead of connection_pool into > apr_thread_create. The problem with tattr also applies to memory > allocated by apr_thread_create such as *new. At present *new is not > accessed after the thread has started but the implementation cou

Re: Thread issues in svnserve

2013-05-09 Thread Philip Martin
Philip Martin writes: > We could do this: > > Index: subversion/svnserve/svnserve.c > === > --- subversion/svnserve/svnserve.c(revision 1480565) > +++ subversion/svnserve/svnserve.c(working copy) > @@ -444,6 +444,7 @@ int mai

Re: Thread issues in svnserve

2013-05-09 Thread Philip Martin
Ivan Zhakov writes: > On Wed, May 8, 2013 at 1:00 PM, Bert Huijben wrote: >> >> The fix resolves the symptoms, but I would guess it might be better >> to make the thread create (and destroy) its own pool, while using >> some proper iterpool in the function that creates the pools. Handing >> a te

Re: Thread issues in svnserve (was Re: 1.8.0-rc1 up for testing/signing)

2013-05-08 Thread Ivan Zhakov
On Wed, May 8, 2013 at 1:00 PM, Bert Huijben wrote: >> -Original Message- >> From: Ivan Zhakov [mailto:i...@visualsvn.com] >> Sent: woensdag 8 mei 2013 01:46 >> To: Subversion Development >> Subject: Re: Thread issues in svnserve (was Re: 1.8.0-rc1 up for &g

RE: Thread issues in svnserve (was Re: 1.8.0-rc1 up for testing/signing)

2013-05-08 Thread Bert Huijben
> -Original Message- > From: Ivan Zhakov [mailto:i...@visualsvn.com] > Sent: woensdag 8 mei 2013 01:46 > To: Subversion Development > Subject: Re: Thread issues in svnserve (was Re: 1.8.0-rc1 up for > testing/signing) > > On Sun, May 5, 2013 at 8:27 PM, Ivan Z

Re: Thread issues in svnserve (was Re: 1.8.0-rc1 up for testing/signing)

2013-05-07 Thread Ivan Zhakov
On Sun, May 5, 2013 at 8:27 PM, Ivan Zhakov wrote: > On Sun, May 5, 2013 at 6:36 PM, Ivan Zhakov wrote: >> On Sat, May 4, 2013 at 4:01 PM, Ivan Zhakov wrote: >>> On Sat, May 4, 2013 at 4:34 AM, Ben Reser wrote: Here it is: the first Release Candidate for Subversion 1.8.0. You can fet

Re: Thread issues in svnserve (was Re: 1.8.0-rc1 up for testing/signing)

2013-05-05 Thread Ivan Zhakov
On Sun, May 5, 2013 at 6:36 PM, Ivan Zhakov wrote: > On Sat, May 4, 2013 at 4:01 PM, Ivan Zhakov wrote: >> On Sat, May 4, 2013 at 4:34 AM, Ben Reser wrote: >>> Here it is: the first Release Candidate for Subversion 1.8.0. You can >>> fetch the proposed tarballs from here: >>> https://dist.apa

Thread issues in svnserve (was Re: 1.8.0-rc1 up for testing/signing)

2013-05-05 Thread Ivan Zhakov
On Sat, May 4, 2013 at 4:01 PM, Ivan Zhakov wrote: > On Sat, May 4, 2013 at 4:34 AM, Ben Reser wrote: >> Here it is: the first Release Candidate for Subversion 1.8.0. You can >> fetch the proposed tarballs from here: >> https://dist.apache.org/repos/dist/dev/subversion >> > I've got crash in s