Re: svn commit: r38105 - trunk/subversion/libsvn_ra_serf

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: svn commit: r38105 - trunk/subversion/libsvn_ra_serf

by Paul Burba-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jun 19, 2009 at 3:08 PM, Bert Huijben <rhuijben@...> wrote:

> Author: rhuijben
> Date: Fri Jun 19 13:08:39 2009
> New Revision: 38105
>
> Log:
> Make all response handlers in svn_ra_serf return svn_error_t* for
> a much cleaner error handling. This fixes issue #3375, but some further
> refactoring would be welcome.
>
> * subversion/libsvn_ra_serf/commit.c
>  (handle_checkout): Updated for new handler prototype and replace abort()
>    with normal SVN_ERR_MALFUNCTION()
>  (post_response_handler): Updated for changed prototype.
>
> * subversion/libsvn_ra_serf/locks.c
>  (handle_lock): Updated for new prototype. Return errors where possible.
>
> * subversion/libsvn_ra_serf/options.c
>  (options_response_handler): Updated for new prototype.
>
> * subversion/libsvn_ra_serf/ra_serf.h
>  (svn_ra_serf__response_handler_t): Updated to return svn_error_t * and
>    remove the temporary session argument.
>  (svn_ra_serf__handle_status_only, svn_ra_serf__handle_discard_body,
>   svn_ra_serf__handle_server_error, svn_ra_serf__handle_multistatus_only,
>   svn_ra_serf__handle_xml_parser): Updated to follow new prototype.
>  (SVN_SESSION_ERR): Removed macro.
>
> * subversion/libsvn_ra_serf/update.c
>  (error_fetch): Return svn_error_t *
>  (handle_fetch, handle_stream): Update error handling for new prototype.
>
> * subversion/libsvn_ra_serf/util.c
>  (svn_ra_serf__handle_discard_body,
>   svn_ra_serf__handle_status_only,
>   svn_ra_serf__handle_multistatus_only):
>    Implement new prototype.
>  (svn_ra_serf__handle_xml_parser):
>    Implement new prototype. Return errors instead of adding them to
>    the session. And remove an obsolete test.
>  (svn_ra_serf__handle_server_error):
>    Updated for new prototype. Clear ignored errors.
>  (handle_response):
>    Use apr_status_t handler for discarding data, clear ignored
>    authentication errors. Compose session errors instead of overwriting
>    existing values. Add specific handling for serfs error handling.
>
> Modified:
>   trunk/subversion/libsvn_ra_serf/commit.c
>   trunk/subversion/libsvn_ra_serf/locks.c
>   trunk/subversion/libsvn_ra_serf/options.c
>   trunk/subversion/libsvn_ra_serf/ra_serf.h
>   trunk/subversion/libsvn_ra_serf/update.c
>   trunk/subversion/libsvn_ra_serf/util.c
Hi Bert,

Just an fyi:

In addition to the error handling problem I already fixed in r40377,
is seems this change is also responsible for triggering an assert in
update_tests.py 57 'verify update of deleted locked files'.  This test
was not added until after your change, but on a hunch I checked if the
test would pass with ra_serf back to r38104.  It does, and then fails
with the introduction of r38105.

The test is marked as XFail so assert has gone unnoticed.  I've
attached the test run output for the test using ra_neon, where it
fails "as expected" and from ra_serf where the assert occurs.

This assert can quickly be replicated from the command line by locking
a file, deleting the files containing directory and the updating.

I haven't yet been able to figure out what abour r38105 is causing
this.  I'm out of the office today and will look at it more on Monday,
but in the meantime if you have anything to add...

Thanks,

Paul


Paul

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415110

