You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Sperling <st...@elego.de> on 2014/05/05 14:06:03 UTC

Re: svn commit: r1591919 - in /subversion/trunk/subversion: include/ include/private/ libsvn_fs/ libsvn_fs_base/bdb/ libsvn_fs_fs/ libsvn_fs_x/ libsvn_ra_svn/ libsvn_subr/ svnserve/ tests/ tests/libsvn_fs_fs/

On Fri, May 02, 2014 at 02:07:40PM -0000, stefan2@apache.org wrote:
> Author: stefan2
> Date: Fri May  2 14:07:40 2014
> New Revision: 1591919
> 
> URL: http://svn.apache.org/r1591919
> Log:
> APR mutexes don't support recursive locking on all platforms.
> As a result, trying to take out the same lock twice in the
> same thread will cause a lock up under e.g. Linux.  This patch
> adds an option to svn_mutex__t that detects recursive locking
> attempts in most cases and returns a proper error.

> * subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
>   (never_reached,
>    lock_again): Callback functions required by the new test.
>   (recursive_locking): New test expecting an SVN_ERR_RECURSIVE_LOCK.
>   (test_funcs): Register the new test.

Hi Stefan,

This new test fails on the bb-openbsd bot.
http://ci.apache.org/builders/bb-openbsd/builds/12/steps/Test/logs/faillog-ra_local-fsfs

Can you please look into this?

Note that the bot is deliberately compiling APR and everything else
without support for threads. Perhaps the test or other code doesn't
take this possibility into account?

Let me know if you need help.

Thanks!

Re: svn commit: r1591919 - in /subversion/trunk/subversion: include/ include/private/ libsvn_fs/ libsvn_fs_base/bdb/ libsvn_fs_fs/ libsvn_fs_x/ libsvn_ra_svn/ libsvn_subr/ svnserve/ tests/ tests/libsvn_fs_fs/

Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Tue, May 6, 2014 at 12:18 AM, Stefan Fuhrmann <
stefan.fuhrmann@wandisco.com> wrote:

> On Mon, May 5, 2014 at 2:06 PM, Stefan Sperling <st...@elego.de> wrote:
>
>> On Fri, May 02, 2014 at 02:07:40PM -0000, stefan2@apache.org wrote:
>> > Author: stefan2
>> > Date: Fri May  2 14:07:40 2014
>> > New Revision: 1591919
>> >
>> > URL: http://svn.apache.org/r1591919
>> > Log:
>> > APR mutexes don't support recursive locking on all platforms.
>> > As a result, trying to take out the same lock twice in the
>> > same thread will cause a lock up under e.g. Linux.  This patch
>> > adds an option to svn_mutex__t that detects recursive locking
>> > attempts in most cases and returns a proper error.
>>
>> > * subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
>> >   (never_reached,
>> >    lock_again): Callback functions required by the new test.
>> >   (recursive_locking): New test expecting an SVN_ERR_RECURSIVE_LOCK.
>> >   (test_funcs): Register the new test.
>>
>> Hi Stefan,
>>
>> This new test fails on the bb-openbsd bot.
>>
>> http://ci.apache.org/builders/bb-openbsd/builds/12/steps/Test/logs/faillog-ra_local-fsfs
>>
>> Can you please look into this?
>>
>> Note that the bot is deliberately compiling APR and everything else
>> without support for threads. Perhaps the test or other code doesn't
>> take this possibility into account?
>>
>
> Since double locking attempts on the same file
> may be problem even without threading support,
> we should detect recursive mutex locks there
> as well. r1592640 may do the trick. Could not
> test it, though.
>

I see that it is still failing on the buildbot and I have no clue
as to why. When I hard-code APR_HAS_THREADS to 0,
the test still passes (using the alternative code path).

All I found was a consistency edge case which did not
effect the outcome of the tests. Fixed in r1592763.

-- Stefan^2.

Re: svn commit: r1591919 - in /subversion/trunk/subversion: include/ include/private/ libsvn_fs/ libsvn_fs_base/bdb/ libsvn_fs_fs/ libsvn_fs_x/ libsvn_ra_svn/ libsvn_subr/ svnserve/ tests/ tests/libsvn_fs_fs/

Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Mon, May 5, 2014 at 2:06 PM, Stefan Sperling <st...@elego.de> wrote:

> On Fri, May 02, 2014 at 02:07:40PM -0000, stefan2@apache.org wrote:
> > Author: stefan2
> > Date: Fri May  2 14:07:40 2014
> > New Revision: 1591919
> >
> > URL: http://svn.apache.org/r1591919
> > Log:
> > APR mutexes don't support recursive locking on all platforms.
> > As a result, trying to take out the same lock twice in the
> > same thread will cause a lock up under e.g. Linux.  This patch
> > adds an option to svn_mutex__t that detects recursive locking
> > attempts in most cases and returns a proper error.
>
> > * subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
> >   (never_reached,
> >    lock_again): Callback functions required by the new test.
> >   (recursive_locking): New test expecting an SVN_ERR_RECURSIVE_LOCK.
> >   (test_funcs): Register the new test.
>
> Hi Stefan,
>
> This new test fails on the bb-openbsd bot.
>
> http://ci.apache.org/builders/bb-openbsd/builds/12/steps/Test/logs/faillog-ra_local-fsfs
>
> Can you please look into this?
>
> Note that the bot is deliberately compiling APR and everything else
> without support for threads. Perhaps the test or other code doesn't
> take this possibility into account?
>

Since double locking attempts on the same file
may be problem even without threading support,
we should detect recursive mutex locks there
as well. r1592640 may do the trick. Could not
test it, though.

--Stefan^2.