You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alexander Kitaev <Al...@svnkit.com> on 2009/09/29 13:51:38 UTC
Subversion 1.6.5: segmentation fault on update
Hello,
Attached script fails with Subversion 1.6.5. It performs update that
adds new file in place of a directory that is scheduled for addition and
missing.
--
Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://sqljet.com/ - Java SQLite Library!
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2401634
Re: Subversion 1.6.5: segmentation fault on update
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Sep 29, 2009 at 03:17:23PM +0100, Stefan Sperling wrote:
> On Tue, Sep 29, 2009 at 03:51:38PM +0200, Alexander Kitaev wrote:
> > Hello,
> >
> > Attached script fails with Subversion 1.6.5. It performs update that
> > adds new file in place of a directory that is scheduled for addition and
> > missing.
>
> Thanks, I can reproduce with 1.6.x and will try to fix this.
You have found 2 bugs.
1) One is that we dereferenced fields which may legally be NULL
without checking for NULL...
2) The other is that we do not check WC meta data for existing directories
when adding files. We only check the disk.
With the patch below which fixes 1) (already committed to trunk in r39673)
I can get 1.6.x to exhibit the following behaviour after running your script.
svn: Failed to load properties from disk
svn: Directory 'wc/dir/file.txt' is missing
svn: Directory 'wc/dir/file.txt' is missing
$ svn st wc
! wc
! wc/dir
A wc/dir/file.txt
$ svn revert -R wc
Reverted 'wc/dir/file.txt'
$ svn st wc
! wc
! wc/dir
? wc/dir/file.txt
$ svn up wc
svn: Failed to add file 'wc/dir/file.txt': an unversioned file of the same name
already exists
$ svn st wc
! wc
! wc/dir
? wc/dir/file.txt
$ rm wc/dir/file.txt
$ svn up wc
A wc/dir/file.txt
Updated to revision 2.
$ svn st wc
$
We may want to tweak this further. Trunk has similar behaviour.
Stefan
Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c (revision 39674)
+++ subversion/libsvn_wc/update_editor.c (working copy)
@@ -3518,7 +3518,7 @@
"from a different repository"),
svn_path_local_style(full_path, pool));
- if (!eb->switch_url
+ if (!eb->switch_url && fb->new_URL && entry->url
&& strcmp(fb->new_URL, entry->url) != 0)
return svn_error_createf(
SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2401684
Re: Subversion 1.6.5: segmentation fault on update
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Sep 29, 2009 at 03:51:38PM +0200, Alexander Kitaev wrote:
> Hello,
>
> Attached script fails with Subversion 1.6.5. It performs update that
> adds new file in place of a directory that is scheduled for addition and
> missing.
Thanks, I can reproduce with 1.6.x and will try to fix this.
With trunk I don't get a segfault, just an error:
With trunk:
+ /home/stsp/svn/prefix/svn-trunk/bin/svn up wc
subversion/svn/update-cmd.c:96: (apr_err=145001)
subversion/libsvn_client/update.c:374: (apr_err=145001)
subversion/libsvn_client/update.c:293: (apr_err=145001)
subversion/libsvn_wc/deprecated.c:149: (apr_err=145001)
subversion/libsvn_repos/reporter.c:1263: (apr_err=145001)
subversion/libsvn_repos/reporter.c:1194: (apr_err=145001)
subversion/libsvn_repos/reporter.c:1132: (apr_err=145001)
subversion/libsvn_repos/reporter.c:851: (apr_err=145001)
subversion/libsvn_repos/reporter.c:1132: (apr_err=145001)
subversion/libsvn_repos/reporter.c:873: (apr_err=145001)
subversion/libsvn_repos/reporter.c:576: (apr_err=145001)
subversion/libsvn_wc/update_editor.c:3893: (apr_err=145001)
subversion/libsvn_wc/update_editor.c:3836: (apr_err=145001)
subversion/libsvn_wc/entries.c:1300: (apr_err=145001)
svn: '/tmp/test/wc/dir/file.txt' is not of the right kind
Stefan
--
printf("Eh???/n");
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2401646