[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: crash when locking a file (client 1.2.1, repository 1.1.x)

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-07-22 19:11:44 CEST

Ben Collins-Sussman wrote:

>> Subversion crashes when a lock is attempted on a file whose working
>> copy is hosted on a 1.1.x server.
>>
>> Reproducable every time with my 1.2.1 build of the Subversion CL
>> client on WinXP SP2:
>>
>> > cd TortoiseSVN # my working copy of TSVN
>> > svn lock build.bat
>> now I'm asked three times for authentication. And I'm sure I'm giving
>> the correct username/password every time!
>> Then, the crash happens.
>
>
>
> Hm, I can't reproduce using /trunk client. I checked out a copy of
> subclipse from tigris.org (authenticating as user 'sussman'), but I get
> the normal expected error:

I know now why this crash happens and why it doesn't crash with an 1.2.0
client but only with an 1.2.1 client:

in libsvn_ra_dav/session.c, function svn_ra_dav__lock(), line 1128

       err = shim_svn_ra_dav__lock(session, &lock, path, comment,
                                   force, *revnum, iterpool);

after this, err->apr_err is SVN_ERR_RA_DAV_REQUEST_FAILED even though
the authentication failed (as you mentioned in your previous mail, "the
  LOCK method is flatly disallowed by apache's authorization modules").

Then later in line 1152:
   return svn_ra_dav__maybe_store_auth_info_after_result(ret_err, ras);

tries to save the authentication data which isn't available! The
function svn_ra_dav__maybe_store_auth_info_after_result() itself tries
to prevent that by checking the error code against
SVN_ERR_RA_NOT_AUTHORIZED, but the error code is
SVN_ERR_RA_DAV_REQUEST_FAILED.

I found this by comparing the 1.2.0 tag against the 1.2.1 tag (where the
crash happens).

I don't know why it doesn't crash when you try it with HEAD, I haven't
checked the HEAD code so it might have been fixed already.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 22 19:12:30 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.