You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/02/06 16:51:15 UTC

svn commit: r1067687 - in /subversion/trunk: ./ subversion/libsvn_fs_util/caching.c subversion/svnserve/main.c

Author: stefan2
Date: Sun Feb  6 15:51:15 2011
New Revision: 1067687

URL: http://svn.apache.org/viewvc?rev=1067687&view=rev
Log:
Merged latest caching bug fixes from performance branch:
revisions 1029232, 1032333, 1033040, 1033057 and 1033294
(support for "no threads", typos, error leaks)

Modified:
    subversion/trunk/   (props changed)
    subversion/trunk/subversion/libsvn_fs_util/caching.c
    subversion/trunk/subversion/svnserve/main.c

Propchange: subversion/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb  6 15:51:15 2011
@@ -25,7 +25,7 @@
 /subversion/branches/log-g-performance:870941-871032
 /subversion/branches/merge-skips-obstructions:874525-874615
 /subversion/branches/nfc-nfd-aware-client:870276,870376
-/subversion/branches/performance:979193,980118,981087,981684,982043,982355,983764,983766,984927,984973,984984,985014,985037,985046,985472,985477,985482,985500,985606,985669,986453,987888,987893,988319,990541,990568,990572,990600,990759,992899,992911,994956,995507,995603,1001413,1025660,1028092,1028094,1028104,1029038,1029042,1029090,1029092,1029335,1030763
+/subversion/branches/performance:979193,980118,981087,981684,982043,982355,983764,983766,984927,984973,984984,985014,985037,985046,985472,985477,985482,985500,985606,985669,986453,987888,987893,988319,990541,990568,990572,990600,990759,992899,992911,994956,995507,995603,1001413,1025660,1028092,1028094,1028104,1029038,1029042,1029090,1029092,1029232,1029335,1030763,1032333,1033040,1033057,1033294
 /subversion/branches/py-tests-as-modules:956579-1033052
 /subversion/branches/ra_serf-digest-authn:875693-876404
 /subversion/branches/reintegrate-improvements:873853-874164

Modified: subversion/trunk/subversion/libsvn_fs_util/caching.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_util/caching.c?rev=1067687&r1=1067686&r2=1067687&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_util/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_util/caching.c Sun Feb  6 15:51:15 2011
@@ -38,8 +38,12 @@ static svn_fs_cache_config_t cache_setti
     16,          /* up to 16 files kept open */
     TRUE,        /* cache fulltexts */
     FALSE,       /* don't cache text deltas */
+
+#ifdef APR_HAS_THREADS
     FALSE        /* assume multi-threaded operation */
-  };
+#else
+    TRUE         /* single-threaded is the only supported mode of operation */
+};
 
 /* Get the current FSFS cache configuration. */
 const svn_fs_cache_config_t *
@@ -50,7 +54,8 @@ svn_fs_get_cache_config(void)
 
 /* Access the process-global (singleton) membuffer cache. The first call
  * will automatically allocate the cache using the current cache config.
- * NULL will be returned if the desired cache size is 0.
+ * NULL will be returned if the desired cache size is 0 or if the cache
+ * could not be created for some reason.
  */
 svn_membuffer_t *
 svn_fs__get_global_membuffer_cache(void)
@@ -79,12 +84,12 @@ svn_fs__get_global_membuffer_cache(void)
       apr_allocator_max_free_set(allocator, 1);
       pool = svn_pool_create_ex(NULL, allocator);
 
-      svn_cache__membuffer_cache_create
-          (&new_cache,
-           (apr_size_t)cache_size,
-           (apr_size_t)cache_size / 16,
-           ! svn_fs_get_cache_config()->single_threaded,
-           pool);
+      svn_error_clear(svn_cache__membuffer_cache_create(
+          &cache,
+          (apr_size_t)cache_size,
+          (apr_size_t)(cache_size / 16),
+          ! svn_fs_get_cache_config()->single_threaded,
+          pool));
 
       /* Handle race condition: if we are the first to create a
        * cache object, make it our global singleton. Otherwise,

Modified: subversion/trunk/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/main.c?rev=1067687&r1=1067686&r2=1067687&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/main.c (original)
+++ subversion/trunk/subversion/svnserve/main.c Sun Feb  6 15:51:15 2011
@@ -831,7 +831,21 @@ int main(int argc, const char *argv[])
 
     settings.cache_fulltexts = TRUE;
     settings.cache_txdeltas = FALSE;
-    settings.single_threaded = handling_mode != connection_mode_thread;
+    settings.single_threaded = TRUE;
+
+    if (handling_mode == connection_mode_thread)
+      {
+#ifdef APR_HAS_THREADS
+        settings.single_threaded = FALSE;
+#else
+        /* No requests will be processed at all
+         * (see "switch (handling_mode)" code further down).
+         * But if they were, some other synchronization code
+         * would need to take care of securing integrity of
+         * APR-based structures. That would include our caches.
+         */
+#endif
+      }
 
     svn_fs_set_cache_config(&settings);
   }



