You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jens Seidel <je...@users.sourceforge.net> on 2006/09/04 12:58:51 UTC

Re: svn: Checksum mismatch

Hi,

I just want to inform you that my reproducable checksum mismatch error is still
available in 1.4.0 (Release Candidate 5). I failed to reproduce it on a small
code base, also because of errors in svndumpfilter (#1853) which prevents that
I just try it with the affected files only.

Nevertheless I'm sure you want to fix it in 1.4.0 and a developer can maybe
easily imagine what's going on.

On Thu, Aug 03, 2006 at 10:38:30PM +0200, Jens Seidel wrote:
> On Thu, Aug 03, 2006 at 02:31:49PM -0400, Garrett Rooney wrote:
> > On 8/3/06, Jens Seidel <je...@users.sf.net> wrote:

Again: I performed a big merge and after this did a "svn up". I got:

> > >The last update results now in
> > >svn: Checksum mismatch for 'dir/.svn/text-base/file.cc.svn-base'; 
> > >expected: 'bc0c5b04db8bb787c25b95a61e372452', actual: 
> > >'d46738f6464df5a5ec690101b85664bc'
> > >

The following is essential to understand this problem:
$ svn status dir/file.cc
R  +   dir/file.cc

The file dir/file.cc is replaced and the checksum of the wrong file is probably
used for comparison.

> > Usually a checksum error is a result of network problems, hard drive
> > problems, or something going into the .svn/ subdirectories and messing
> > with the files in there.
> 
> It's reproducable with my repository. I also verified that it passes the
> svnadmin verify test.
> 
> So it's very likely a svn problem.

Jens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn: Checksum mismatch

Posted by Jens Seidel <je...@users.sourceforge.net>.
On Mon, Sep 04, 2006 at 07:06:28PM +0200, Ryan Schmidt wrote:
> On Sep 4, 2006, at 17:53, Jens Seidel wrote:
> 
> >$ svn merge svn+ssh://repo@trunk_rev1 svn+ssh://repo@trunk_rev2
> 
> I would have said:
> 
> $ svn merge -r trunk_rev_1:trunk_rev_2 svn+ssh://repo/trunk

Nope, that's not possible because both paths differ:
Exactly:

$ cd branch_wc
$ svn merge
    svn+ssh://jens@host/svn-repository/project/trunk/project@563
    svn+ssh://jens@host/svn-repository/project/trunk/src@688

svn+ssh://jens@host/svn-repository/project/trunk/project was renamed into
src in revision 588.

PS: My statement that the affected replaced file was not added to svn
in the specified range was wrong, it was added in r589.

I will try again to reproduce it using this information ...

Jens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn: Checksum mismatch

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 4, 2006, at 17:53, Jens Seidel wrote:

> $ svn merge svn+ssh://repo@trunk_rev1 svn+ssh://repo@trunk_rev2

I would have said:

$ svn merge -r trunk_rev_1:trunk_rev_2 svn+ssh://repo/trunk


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn: Checksum mismatch

Posted by Jens Seidel <je...@users.sourceforge.net>.
On Mon, Sep 04, 2006 at 04:45:42PM +0200, Erik Huelsmann wrote:
> On 9/4/06, Jens Seidel <je...@users.sf.net> wrote:
> >On Thu, Aug 03, 2006 at 10:38:30PM +0200, Jens Seidel wrote:
> >Again: I performed a big merge and after this did a "svn up". I got:
> >
> >> > >svn: Checksum mismatch for 'dir/.svn/text-base/file.cc.svn-base';
> >> > >expected: 'bc0c5b04db8bb787c25b95a61e372452', actual:
> >> > >'d46738f6464df5a5ec690101b85664bc'
> >
> >The following is essential to understand this problem:
> >$ svn status dir/file.cc
> >R  +   dir/file.cc
> >
> >The file dir/file.cc is replaced and the checksum of the wrong file is 
> >probably
> >used for comparison.
> 
> I doubt that. But it's a bug (in the client), yes.

Using RC4 I got the same error for a different file (it's also possible that
I performed a slightly different action the last time) but it had the same
status "R  +" so I thought it's related.
 
> Though I have 1 question: given that the file is locally replaced,
> what do you expect to happen to any updates you receive for the -now
> deleted- file? (Because I think you're receiving updates for that file
> in your scenario)

Good question :-) I just hope to get the BASE version of the file (at least for
the content, the history might be slightly different). Details:
 
> PS: Could you describe *exactly* what your merge does, then what your
> update is supposed to do, what you expect subversion to do and what
> you're actually observing? (I already saw what you're observing, but
> not what you expect update to do: which files should be updated, which
> ones left alone, any ones removed or added?).

