You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Sperling <st...@elego.de> on 2020/04/01 09:13:32 UTC
Re: [PATCH] svnadmin build-repcache command
On Tue, Mar 31, 2020 at 12:48:21PM +0200, Stefan Sperling wrote:
> On Tue, Mar 31, 2020 at 01:35:54PM +0300, Denis Kovalchuk wrote:
> > > This has caused a test failure on the windows buildbot:
> > >
> > > https://ci.apache.org/builders/svn-windows-local/builds/3392/steps/Test%20fsfs%2Blocal/logs/faillog
> > >
> > > Can you please check what we should do about that?
> >
> > I missed SkipUnless test decorator. The build_repcache() test should be skipped
> > if read_rep_cache() is not supported by Python-SQLite version.
> >
> > I have attached a patch that fixes this.
>
> Thank you for the quick fix. Applied in r1875925.
There's another test failure related to this patch.
This time on Mac OS X:
https://ci.apache.org/builders/svn-x64-macosx-fsfs-v6/builds/2941/steps/Test%20ra_local%2Bfsfs-v6/logs/faillog
The svnadmin build-repcache test runs into a checksum mismatch.
Any ideas?
Re: [PATCH] svnadmin build-repcache command
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Apr 01, 2020 at 10:26:40AM +0000, Daniel Shahaf wrote:
> If you haven't already, re-run that builder using subversion-bot to
> check if the bug is reproducible.
Can you please do this yourself when you find time for it?
You provide a lot of good ideas, while at the same time asking others
to implement them. That's fine, of course, it never hurts to ask.
I guess you simply do not have the time to carry out your idea and
then come back to the list and report the result.
But I don't have enough time on my hands either to carry out most of
your ideas, so please don't be offended when I refuse.
I've already done a code review to try to pin-poin the bug. I've added
the docstrings you asked for in the other thread. I'm doing the RM work.
All of this happens on the side to other stuff I have to do.
Re: [PATCH] svnadmin build-repcache command
Posted by Nathan Hartman <ha...@gmail.com>.
On Wed, Apr 1, 2020 at 3:54 PM Stefan Sperling <st...@elego.de> wrote:
> On Wed, Apr 01, 2020 at 10:50:12PM +0300, Denis Kovalchuk wrote:
> > Because the root cause of the problem was unclear to me I investigated
> it.
> >
> > svn_fs_fs__fixup_expanded_size() function exists due to issue SVN-4554
> [1].
> > In this case, fsfs-v6 repository created with older binaries contains a
> > representation with "expanded size" field written on disk as 0. The fsfs
> code
> > assumes that this field has resolved value after the fixup, but because
> of the
> > missing calls it did not and contained 0. It caused the read
> representation
> > contents to be truncated to size of 0. In this case it is a directory
> > representation
> > and so the call to svn_fs_fs__rep_contents_dir() resulted in error. The
> error is
> > a checksum mismatch error where the actual checksum is a checksum of the
> > (truncated) empty string and the expected checksum is the one recorded in
> > the revision file.
> >
> > Thanks for your help and the fix!
> >
> > [1] https://issues.apache.org/jira/browse/SVN-4554
> >
>
> Great. Thank you, too, for following up and explaining the problem!
>
> I will again wait a while to see if voting in STATUS happens over the
> next few days. My opinion is that, ideally, we should get all current
> entries in STATUS reviewed and merged, and then roll the -rc2 release.
This is great news! Thank you and kudos to stsp for fixing the issue and to
Denis for tracking it down and explaining it.
Just FYI, I intend to vote soon, after I do a little bit more testing.
Thanks again to all,
Nathan
Re: [PATCH] svnadmin build-repcache command
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Apr 01, 2020 at 10:50:12PM +0300, Denis Kovalchuk wrote:
> > > This seems to fix it.
> > >
> > > I don't understand why this is necessary but the regular code path for
> > > access to node revision data in fsfs also seems to apply this always.
> > >
> > > Can an fsfs expert confirm?
> >
> > Since this fix looks reasonable to me and we're trying to move the release
> > process forward, I have decided to commit the change and have added it to
> > the backport nomination as well.
>
> I had the same diff in my working copy and can confirm it fixes the problem.
>
> Because the root cause of the problem was unclear to me I investigated it.
>
> svn_fs_fs__fixup_expanded_size() function exists due to issue SVN-4554 [1].
> In this case, fsfs-v6 repository created with older binaries contains a
> representation with "expanded size" field written on disk as 0. The fsfs code
> assumes that this field has resolved value after the fixup, but because of the
> missing calls it did not and contained 0. It caused the read representation
> contents to be truncated to size of 0. In this case it is a directory
> representation
> and so the call to svn_fs_fs__rep_contents_dir() resulted in error. The error is
> a checksum mismatch error where the actual checksum is a checksum of the
> (truncated) empty string and the expected checksum is the one recorded in
> the revision file.
>
> Thanks for your help and the fix!
>
> [1] https://issues.apache.org/jira/browse/SVN-4554
>
Great. Thank you, too, for following up and explaining the problem!
I will again wait a while to see if voting in STATUS happens over the
next few days. My opinion is that, ideally, we should get all current
entries in STATUS reviewed and merged, and then roll the -rc2 release.
Re: [PATCH] svnadmin build-repcache command
Posted by Denis Kovalchuk <de...@visualsvn.com>.
> > This seems to fix it.
> >
> > I don't understand why this is necessary but the regular code path for
> > access to node revision data in fsfs also seems to apply this always.
> >
> > Can an fsfs expert confirm?
>
> Since this fix looks reasonable to me and we're trying to move the release
> process forward, I have decided to commit the change and have added it to
> the backport nomination as well.
I had the same diff in my working copy and can confirm it fixes the problem.
Because the root cause of the problem was unclear to me I investigated it.
svn_fs_fs__fixup_expanded_size() function exists due to issue SVN-4554 [1].
In this case, fsfs-v6 repository created with older binaries contains a
representation with "expanded size" field written on disk as 0. The fsfs code
assumes that this field has resolved value after the fixup, but because of the
missing calls it did not and contained 0. It caused the read representation
contents to be truncated to size of 0. In this case it is a directory
representation
and so the call to svn_fs_fs__rep_contents_dir() resulted in error. The error is
a checksum mismatch error where the actual checksum is a checksum of the
(truncated) empty string and the expected checksum is the one recorded in
the revision file.
Thanks for your help and the fix!
[1] https://issues.apache.org/jira/browse/SVN-4554
Re: [PATCH] svnadmin build-repcache command
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Apr 01, 2020 at 06:40:27PM +0200, Stefan Sperling wrote:
> This seems to fix it.
>
> I don't understand why this is necessary but the regular code path for
> access to node revision data in fsfs also seems to apply this always.
>
> Can an fsfs expert confirm?
Since this fix looks reasonable to me and we're trying to move the release
process forward, I have decided to commit the change and have added it to
the backport nomination as well.
> Index: subversion/libsvn_fs_fs/fs_fs.c
> ===================================================================
> --- subversion/libsvn_fs_fs/fs_fs.c (revision 1875921)
> +++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
> @@ -2393,6 +2393,10 @@ reindex_node(svn_fs_t *fs,
> SVN_ERR(svn_fs_fs__read_noderev(&noderev, rev_file->stream,
> pool, pool));
>
> + /* Make sure EXPANDED_SIZE has the correct value for every rep. */
> + SVN_ERR(svn_fs_fs__fixup_expanded_size(fs, noderev->data_rep, pool));
> + SVN_ERR(svn_fs_fs__fixup_expanded_size(fs, noderev->prop_rep, pool));
> +
> /* First reindex sub-directory to match write_final_rev() behavior. */
> if (noderev->kind == svn_node_dir)
> {
>
>
Re: [PATCH] svnadmin build-repcache command
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Apr 01, 2020 at 06:25:12PM +0200, Stefan Sperling wrote:
> On Wed, Apr 01, 2020 at 11:45:04AM -0400, Nathan Hartman wrote:
> > On Wed, Apr 1, 2020 at 8:05 AM Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> > > The failure is 100% reproducible with «./svnadmin_tests.py
> > > --fs-type=fsfs --fsfs-version=6 74» on Linux.
> >
> > I'm experimenting with this also. So far I have nothing definitive but
> > I can confirm that it is 100% reproducible on Linux with the above
> > invocation.
>
> Also on OpenBSD. Thanks Daniel for identifying a way to reproduce it :)
This seems to fix it.
I don't understand why this is necessary but the regular code path for
access to node revision data in fsfs also seems to apply this always.
Can an fsfs expert confirm?
Index: subversion/libsvn_fs_fs/fs_fs.c
===================================================================
--- subversion/libsvn_fs_fs/fs_fs.c (revision 1875921)
+++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
@@ -2393,6 +2393,10 @@ reindex_node(svn_fs_t *fs,
SVN_ERR(svn_fs_fs__read_noderev(&noderev, rev_file->stream,
pool, pool));
+ /* Make sure EXPANDED_SIZE has the correct value for every rep. */
+ SVN_ERR(svn_fs_fs__fixup_expanded_size(fs, noderev->data_rep, pool));
+ SVN_ERR(svn_fs_fs__fixup_expanded_size(fs, noderev->prop_rep, pool));
+
/* First reindex sub-directory to match write_final_rev() behavior. */
if (noderev->kind == svn_node_dir)
{
Re: [PATCH] svnadmin build-repcache command
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Apr 01, 2020 at 11:45:04AM -0400, Nathan Hartman wrote:
> On Wed, Apr 1, 2020 at 8:05 AM Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> > The failure is 100% reproducible with «./svnadmin_tests.py
> > --fs-type=fsfs --fsfs-version=6 74» on Linux.
>
> I'm experimenting with this also. So far I have nothing definitive but
> I can confirm that it is 100% reproducible on Linux with the above
> invocation.
Also on OpenBSD. Thanks Daniel for identifying a way to reproduce it :)
Re: [PATCH] svnadmin build-repcache command
Posted by Nathan Hartman <ha...@gmail.com>.
On Wed, Apr 1, 2020 at 8:05 AM Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> The failure is 100% reproducible with «./svnadmin_tests.py
> --fs-type=fsfs --fsfs-version=6 74» on Linux.
I'm experimenting with this also. So far I have nothing definitive but
I can confirm that it is 100% reproducible on Linux with the above
invocation. I tried removing r1875918 just to see whether the "INSERT
OR IGNORE" optimization was contributing something, but the result is
the same with or without that. I find it odd that this error occurs
while building the rep cache (as opposed to an error where the built
rep cache is different than the original one).
I have to do some other things now but I'll continue looking at this
some more later.
Thanks,
Nathan
Re: [PATCH] svnadmin build-repcache command
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Shahaf wrote on Wed, 01 Apr 2020 10:26 +0000:
> Stefan Sperling wrote on Wed, 01 Apr 2020 12:18 +0200:
> > On Wed, Apr 01, 2020 at 09:59:41AM +0000, Daniel Shahaf wrote:
> > > Stefan Sperling wrote on Wed, 01 Apr 2020 11:13 +0200:
> > > > https://ci.apache.org/builders/svn-x64-macosx-fsfs-v6/builds/2941/steps/Test%20ra_local%2Bfsfs-v6/logs/faillog
> > > >
> > > > The svnadmin build-repcache test runs into a checksum mismatch.
> > > >
> > > > Any ideas?
> > >
> > > Note the "actual" checksum is the checksum of the empty string.
> > >
> >
> > Oh, interesting point :)
> >
> > I cannot see what's wrong. An empty stream is returned from
> > svn_fs_fs__get_contents() if the passed in rep pointer is NULL,
> > but I don't think that's where the bug is.
> >
> > Perhaps the failing test really read empty rep content for some reason?
> > I'm now running this test in a loop, but I could not reproduce the
> > failure yet.
>
> Are you running your local tests using the same configuration the
> builder uses? (Even without looking up the build script, the builder's
> name suggests it uses FSFS f6, i.e., --server-minor-version.)
>
The failure is 100% reproducible with «./svnadmin_tests.py
--fs-type=fsfs --fsfs-version=6 74» on Linux.
Let's wait to hear from Denis.
> If you haven't already, re-run that builder using subversion-bot to
> check if the bug is reproducible.
>
> The error trace goes through cache.c; SVN_X_DOES_NOT_MARK_THE_SPOT in
> notes/knobs can be used to rule out svn_cache__t as the cause.
Re: [PATCH] svnadmin build-repcache command
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Stefan Sperling wrote on Wed, 01 Apr 2020 12:18 +0200:
> On Wed, Apr 01, 2020 at 09:59:41AM +0000, Daniel Shahaf wrote:
> > Stefan Sperling wrote on Wed, 01 Apr 2020 11:13 +0200:
> > > https://ci.apache.org/builders/svn-x64-macosx-fsfs-v6/builds/2941/steps/Test%20ra_local%2Bfsfs-v6/logs/faillog
> > >
> > > The svnadmin build-repcache test runs into a checksum mismatch.
> > >
> > > Any ideas?
> >
> > Note the "actual" checksum is the checksum of the empty string.
> >
>
> Oh, interesting point :)
>
> I cannot see what's wrong. An empty stream is returned from
> svn_fs_fs__get_contents() if the passed in rep pointer is NULL,
> but I don't think that's where the bug is.
>
> Perhaps the failing test really read empty rep content for some reason?
> I'm now running this test in a loop, but I could not reproduce the
> failure yet.
Are you running your local tests using the same configuration the
builder uses? (Even without looking up the build script, the builder's
name suggests it uses FSFS f6, i.e., --server-minor-version.)
If you haven't already, re-run that builder using subversion-bot to
check if the bug is reproducible.
The error trace goes through cache.c; SVN_X_DOES_NOT_MARK_THE_SPOT in
notes/knobs can be used to rule out svn_cache__t as the cause.
Re: [PATCH] svnadmin build-repcache command
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Apr 01, 2020 at 09:59:41AM +0000, Daniel Shahaf wrote:
> Stefan Sperling wrote on Wed, 01 Apr 2020 11:13 +0200:
> > https://ci.apache.org/builders/svn-x64-macosx-fsfs-v6/builds/2941/steps/Test%20ra_local%2Bfsfs-v6/logs/faillog
> >
> > The svnadmin build-repcache test runs into a checksum mismatch.
> >
> > Any ideas?
>
> Note the "actual" checksum is the checksum of the empty string.
>
Oh, interesting point :)
I cannot see what's wrong. An empty stream is returned from
svn_fs_fs__get_contents() if the passed in rep pointer is NULL,
but I don't think that's where the bug is.
Perhaps the failing test really read empty rep content for some reason?
I'm now running this test in a loop, but I could not reproduce the
failure yet.
Re: [PATCH] svnadmin build-repcache command
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Stefan Sperling wrote on Wed, 01 Apr 2020 11:13 +0200:
> https://ci.apache.org/builders/svn-x64-macosx-fsfs-v6/builds/2941/steps/Test%20ra_local%2Bfsfs-v6/logs/faillog
>
> The svnadmin build-repcache test runs into a checksum mismatch.
>
> Any ideas?
Note the "actual" checksum is the checksum of the empty string.
Re: [PATCH] svnadmin build-repcache command
Posted by Denis Kovalchuk <de...@visualsvn.com>.
> There's another test failure related to this patch.
>
> This time on Mac OS X:
> https://ci.apache.org/builders/svn-x64-macosx-fsfs-v6/builds/2941/steps/Test%20ra_local%2Bfsfs-v6/logs/faillog
>
> The svnadmin build-repcache test runs into a checksum mismatch.
>
> Any ideas?
I started to handle this problem and plan to report the result.
Regards,
Denis Kovalchuk