Re: svn commit: r1067687 - in /subversion/trunk: ./ subversion/libsvn_fs_util/caching.c subversion/svnserve/main.c

Posted by Stefan Fuhrmann <st...@alice-dsl.de>.
On 07.02.2011 15:38, Philip Martin wrote:
> Philip Martin<ph...@wandisco.com>  writes:
>
>> Stefan Sperling<st...@elego.de>  writes:
>>
>>> On Mon, Feb 07, 2011 at 11:51:11AM +0000, Philip Martin wrote:
>>>> stefan2@apache.org writes:
>>>>
>>>>> Author: stefan2
>>>>> Date: Sun Feb  6 15:51:15 2011
>>>>> New Revision: 1067687
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=1067687&view=rev
>>>>> Log:
>>>>> Merged latest caching bug fixes from performance branch:
>>>>> revisions 1029232, 1032333, 1033040, 1033057 and 1033294
>>>>> (support for "no threads", typos, error leaks)
>>>> This commit* appears to cause a huge increase in Apache memory use when
>>>> running the regression tests, enough to make the machine unuseable and
>>>> prevent the tests running.
>>>>
>>>> [*]Strictly it's r1067712 since r1067687 doesn't build, but I think
>>>> r1067687 is the one that causes the problem.
>>> My buildbot seems to be affected by this, too.
>>> > From the web gui I can tell that it's currently running neon tests.
>>> And it's responding to pings... but I cannot ssh into it.
>>> ssh can establish a TCP connection but then it hangs.
>> It appears to be this part that causes the problem:
> HA! No, I was dealing with reversed patches.  I think this is the
> correct fix:
>
> Index: subversion/libsvn_fs_util/caching.c
> ===================================================================
> --- subversion/libsvn_fs_util/caching.c	(revision 1067926)
> +++ subversion/libsvn_fs_util/caching.c	(working copy)
> @@ -86,7 +86,7 @@
>         pool = svn_pool_create_ex(NULL, allocator);
>
>         svn_error_clear(svn_cache__membuffer_cache_create(
> -&old_cache,
> +&new_cache,
>             (apr_size_t)cache_size,
>             (apr_size_t)(cache_size / 16),
>             ! svn_fs_get_cache_config()->single_threaded,
>
>
Thanks, Philip for finding that one!

My r1067712 fix for the merge artifact
broke the code in a way not detectable
on my workstation :(

-- Stefan^2.

Re: svn commit: r1067687 - in /subversion/trunk: ./ subversion/libsvn_fs_util/caching.c subversion/svnserve/main.c

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> Stefan Sperling <st...@elego.de> writes:
>
>> On Mon, Feb 07, 2011 at 11:51:11AM +0000, Philip Martin wrote:
>>> stefan2@apache.org writes:
>>> 
>>> > Author: stefan2
>>> > Date: Sun Feb  6 15:51:15 2011
>>> > New Revision: 1067687
>>> >
>>> > URL: http://svn.apache.org/viewvc?rev=1067687&view=rev
>>> > Log:
>>> > Merged latest caching bug fixes from performance branch:
>>> > revisions 1029232, 1032333, 1033040, 1033057 and 1033294
>>> > (support for "no threads", typos, error leaks)
>>> 
>>> This commit* appears to cause a huge increase in Apache memory use when
>>> running the regression tests, enough to make the machine unuseable and
>>> prevent the tests running.
>>> 
>>> [*]Strictly it's r1067712 since r1067687 doesn't build, but I think
>>> r1067687 is the one that causes the problem.
>>
>> My buildbot seems to be affected by this, too.
>>>>From the web gui I can tell that it's currently running neon tests.
>> And it's responding to pings... but I cannot ssh into it.
>> ssh can establish a TCP connection but then it hangs.
>
> It appears to be this part that causes the problem:

HA! No, I was dealing with reversed patches.  I think this is the
correct fix:

Index: subversion/libsvn_fs_util/caching.c
===================================================================
--- subversion/libsvn_fs_util/caching.c	(revision 1067926)
+++ subversion/libsvn_fs_util/caching.c	(working copy)
@@ -86,7 +86,7 @@
       pool = svn_pool_create_ex(NULL, allocator);
 
       svn_error_clear(svn_cache__membuffer_cache_create(
-          &old_cache,
+          &new_cache,
           (apr_size_t)cache_size,
           (apr_size_t)(cache_size / 16),
           ! svn_fs_get_cache_config()->single_threaded,


-- 
Philip

Re: svn commit: r1067687 - in /subversion/trunk: ./ subversion/libsvn_fs_util/caching.c subversion/svnserve/main.c

Posted by Philip Martin <ph...@wandisco.com>.
Stefan Sperling <st...@elego.de> writes:

> On Mon, Feb 07, 2011 at 11:51:11AM +0000, Philip Martin wrote:
>> stefan2@apache.org writes:
>> 
>> > Author: stefan2
>> > Date: Sun Feb  6 15:51:15 2011
>> > New Revision: 1067687
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1067687&view=rev
>> > Log:
>> > Merged latest caching bug fixes from performance branch:
>> > revisions 1029232, 1032333, 1033040, 1033057 and 1033294
>> > (support for "no threads", typos, error leaks)
>> 
>> This commit* appears to cause a huge increase in Apache memory use when
>> running the regression tests, enough to make the machine unuseable and
>> prevent the tests running.
>> 
>> [*]Strictly it's r1067712 since r1067687 doesn't build, but I think
>> r1067687 is the one that causes the problem.
>
> My buildbot seems to be affected by this, too.
>>>From the web gui I can tell that it's currently running neon tests.
> And it's responding to pings... but I cannot ssh into it.
> ssh can establish a TCP connection but then it hangs.

It appears to be this part that causes the problem:

Index: ../src/subversion/libsvn_fs_util/caching.c
===================================================================
--- ../src/subversion/libsvn_fs_util/caching.c  (revision 1067686)
+++ ../src/subversion/libsvn_fs_util/caching.c  (revision 1067687)
@@ -38,8 +38,12 @@
     16,          /* up to 16 files kept open */
     TRUE,        /* cache fulltexts */
     FALSE,       /* don't cache text deltas */
+
+#ifdef APR_HAS_THREADS
     FALSE        /* assume multi-threaded operation */
-  };
+#else
+    TRUE         /* single-threaded is the only supported mode of operation */
+};

-- 
Philip

Re: svn commit: r1067687 - in /subversion/trunk: ./ subversion/libsvn_fs_util/caching.c subversion/svnserve/main.c

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Feb 07, 2011 at 11:51:11AM +0000, Philip Martin wrote:
> stefan2@apache.org writes:
> 
> > Author: stefan2
> > Date: Sun Feb  6 15:51:15 2011
> > New Revision: 1067687
> >
> > URL: http://svn.apache.org/viewvc?rev=1067687&view=rev
> > Log:
> > Merged latest caching bug fixes from performance branch:
> > revisions 1029232, 1032333, 1033040, 1033057 and 1033294
> > (support for "no threads", typos, error leaks)
> 
> This commit* appears to cause a huge increase in Apache memory use when
> running the regression tests, enough to make the machine unuseable and
> prevent the tests running.
> 
> [*]Strictly it's r1067712 since r1067687 doesn't build, but I think
> r1067687 is the one that causes the problem.

My buildbot seems to be affected by this, too.
>From the web gui I can tell that it's currently running neon tests.
And it's responding to pings... but I cannot ssh into it.
ssh can establish a TCP connection but then it hangs.

Re: svn commit: r1067687 - in /subversion/trunk: ./ subversion/libsvn_fs_util/caching.c subversion/svnserve/main.c

Posted by Philip Martin <ph...@wandisco.com>.
stefan2@apache.org writes:

> Author: stefan2
> Date: Sun Feb  6 15:51:15 2011
> New Revision: 1067687
>
> URL: http://svn.apache.org/viewvc?rev=1067687&view=rev
> Log:
> Merged latest caching bug fixes from performance branch:
> revisions 1029232, 1032333, 1033040, 1033057 and 1033294
> (support for "no threads", typos, error leaks)

This commit* appears to cause a huge increase in Apache memory use when
running the regression tests, enough to make the machine unuseable and
prevent the tests running.

[*]Strictly it's r1067712 since r1067687 doesn't build, but I think
r1067687 is the one that causes the problem.

-- 
Philip