That's very difficult but I can at least explain the main facts:

I have a branch of trunk which contains an additional directory compared to
trunk and only a few changed files. At some time many changes occurred to
trunk.

I manually merged all changes from trunk to the branch in revision r10 by
copying the content of trunk to the branch and manually adapting/restoring the
few modified files in the branch. At this time this behaviour seemed optimal to
me since I was afraid of using svn merge for the really large change which
happend in trunk.

A few commits later I tried to verify my manual merge by checking out r9 of
the branch (the version before my merge) and merging using svn merge:
$ svn merge svn+ssh://repo@trunk_rev1 svn+ssh://repo@trunk_rev2

Now I tried svn update and hoped to get my latest version r10 since all
changes are already contained in the repository.
I found a few existing files, which svn update tried to create, deleted
those duplicated files to be able to continue with svn up until I get the
checksum error for a file.

Now I checked this file again and noticed that it was not added or copied
during trunk_rev1 to trunk_rev2 and r9 to r10 so the "replaced" status seems
to be wrong.

It's really hard to debug it since the code tree is large. svndumpfilter
could be helpful, but it isn't useable at the moment because of the
mentioned bug in it ...

Jens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn: Checksum mismatch

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/28/06, Jens Seidel <je...@users.sf.net> wrote:
> Hi Erik,
>
> what's the status of this bug? Is it already fixed in trunk?
> If not I suggest you open a bug report to ensure we do not forget about
> it ...
>
> On Wed, Sep 06, 2006 at 09:47:15AM -0400, Garrett Rooney wrote:
> > On 9/6/06, Erik Huelsmann <eh...@gmail.com> wrote:
> > >On 9/5/06, Jens Seidel <je...@users.sf.net> wrote:
> > >> I have good news. I was able to create a small example which demonstrates
> > >> the checksum error in Version 1.4.0 (Release Candidate 5).
> > >
> > >I have been looking at svn_wc_crawl_revisions2 which drives the
>
> [snip]
>
> > >But, in case of replaced paths, I think that the driver should call
> > >reporter->delete_path() for replace-no-history and
> > >reporter->link_path() for replace-with-history schedules.
> >
> > That seems reasonable to me, although I don't know nearly enough about
> > how this stuff works, so take that with a grain of salt...
> >
> > >There are some oddities wrt replaced paths a bit further down too (why
> > >don't we ->link_path() for replace-with-history scheduled files
> > >everywhere? Using set_path implies we want to receive updates from the
> > >file in the current location...)
> >
> > It does seem like replacements should be handled specially there...

I committed a fix to trunk in r21720.

> Jens

HTH,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn: Checksum mismatch

Posted by Jens Seidel <je...@users.sourceforge.net>.
Hi Erik, 

what's the status of this bug? Is it already fixed in trunk?
If not I suggest you open a bug report to ensure we do not forget about
it ...

On Wed, Sep 06, 2006 at 09:47:15AM -0400, Garrett Rooney wrote:
> On 9/6/06, Erik Huelsmann <eh...@gmail.com> wrote:
> >On 9/5/06, Jens Seidel <je...@users.sf.net> wrote:
> >> I have good news. I was able to create a small example which demonstrates
> >> the checksum error in Version 1.4.0 (Release Candidate 5).
> >
> >I have been looking at svn_wc_crawl_revisions2 which drives the

[snip]

> >But, in case of replaced paths, I think that the driver should call
> >reporter->delete_path() for replace-no-history and
> >reporter->link_path() for replace-with-history schedules.
> 
> That seems reasonable to me, although I don't know nearly enough about
> how this stuff works, so take that with a grain of salt...
> 
> >There are some oddities wrt replaced paths a bit further down too (why
> >don't we ->link_path() for replace-with-history scheduled files
> >everywhere? Using set_path implies we want to receive updates from the
> >file in the current location...)
> 
> It does seem like replacements should be handled specially there...