C:\SVN\src-trunk\Debug\subversion\tests\cmdline>update_tests.py --url http://localhost --http-library neon 57 -v
CMD: svnadmin.exe create "svn-test-work\local_tmp\repos" --bdb-txn-nosync
<TIME = 0.234000>
CMD: svn.exe import -m "Log message for revision 1." "svn-test-work\local_tmp\greekfiles" http://localhost/svn-test-work/local_tmp/repos --config-dir "C:\SVN\sr
c-trunk\Debug\subversion\tests\cmdline\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.328000>
Adding         svn-test-work\local_tmp\greekfiles\A
Adding         svn-test-work\local_tmp\greekfiles\A\B
Adding         svn-test-work\local_tmp\greekfiles\A\B\lambda
Adding         svn-test-work\local_tmp\greekfiles\A\B\E
Adding         svn-test-work\local_tmp\greekfiles\A\B\E\alpha
Adding         svn-test-work\local_tmp\greekfiles\A\B\E\beta
Adding         svn-test-work\local_tmp\greekfiles\A\B\F
Adding         svn-test-work\local_tmp\greekfiles\A\mu
Adding         svn-test-work\local_tmp\greekfiles\A\C
Adding         svn-test-work\local_tmp\greekfiles\A\D
Adding         svn-test-work\local_tmp\greekfiles\A\D\gamma
Adding         svn-test-work\local_tmp\greekfiles\A\D\G
Adding         svn-test-work\local_tmp\greekfiles\A\D\G\pi
Adding         svn-test-work\local_tmp\greekfiles\A\D\G\rho
Adding         svn-test-work\local_tmp\greekfiles\A\D\G\tau
Adding         svn-test-work\local_tmp\greekfiles\A\D\H
Adding         svn-test-work\local_tmp\greekfiles\A\D\H\chi
Adding         svn-test-work\local_tmp\greekfiles\A\D\H\omega
Adding         svn-test-work\local_tmp\greekfiles\A\D\H\psi
Adding         svn-test-work\local_tmp\greekfiles\iota

Committed revision 1.
CMD: svnadmin.exe create "svn-test-work\repositories\update_tests-57" --bdb-txn-nosync
<TIME = 0.109000>
CMD: svnadmin.exe dump svn-test-work\local_tmp\repos | svnadmin.exe load svn-test-work\repositories\update_tests-57 --ignore-uuid
<TIME = 0.016000>
CMD: svn.exe co http://localhost/svn-test-work/repositories/update_tests-57 "svn-test-work\working_copies\update_tests-57" --config-dir "C:\SVN\src-trunk\Debug\
subversion\tests\cmdline\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.891000>
A    svn-test-work\working_copies\update_tests-57\A
A    svn-test-work\working_copies\update_tests-57\A\B
A    svn-test-work\working_copies\update_tests-57\A\B\lambda
A    svn-test-work\working_copies\update_tests-57\A\B\E
A    svn-test-work\working_copies\update_tests-57\A\B\E\alpha
A    svn-test-work\working_copies\update_tests-57\A\B\E\beta
A    svn-test-work\working_copies\update_tests-57\A\B\F
A    svn-test-work\working_copies\update_tests-57\A\mu
A    svn-test-work\working_copies\update_tests-57\A\C
A    svn-test-work\working_copies\update_tests-57\A\D
A    svn-test-work\working_copies\update_tests-57\A\D\gamma
A    svn-test-work\working_copies\update_tests-57\A\D\G
A    svn-test-work\working_copies\update_tests-57\A\D\G\pi
A    svn-test-work\working_copies\update_tests-57\A\D\G\rho
A    svn-test-work\working_copies\update_tests-57\A\D\G\tau
A    svn-test-work\working_copies\update_tests-57\A\D\H
A    svn-test-work\working_copies\update_tests-57\A\D\H\chi
A    svn-test-work\working_copies\update_tests-57\A\D\H\omega
A    svn-test-work\working_copies\update_tests-57\A\D\H\psi
A    svn-test-work\working_copies\update_tests-57\iota
Checked out revision 1.
CMD: svn.exe lock "svn-test-work\working_copies\update_tests-57\iota" "svn-test-work\working_copies\update_tests-57\A\B\E\alpha" --config-dir "C:\SVN\src-trunk\
Debug\subversion\tests\cmdline\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.157000>
'A\B\E\alpha' locked by user 'jrandom'.
'iota' locked by user 'jrandom'.
CMD: svn.exe delete "svn-test-work\working_copies\update_tests-57\iota" "svn-test-work\working_copies\update_tests-57\A\B\E" --config-dir "C:\SVN\src-trunk\Debu
g\subversion\tests\cmdline\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.203000>
D         svn-test-work\working_copies\update_tests-57\iota
D         svn-test-work\working_copies\update_tests-57\A\B\E\alpha
D         svn-test-work\working_copies\update_tests-57\A\B\E\beta
D         svn-test-work\working_copies\update_tests-57\A\B\E
CMD: svn.exe up "svn-test-work\working_copies\update_tests-57" --config-dir "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\local_tmp\config" --p
assword rayjandom --no-auth-cache --username jrandom
<TIME = 0.235000>
   C svn-test-work\working_copies\update_tests-57\A\B\E
