You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jonathan Nieder <jr...@gmail.com> on 2012/01/01 23:31:14 UTC

[1.7.x] "svn update" tripping assertion when replacing executable by symlink (Re: [bug?] perl bindings: SVN::Ra->new trips assertion when file:// URL contains a space)

Stefan Sperling wrote:
> On Sat, Dec 17, 2011 at 03:40:03AM -0600, Jonathan Nieder wrote:

>> 	svn: E235000: In file '/home/jrn/src/subversion/subversion/libsvn_wc/update_editor.c' line 1582: assertion failed (action == svn_wc_conflict_action_edit || action == svn_wc_conflict_action_delete || action == svn_wc_conflict_action_replace)
>> 	Aborted (core dumped)
>> 
>
> That looks like the symlink update bug fixed in 1.7.2
>
> Version 1.7.2
> (02 Dec 2011, from /branches/1.7.x)
> http://svn.apache.org/repos/asf/subversion/tags/1.7.2
>    [...]
>    * fix an assertion failure when a symlink is updated (r1186944, -81, -83)

That sounds right.  Unfortunately, I can reproduce it with
branches/1.7.x@1226297.

Some details:

The action is _add.  The test script ran "svn update" after a
typechange (executable -> symlink) for a file named exec.sh.  reason
is _replaced.  The base status is _normal.

"svn log -v" reveals that /exec.sh is already present and already
known to be a symlink.  However, the working copy is not up-to-date
--- the working copy of the file is still an executable.

Call chain:

    main -> svn_client_update4 -> svn_client__update_internal -> update_internal ->
     svn_wc_crawl_revisions -> svn_repos_finish_report -> finish_report ->
     reporter.c::drive -> delta_dirs -> update_entry ->
     update_editor.c::close_file -> check_tree_conflict

More precisely, this is the "local_is_link != incoming_is_link" case
in close_file().

In trunk after r1187692, it's gone.  Instead of calling
check_tree_conflict(), that code path calls create_tree_conflict(),
avoiding trouble.

Thanks and hope that helps,
Jonathan

Re: [1.7.x] "svn update" tripping assertion when replacing executable by symlink (Re: [bug?] perl bindings: SVN::Ra->new trips assertion when file:// URL contains a space)

Posted by Daniel Shahaf <da...@elego.de>.
Jonathan Nieder wrote on Sun, Jan 01, 2012 at 22:38:11 -0600:
> Stefan Sperling wrote:
> > The test suite you mentioned which triggers the assertion failure fixed
> > by your Ra.pm patch is the git-svn test suite, is it? I think our own
> > test suite should be updated to check for this, too.
> 
> Yep, it's t9100-git-svn-basic.sh from the git-svn test suite.  Adding
> tests to the svn test suite to cover these things sounds like a very
> good idea.

Just a reminder that we can't borrow code directly from git-svn due to
licensing issues.

> I'll try to get time to do so and will be happy to review tests if
> someone else starts the work.

Thanks!

Re: svn update: error replacing executable by symlink ("svn: E155010: The node '/tmp/working-copy/exec.sh' was not found.")

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Jan 02, 2012 at 01:29:45AM -0600, Jonathan Nieder wrote:
> Jonathan Nieder wrote:
> 
> > Haven't tried trunk yet.
> [...]
> >	svnadmin create /tmp/test.repo
> >	<test.dump svnadmin load /tmp/test.repo
> >	svn checkout -r4 file:///tmp/test.repo working-copy
> >	cd working-copy
> >	svn update
> >
> > Expected result: executable changes to symlink.
> > Actual result: svn: E155010: The node '/tmp/working-copy/exec.sh' was not found.
> 
> Happens with trunk@1226348, too.

Filed as http://subversion.tigris.org/issues/show_bug.cgi?id=4091

svn update: error replacing executable by symlink ("svn: E155010: The node '/tmp/working-copy/exec.sh' was not found.")

Posted by Jonathan Nieder <jr...@gmail.com>.
Jonathan Nieder wrote:

> Haven't tried trunk yet.
[...]
>	svnadmin create /tmp/test.repo
>	<test.dump svnadmin load /tmp/test.repo
>	svn checkout -r4 file:///tmp/test.repo working-copy
>	cd working-copy
>	svn update
>
> Expected result: executable changes to symlink.
> Actual result: svn: E155010: The node '/tmp/working-copy/exec.sh' was not found.

Happens with trunk@1226348, too.

Re: [1.7.x] "svn update" tripping assertion when replacing executable by symlink (Re: [bug?] perl bindings: SVN::Ra->new trips assertion when file:// URL contains a space)

Posted by Jonathan Nieder <jr...@gmail.com>.
Stefan Sperling wrote:

> Sounds like we should apply your Ra.pm patch and also backport r1187692.

I applied r1187692 on top of the 1.7.x branch here to see how it
fares.  This time:

 $ svn update
 Updating '.':
 svn: E155010: The node '/home/jrn/src/git/t/trash directory.t9100-git-svn-basic/.git/svn/refs/remotes/git-svn/svn-tree/exec.sh' was not found.

Haven't tried trunk yet.  Reproduction recipe below[1].

> The test suite you mentioned which triggers the assertion failure fixed
> by your Ra.pm patch is the git-svn test suite, is it? I think our own
> test suite should be updated to check for this, too.

Yep, it's t9100-git-svn-basic.sh from the git-svn test suite.  Adding
tests to the svn test suite to cover these things sounds like a very
good idea.  I'll try to get time to do so and will be happy to review
tests if someone else starts the work.

Thanks for your thoughtfulness,
Jonathan

[1] Recipe:

	svnadmin create /tmp/test.repo
	<test.dump svnadmin load /tmp/test.repo
	svn checkout -r4 file:///tmp/test.repo working-copy
	cd working-copy
	svn update

Expected result: executable changes to symlink.
Actual result: svn: E155010: The node '/tmp/working-copy/exec.sh' was not found.

Re: [1.7.x] "svn update" tripping assertion when replacing executable by symlink (Re: [bug?] perl bindings: SVN::Ra->new trips assertion when file:// URL contains a space)

Posted by Stefan Sperling <st...@elego.de>.
On Sun, Jan 01, 2012 at 04:31:14PM -0600, Jonathan Nieder wrote:
> Stefan Sperling wrote:
> > On Sat, Dec 17, 2011 at 03:40:03AM -0600, Jonathan Nieder wrote:
> 
> >> 	svn: E235000: In file '/home/jrn/src/subversion/subversion/libsvn_wc/update_editor.c' line 1582: assertion failed (action == svn_wc_conflict_action_edit || action == svn_wc_conflict_action_delete || action == svn_wc_conflict_action_replace)
> >> 	Aborted (core dumped)
> >> 
> >
> > That looks like the symlink update bug fixed in 1.7.2
> >
> > Version 1.7.2
> > (02 Dec 2011, from /branches/1.7.x)
> > http://svn.apache.org/repos/asf/subversion/tags/1.7.2
> >    [...]
> >    * fix an assertion failure when a symlink is updated (r1186944, -81, -83)
> 
> That sounds right.  Unfortunately, I can reproduce it with
> branches/1.7.x@1226297.
> 
> Some details:
> 
> The action is _add.  The test script ran "svn update" after a
> typechange (executable -> symlink) for a file named exec.sh.  reason
> is _replaced.  The base status is _normal.
> 
> "svn log -v" reveals that /exec.sh is already present and already
> known to be a symlink.  However, the working copy is not up-to-date
> --- the working copy of the file is still an executable.
> 
> Call chain:
> 
>     main -> svn_client_update4 -> svn_client__update_internal -> update_internal ->
>      svn_wc_crawl_revisions -> svn_repos_finish_report -> finish_report ->
>      reporter.c::drive -> delta_dirs -> update_entry ->
>      update_editor.c::close_file -> check_tree_conflict
> 
> More precisely, this is the "local_is_link != incoming_is_link" case
> in close_file().
> 
> In trunk after r1187692, it's gone.  Instead of calling
> check_tree_conflict(), that code path calls create_tree_conflict(),
> avoiding trouble.
> 
> Thanks and hope that helps,
> Jonathan

Thanks.
Sounds like we should apply your Ra.pm patch and also backport r1187692.

The test suite you mentioned which triggers the assertion failure fixed
by your Ra.pm patch is the git-svn test suite, is it? I think our own
test suite should be updated to check for this, too.