Jens

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn: Checksum mismatch

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 9/6/06, Erik Huelsmann <eh...@gmail.com> wrote:
> On 9/5/06, Jens Seidel <je...@users.sf.net> wrote:
> > Hi,
> >
> > I have good news. I was able to create a small example which demonstrates
> > the checksum error in Version 1.4.0 (Release Candidate 5).
>
> > I attached a script which shows this error, here is the output:
> >
> > + mkdir /tmp/svn.test
> > + cd /tmp/svn.test
> > + svnadmin create repos
> > + R=file:///tmp/svn.test/repos
> > + svn co file:///tmp/svn.test/repos wc
> > Checked out revision 0.
> > + cd wc
> > + mkdir trunk
> > + mkdir trunk/project
> > + echo 'file 1'
> > + svn add trunk
> > A         trunk
> > A         trunk/project
> > A         trunk/project/file1.old
> > + svn ci '-mInitial version'
> > Adding         trunk
> > Adding         trunk/project
> > Adding         trunk/project/file1.old
> > Transmitting file data .
> > Committed revision 1.
> > + svn move '-mCreated file1' file:///tmp/svn.test/repos/trunk/project/file1.old file:///tmp/svn.test/repos/trunk/project/file1
> >
> > Committed revision 2.
> > + svn copy '-mCreated branch' file:///tmp/svn.test/repos/trunk file:///tmp/svn.test/repos/branch
> >
> > Committed revision 3.
> > + svn move '-mMoved trunk to trunk.old' file:///tmp/svn.test/repos/trunk file:///tmp/svn.test/repos/trunk.old
> >
> > Committed revision 4.
> > + svn mkdir '-mCreated new trunk' file:///tmp/svn.test/repos/trunk
> >
> > Committed revision 5.
> > + svn copy '-mRestore old trunk' -r 1 file:///tmp/svn.test/repos/trunk/project file:///tmp/svn.test/repos/trunk/src
> >
> > Committed revision 6.
> > + svn up
> > D    trunk
> > A    trunk
> > A    trunk/src
> > A    trunk/src/file1.old
> > A    trunk.old
> > A    trunk.old/project
> > A    trunk.old/project/file1
> > A    branch
> > A    branch/project
> > A    branch/project/file1
> > Updated to revision 6.
> > + echo 'file 1 (new)'
> > + svn add trunk/src/file1
> > A         trunk/src/file1
> > + svn ci '-mAdded file1'
> > Adding         trunk/src/file1
> > Transmitting file data .
> > Committed revision 7.
> > + echo 'file 1 (new)'
> > + svn ci '-mManual sync against trunk' branch/project/file1
> > Sending        branch/project/file1
> > Transmitting file data .
> > Committed revision 8.
> > + oldRev=7
> > + cd branch
> > + svn up -r 7
> > U    project/file1
> > Updated to revision 7.
> > + cd project
> > + svn merge file:///tmp/svn.test/repos/trunk/project@3 file:///tmp/svn.test/repos/trunk/src@7
> > D    file1
> > A    file1
> > A    file1.old
> > + svn update
> > svn: Checksum mismatch for '.svn/text-base/file1.svn-base'; expected: 'e243bb39c844b3543a7726576c869caf', actual: '0ad777f8c28bdfc866607b87f653b5e8'
>
>
> I have been looking at svn_wc_crawl_revisions2 which drives the
> revision reporter for updates. I must assume the working copy isn't
> marked as incomplete, so that the crawler reports the entire working
> copy. It contains this segment:
>
>            if (report_everything)
>              {
>                /* Report the file unconditionally, one way or another. */
>                if (strcmp(current_entry->url, this_url) != 0)
>                  SVN_ERR(reporter->link_path(report_baton, this_path,
>                                              current_entry->url,
>                                              current_entry->revision,
>                                              FALSE, current_entry->lock_token,
>                                              iterpool));
>                else
>                  SVN_ERR(reporter->set_path(report_baton, this_path,
>                                             current_entry->revision,
>                                             FALSE, current_entry->lock_token,
>                                             iterpool));
>              }
>
> But, in case of replaced paths, I think that the driver should call
> reporter->delete_path() for replace-no-history and
> reporter->link_path() for replace-with-history schedules.

That seems reasonable to me, although I don't know nearly enough about
how this stuff works, so take that with a grain of salt...

> There are some oddities wrt replaced paths a bit further down too (why
> don't we ->link_path() for replace-with-history scheduled files
> everywhere? Using set_path implies we want to receive updates from the
> file in the current location...)

It does seem like replacements should be handled specially there...

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn: Checksum mismatch

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/5/06, Jens Seidel <je...@users.sf.net> wrote:
> Hi,
>
> I have good news. I was able to create a small example which demonstrates
> the checksum error in Version 1.4.0 (Release Candidate 5).