D    svn-test-work\working_copies\update_tests-57\A\B\E\alpha
   C svn-test-work\working_copies\update_tests-57\iota
Updated to revision 1.
Summary of conflicts:
  Tree conflicts: 2
=============================================================
Expected '__SVN_ROOT_NODE' and actual '__SVN_ROOT_NODE' in output tree are different!
=============================================================
EXPECTED NODE TO BE:
=============================================================
 * Node name:   __SVN_ROOT_NODE
    Path:       __SVN_ROOT_NODE
    Contents:   None
    Properties: {}
    Attributes: {}
    Children:  None (node is probably a file)
=============================================================
ACTUAL NODE FOUND:
=============================================================
 * Node name:   __SVN_ROOT_NODE
    Path:       __SVN_ROOT_NODE
    Contents:   N/A (node is a directory)
    Properties: {}
    Attributes: {}
    Children:   1
Unequal Types: one Node is a file, the other is a directory
ACTUAL OUTPUT TREE:
svntest.wc.State(wc_dir, {
  'A\B\E'             : Item(status='  ', treeconflict='C'),
  'A\B\E\alpha'       : Item(status='D '),
  'iota'              : Item(status='  ', treeconflict='C'),
})EXCEPTION: SVNTreeUnequal
Traceback (most recent call last):
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\main.py", line 1172, in run
    rc = self.pred.run(sandbox)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\testcase.py", line 86, in run
    return self._delegate.run(sandbox)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\testcase.py", line 146, in run
    return self.func(sandbox)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\update_tests.py", line 4842, in update_deleted_locked_files
    expected_status)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\actions.py", line 697, in run_and_verify_update
    check_props)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\actions.py", line 608, in verify_update
    tree.compare_trees("output", actual_output, output_tree)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\tree.py", line 684, in compare_trees
    raise SVNTreeUnequal
SVNTreeUnequal
XFAIL: update_tests.py 57: verify update of deleted locked files

C:\SVN\src-trunk\Debug\subversion\tests\cmdline>

C:\SVN\src-trunk\Debug\subversion\tests\cmdline>update_tests.py --url http://localhost --http-library serf 57 -v
CMD: svnadmin.exe create "svn-test-work\local_tmp\repos" --bdb-txn-nosync
<TIME = 0.203000>
CMD: svn.exe import -m "Log message for revision 1." "svn-test-work\local_tmp\greekfiles" http://localhost/svn-test-work/local_tmp/repos --config-dir "C:\SVN\sr
c-trunk\Debug\subversion\tests\cmdline\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.296000>
Adding         svn-test-work\local_tmp\greekfiles\A
Adding         svn-test-work\local_tmp\greekfiles\A\B
Adding         svn-test-work\local_tmp\greekfiles\A\B\lambda
Adding         svn-test-work\local_tmp\greekfiles\A\B\E
Adding         svn-test-work\local_tmp\greekfiles\A\B\E\alpha
Adding         svn-test-work\local_tmp\greekfiles\A\B\E\beta
Adding         svn-test-work\local_tmp\greekfiles\A\B\F
Adding         svn-test-work\local_tmp\greekfiles\A\mu
Adding         svn-test-work\local_tmp\greekfiles\A\C
Adding         svn-test-work\local_tmp\greekfiles\A\D
Adding         svn-test-work\local_tmp\greekfiles\A\D\gamma
Adding         svn-test-work\local_tmp\greekfiles\A\D\G
Adding         svn-test-work\local_tmp\greekfiles\A\D\G\pi
Adding         svn-test-work\local_tmp\greekfiles\A\D\G\rho
Adding         svn-test-work\local_tmp\greekfiles\A\D\G\tau
Adding         svn-test-work\local_tmp\greekfiles\A\D\H
Adding         svn-test-work\local_tmp\greekfiles\A\D\H\chi
Adding         svn-test-work\local_tmp\greekfiles\A\D\H\omega
Adding         svn-test-work\local_tmp\greekfiles\A\D\H\psi
Adding         svn-test-work\local_tmp\greekfiles\iota

Committed revision 1.
CMD: svnadmin.exe create "svn-test-work\repositories\update_tests-57" --bdb-txn-nosync
<TIME = 0.234000>
CMD: svnadmin.exe dump svn-test-work\local_tmp\repos | svnadmin.exe load svn-test-work\repositories\update_tests-57 --ignore-uuid
<TIME = 0.016000>
CMD: svn.exe co http://localhost/svn-test-work/repositories/update_tests-57 "svn-test-work\working_copies\update_tests-57" --config-dir "C:\SVN\src-trunk\Debug\
subversion\tests\cmdline\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.828000>
A    svn-test-work\working_copies\update_tests-57\A
A    svn-test-work\working_copies\update_tests-57\A\B
A    svn-test-work\working_copies\update_tests-57\A\B\lambda
A    svn-test-work\working_copies\update_tests-57\A\B\E
A    svn-test-work\working_copies\update_tests-57\A\B\E\alpha
A    svn-test-work\working_copies\update_tests-57\A\B\E\beta
A    svn-test-work\working_copies\update_tests-57\A\mu
A    svn-test-work\working_copies\update_tests-57\A\D
A    svn-test-work\working_copies\update_tests-57\A\D\gamma
A    svn-test-work\working_copies\update_tests-57\A\D\G
A    svn-test-work\working_copies\update_tests-57\A\D\G\pi
A    svn-test-work\working_copies\update_tests-57\A\D\G\rho
A    svn-test-work\working_copies\update_tests-57\A\D\G\tau
A    svn-test-work\working_copies\update_tests-57\A\D\H
A    svn-test-work\working_copies\update_tests-57\A\D\H\chi
A    svn-test-work\working_copies\update_tests-57\A\D\H\omega
A    svn-test-work\working_copies\update_tests-57\A\D\H\psi
A    svn-test-work\working_copies\update_tests-57\iota
A    svn-test-work\working_copies\update_tests-57\A\C
A    svn-test-work\working_copies\update_tests-57\A\B\F
Checked out revision 1.
CMD: svn.exe lock "svn-test-work\working_copies\update_tests-57\iota" "svn-test-work\working_copies\update_tests-57\A\B\E\alpha" --config-dir "C:\SVN\src-trunk\
Debug\subversion\tests\cmdline\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.125000>
'A\B\E\alpha' locked by user 'jrandom'.
'iota' locked by user 'jrandom'.
CMD: svn.exe delete "svn-test-work\working_copies\update_tests-57\iota" "svn-test-work\working_copies\update_tests-57\A\B\E" --config-dir "C:\SVN\src-trunk\Debu
g\subversion\tests\cmdline\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.156000>
D         svn-test-work\working_copies\update_tests-57\iota
D         svn-test-work\working_copies\update_tests-57\A\B\E\alpha
D         svn-test-work\working_copies\update_tests-57\A\B\E\beta
D         svn-test-work\working_copies\update_tests-57\A\B\E
CMD: svn.exe up "svn-test-work\working_copies\update_tests-57" --config-dir "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\local_tmp\config" --p
assword rayjandom --no-auth-cache --username jrandom
CMD: C:\SVN\src-trunk\Debug\subversion\svn\svn.exe up "svn-test-work\working_copies\update_tests-57" --config-dir "C:\SVN\src-trunk\Debug\subversion\tests\cmdli
ne\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom exited with 3
<TIME = 3.266000>
   C svn-test-work\working_copies\update_tests-57\iota
   C svn-test-work\working_copies\update_tests-57\A\B\E
D    svn-test-work\working_copies\update_tests-57\A\B\E\alpha
..\..\..\subversion\libsvn_subr\sqlite.c:277: (apr_err=235000)
svn: In file '..\..\..\subversion\libsvn_wc\wc_db.c' line 4626: assertion failed (work_presence == svn_wc__db_status_normal || work_presence == svn_wc__db_statu
s_not_present || work_presence == svn_wc__db_status_base_deleted)
Traceback (most recent call last):
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\main.py", line 1172, in run
    rc = self.pred.run(sandbox)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\testcase.py", line 86, in run
    return self._delegate.run(sandbox)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\testcase.py", line 146, in run
    return self.func(sandbox)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\update_tests.py", line 4842, in update_deleted_locked_files
    expected_status)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\actions.py", line 682, in run_and_verify_update
    *args)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\main.py", line 599, in run_svn
    *(_with_auth(_with_config_dir(varargs))))
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\main.py", line 367, in run_command
    None, *varargs)
  File "C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svntest\main.py", line 532, in run_command_stdin
    raise Failure