> I attached a script which shows this error, here is the output:
>
> + mkdir /tmp/svn.test
> + cd /tmp/svn.test
> + svnadmin create repos
> + R=file:///tmp/svn.test/repos
> + svn co file:///tmp/svn.test/repos wc
> Checked out revision 0.
> + cd wc
> + mkdir trunk
> + mkdir trunk/project
> + echo 'file 1'
> + svn add trunk
> A         trunk
> A         trunk/project
> A         trunk/project/file1.old
> + svn ci '-mInitial version'
> Adding         trunk
> Adding         trunk/project
> Adding         trunk/project/file1.old
> Transmitting file data .
> Committed revision 1.
> + svn move '-mCreated file1' file:///tmp/svn.test/repos/trunk/project/file1.old file:///tmp/svn.test/repos/trunk/project/file1
>
> Committed revision 2.
> + svn copy '-mCreated branch' file:///tmp/svn.test/repos/trunk file:///tmp/svn.test/repos/branch
>
> Committed revision 3.
> + svn move '-mMoved trunk to trunk.old' file:///tmp/svn.test/repos/trunk file:///tmp/svn.test/repos/trunk.old
>
> Committed revision 4.
> + svn mkdir '-mCreated new trunk' file:///tmp/svn.test/repos/trunk
>
> Committed revision 5.
> + svn copy '-mRestore old trunk' -r 1 file:///tmp/svn.test/repos/trunk/project file:///tmp/svn.test/repos/trunk/src
>
> Committed revision 6.
> + svn up
> D    trunk
> A    trunk
> A    trunk/src
> A    trunk/src/file1.old
> A    trunk.old
> A    trunk.old/project
> A    trunk.old/project/file1
> A    branch
> A    branch/project
> A    branch/project/file1
> Updated to revision 6.
> + echo 'file 1 (new)'
> + svn add trunk/src/file1
> A         trunk/src/file1
> + svn ci '-mAdded file1'
> Adding         trunk/src/file1
> Transmitting file data .
> Committed revision 7.
> + echo 'file 1 (new)'
> + svn ci '-mManual sync against trunk' branch/project/file1
> Sending        branch/project/file1
> Transmitting file data .
> Committed revision 8.
> + oldRev=7
> + cd branch
> + svn up -r 7
> U    project/file1
> Updated to revision 7.
> + cd project
> + svn merge file:///tmp/svn.test/repos/trunk/project@3 file:///tmp/svn.test/repos/trunk/src@7
> D    file1
> A    file1
> A    file1.old
> + svn update
> svn: Checksum mismatch for '.svn/text-base/file1.svn-base'; expected: 'e243bb39c844b3543a7726576c869caf', actual: '0ad777f8c28bdfc866607b87f653b5e8'


I have been looking at svn_wc_crawl_revisions2 which drives the
revision reporter for updates. I must assume the working copy isn't
marked as incomplete, so that the crawler reports the entire working
copy. It contains this segment:

           if (report_everything)
             {
               /* Report the file unconditionally, one way or another. */
               if (strcmp(current_entry->url, this_url) != 0)
                 SVN_ERR(reporter->link_path(report_baton, this_path,
                                             current_entry->url,
                                             current_entry->revision,
                                             FALSE, current_entry->lock_token,
                                             iterpool));
               else
                 SVN_ERR(reporter->set_path(report_baton, this_path,
                                            current_entry->revision,
                                            FALSE, current_entry->lock_token,
                                            iterpool));
             }

But, in case of replaced paths, I think that the driver should call
reporter->delete_path() for replace-no-history and
reporter->link_path() for replace-with-history schedules.

There are some oddities wrt replaced paths a bit further down too (why
don't we ->link_path() for replace-with-history scheduled files
everywhere? Using set_path implies we want to receive updates from the
file in the current location...)

Opinions?

bye,


Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn: Checksum mismatch

Posted by Jens Seidel <je...@users.sourceforge.net>.
Hi,

I have good news. I was able to create a small example which demonstrates
the checksum error in Version 1.4.0 (Release Candidate 5).

PS: This remembers me that the version string (or date) in --version is not
translatable. Please fix this as well.

The error message is different in 1.3.0 (r17949):
D    file1
A    file1
svn: Working copy path 'file1' does not exist in repository 

Instead of
svn: Checksum mismatch for '.svn/text-base/file1.svn-base'; expected ...

On Mon, Sep 04, 2006 at 04:45:42PM +0200, Erik Huelsmann wrote:
> On 9/4/06, Jens Seidel <je...@users.sf.net> wrote:
> >I just want to inform you that my reproducable checksum mismatch error is 
> >still available in 1.4.0 (Release Candidate 5). 
> 
> PS: Could you describe *exactly* what your merge does, then what your
> update is supposed to do, what you expect subversion to do and what
> you're actually observing? (I already saw what you're observing, but
> not what you expect update to do: which files should be updated, which
> ones left alone, any ones removed or added?).