Failure
XFAIL: update_tests.py 57: verify update of deleted locked files

C:\SVN\src-trunk\Debug\subversion\tests\cmdline>

Re: svn commit: r38105 - trunk/subversion/libsvn_ra_serf

by Paul Burba-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Nov 6, 2009 at 9:45 AM, Paul Burba <ptburba@...> wrote:

> On Fri, Jun 19, 2009 at 3:08 PM, Bert Huijben <rhuijben@...> wrote:
>> Author: rhuijben
>> Date: Fri Jun 19 13:08:39 2009
>> New Revision: 38105
>>
>> Log:
>> Make all response handlers in svn_ra_serf return svn_error_t* for
>> a much cleaner error handling. This fixes issue #3375, but some further
>> refactoring would be welcome.
>>
>> * subversion/libsvn_ra_serf/commit.c
>>  (handle_checkout): Updated for new handler prototype and replace abort()
>>    with normal SVN_ERR_MALFUNCTION()
>>  (post_response_handler): Updated for changed prototype.
>>
>> * subversion/libsvn_ra_serf/locks.c
>>  (handle_lock): Updated for new prototype. Return errors where possible.
>>
>> * subversion/libsvn_ra_serf/options.c
>>  (options_response_handler): Updated for new prototype.
>>
>> * subversion/libsvn_ra_serf/ra_serf.h
>>  (svn_ra_serf__response_handler_t): Updated to return svn_error_t * and
>>    remove the temporary session argument.
>>  (svn_ra_serf__handle_status_only, svn_ra_serf__handle_discard_body,
>>   svn_ra_serf__handle_server_error, svn_ra_serf__handle_multistatus_only,
>>   svn_ra_serf__handle_xml_parser): Updated to follow new prototype.
>>  (SVN_SESSION_ERR): Removed macro.
>>
>> * subversion/libsvn_ra_serf/update.c
>>  (error_fetch): Return svn_error_t *
>>  (handle_fetch, handle_stream): Update error handling for new prototype.
>>
>> * subversion/libsvn_ra_serf/util.c
>>  (svn_ra_serf__handle_discard_body,
>>   svn_ra_serf__handle_status_only,
>>   svn_ra_serf__handle_multistatus_only):
>>    Implement new prototype.
>>  (svn_ra_serf__handle_xml_parser):
>>    Implement new prototype. Return errors instead of adding them to
>>    the session. And remove an obsolete test.
>>  (svn_ra_serf__handle_server_error):
>>    Updated for new prototype. Clear ignored errors.
>>  (handle_response):
>>    Use apr_status_t handler for discarding data, clear ignored
>>    authentication errors. Compose session errors instead of overwriting
>>    existing values. Add specific handling for serfs error handling.
>>
>> Modified:
>>   trunk/subversion/libsvn_ra_serf/commit.c
>>   trunk/subversion/libsvn_ra_serf/locks.c
>>   trunk/subversion/libsvn_ra_serf/options.c
>>   trunk/subversion/libsvn_ra_serf/ra_serf.h
>>   trunk/subversion/libsvn_ra_serf/update.c
>>   trunk/subversion/libsvn_ra_serf/util.c
>
> Hi Bert,
>
> Just an fyi:
>
> In addition to the error handling problem I already fixed in r40377,
> is seems this change is also responsible for triggering an assert in
> update_tests.py 57 'verify update of deleted locked files'.  This test
> was not added until after your change, but on a hunch I checked if the
> test would pass with ra_serf back to r38104.  It does, and then fails
> with the introduction of r38105.
>
> The test is marked as XFail so assert has gone unnoticed.  I've
> attached the test run output for the test using ra_neon, where it
> fails "as expected" and from ra_serf where the assert occurs.
>
> This assert can quickly be replicated from the command line by locking
> a file, deleting the files containing directory and the updating.
>
> I haven't yet been able to figure out what abour r38105 is causing
> this.  I'm out of the office today and will look at it more on Monday,
> but in the meantime if you have anything to add...

Hi Bert,

I couldn't get anywhere with this.  Added issue #3532, which has a
reproduction recipe and a few more details
(http://subversion.tigris.org/issues/show_bug.cgi?id=3532).

Paul

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2419116