I attached a script which shows this error, here is the output:

+ mkdir /tmp/svn.test
+ cd /tmp/svn.test
+ svnadmin create repos
+ R=file:///tmp/svn.test/repos
+ svn co file:///tmp/svn.test/repos wc
Checked out revision 0.
+ cd wc
+ mkdir trunk
+ mkdir trunk/project
+ echo 'file 1'
+ svn add trunk
A         trunk
A         trunk/project
A         trunk/project/file1.old
+ svn ci '-mInitial version'
Adding         trunk
Adding         trunk/project
Adding         trunk/project/file1.old
Transmitting file data .
Committed revision 1.
+ svn move '-mCreated file1' file:///tmp/svn.test/repos/trunk/project/file1.old file:///tmp/svn.test/repos/trunk/project/file1

Committed revision 2.
+ svn copy '-mCreated branch' file:///tmp/svn.test/repos/trunk file:///tmp/svn.test/repos/branch

Committed revision 3.
+ svn move '-mMoved trunk to trunk.old' file:///tmp/svn.test/repos/trunk file:///tmp/svn.test/repos/trunk.old

Committed revision 4.
+ svn mkdir '-mCreated new trunk' file:///tmp/svn.test/repos/trunk

Committed revision 5.
+ svn copy '-mRestore old trunk' -r 1 file:///tmp/svn.test/repos/trunk/project file:///tmp/svn.test/repos/trunk/src

Committed revision 6.
+ svn up
D    trunk
A    trunk
A    trunk/src
A    trunk/src/file1.old
A    trunk.old
A    trunk.old/project
A    trunk.old/project/file1
A    branch
A    branch/project
A    branch/project/file1
Updated to revision 6.
+ echo 'file 1 (new)'
+ svn add trunk/src/file1
A         trunk/src/file1
+ svn ci '-mAdded file1'
Adding         trunk/src/file1
Transmitting file data .
Committed revision 7.
+ echo 'file 1 (new)'
+ svn ci '-mManual sync against trunk' branch/project/file1
Sending        branch/project/file1
Transmitting file data .
Committed revision 8.
+ oldRev=7
+ cd branch
+ svn up -r 7
U    project/file1
Updated to revision 7.
+ cd project
+ svn merge file:///tmp/svn.test/repos/trunk/project@3 file:///tmp/svn.test/repos/trunk/src@7
D    file1
A    file1
A    file1.old
+ svn update
svn: Checksum mismatch for '.svn/text-base/file1.svn-base'; expected: 'e243bb39c844b3543a7726576c869caf', actual: '0ad777f8c28bdfc866607b87f653b5e8'

PS: The scripts needs a long time, 9.8s!

Jens

Re: svn: Checksum mismatch

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/4/06, Jens Seidel <je...@users.sf.net> wrote:
> Hi,
>
> I just want to inform you that my reproducable checksum mismatch error is still
> available in 1.4.0 (Release Candidate 5). I failed to reproduce it on a small
> code base, also because of errors in svndumpfilter (#1853) which prevents that
> I just try it with the affected files only.
>
> Nevertheless I'm sure you want to fix it in 1.4.0 and a developer can maybe
> easily imagine what's going on.
>
> On Thu, Aug 03, 2006 at 10:38:30PM +0200, Jens Seidel wrote:
> > On Thu, Aug 03, 2006 at 02:31:49PM -0400, Garrett Rooney wrote:
> > > On 8/3/06, Jens Seidel <je...@users.sf.net> wrote:
>
> Again: I performed a big merge and after this did a "svn up". I got:
>
> > > >The last update results now in
> > > >svn: Checksum mismatch for 'dir/.svn/text-base/file.cc.svn-base';
> > > >expected: 'bc0c5b04db8bb787c25b95a61e372452', actual:
> > > >'d46738f6464df5a5ec690101b85664bc'
> > > >
>
> The following is essential to understand this problem:
> $ svn status dir/file.cc
> R  +   dir/file.cc
>
> The file dir/file.cc is replaced and the checksum of the wrong file is probably
> used for comparison.

I doubt that. But it's a bug (in the client), yes.

Though I have 1 question: given that the file is locally replaced,
what do you expect to happen to any updates you receive for the -now
deleted- file? (Because I think you're receiving updates for that file
in your scenario)

bye,

Erik.

PS: Could you describe *exactly* what your merge does, then what your
update is supposed to do, what you expect subversion to do and what
you're actually observing? (I already saw what you're observing, but
not what you expect update to do: which files should be updated, which
ones left alone, any ones removed or added?).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org