darcs

Issue 1894 darcs get --lazy with giant context unapplies all patches

Title darcs get --lazy with giant context unapplies all patches
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List dmitry.kurochkin, kowey, zooko
Assigned To zooko
Topics Hashed

Created on 2010-07-18.06:00:40 by zooko, last changed 2017-07-31.00:01:39 by gh.

Files
File name Uploaded Type Edit Remove
th-ctx kowey, 2010-07-18.16:24:49 application/octet-stream
th-weird-ctx kowey, 2010-07-18.16:25:03 application/octet-stream
Messages
msg11784 (view) Author: zooko Date: 2010-07-18.06:00:40
Here is a buildbot for Tahoe-LAFS, which appears to unapply all patches
after getting them lazily:

http://tahoe-lafs.org/buildbot/builders/zooko%20ootles%20Mac-amd64%2010.4/builds/465/steps/darcs/logs/stdio

It says:

--partial: hashed or darcs-2 repository detected, using --lazy instead
Unapplying 4557 patches
Finished getting.

Also there are no files present in the repository after it is done,
causing the rest of the build to immediately fail:

http://tahoe-lafs.org/buildbot/builders/zooko%20ootles%20Mac-amd64%2010.4/builds/465/steps/show-tool-versions/logs/stdio

This doesn't happen on any other Tahoe-LAFS buildbot even though they
are all doing the same thing. This is with darcs-2.4.4 compiled locally
with ghc-6.10.x.
msg11785 (view) Author: kowey Date: 2010-07-18.07:52:38
How mysterious.  Can you reproduce this by hand on that machine, ie.
outside of the buildbot environment?
msg11789 (view) Author: zooko Date: 2010-07-18.14:42:04
It gets even curioser -- the next time Tahoe-LAFS was built darcs worked
normally on that system:

http://tahoe-lafs.org/buildbot/builders/zooko%20ootles%20Mac-amd64%2010.4/builds/466

Oh, I see that I accidentally upgraded the darcs executable on that
machine. So I guess the *old* executable had this bug and the new one
doesn't. Since that upgrade was an accident, I also accidentally
overwrote the old one, so let's close this ticket as irreproducible.

Hm, I don't see any of the current "Status" settings as right. Could we
add a Status of "irreproducible"? I'll set it to "wont-fix" for now...
msg11790 (view) Author: kowey Date: 2010-07-18.14:48:04
Thanks, we call it presumed-dead (although irreproducible may be clearer)
msg11791 (view) Author: zooko Date: 2010-07-18.14:52:00
Sigh, the *next* time it built it did it wrong again. :-(

http://tahoe-lafs.org/buildbot/builders/zooko%20ootles%20Mac-amd64%2010.4/builds/467
msg11792 (view) Author: zooko Date: 2010-07-18.14:52:46
I don't like calling it presumed-dead. That's a bit presumptious.
Seriously, I don't think we should think of things that we failed to
reproduce as being "probably fixed".
msg11793 (view) Author: zooko Date: 2010-07-18.14:56:16
... and then when I told it to force build it worked:

http://tahoe-lafs.org/buildbot/builders/zooko%20ootles%20Mac-amd64%2010.4/builds/468
msg11794 (view) Author: zooko Date: 2010-07-18.15:14:03
Ah, but notice that "force build" just does a darcs get of a branch:

/usr/local/bin/darcs get --verbose --partial --repo-name build
http://tahoe-lafs.org/source/tahoe-lafs/trunk-hashedformat

Where the other one does a darcs get using a (very large) context.

I suspect there could be a problem with the context file being larger
than expected. Could there be a fixed-size buffer that overflows or
something?

Here is the same version of Tahoe-LAFS as the previous build but
specified by a (large) context instead of just a darcs get from an http
repo:

http://tahoe-lafs.org/buildbot/builders/zooko%20ootles%20Mac-amd64%2010.4/builds/469/steps/darcs/logs/stdio
msg11796 (view) Author: kowey Date: 2010-07-18.16:25:03
OK, so Zooko has a way of reproducing this issue with buildbot, but we
still don't know how to isolate buildbot from this.

I will attach two files: th-ctx and th-weird-ctx

th-ctx is the output of darcs changes --repo
http://tahoe-lafs.org/source/tahoe-lafs/trunk-hashedformat --context

th-weird-ctx is copy and pasted from the view source output of
http://tahoe-lafs.org/buildbot/builders/zooko%20ootles%20Mac-amd64%2010.4/builds/470

The only difference between the two files is that some characters have
been replaced by character references.  In other words th-weird-ctx is a
bad context file.

Note that this is likely just irrelevant, but I'm including it for
completeness.  We have no idea if the is actually the context file used.
 I think it's like not, and that it's completely irrelevant and is just
the result of buildbot doing necessary escaping for inserting into an
HTML page.  

In any case, doing
darcs get http://tahoe-lafs.org/source/tahoe-lafs/trunk-hashedformat
--context /tmp/th-ctx --lazy

correctly complains about patches missing from context (at least with a
post darcs-2.4.98.1 HEAD; darcs-2.4.4 complains about bug in get_extra
which actually is not very exciting)

Also, we've established that this is by no means a "giant" context, as
it has under 260 lines.

I don't think there's any more investigation I can do without Zooko's
help.  I think we need him to procure the context file that's actually
being used by that buildslave.
Attachments
History
Date User Action Args
2010-07-18 06:00:41zookocreate
2010-07-18 07:52:40koweysetstatus: unknown -> waiting-for
assignedto: zooko
topic: + Hashed
messages: + msg11785
nosy: + kowey
2010-07-18 14:42:06zookosetstatus: waiting-for -> wont-fix
messages: + msg11789
2010-07-18 14:48:05koweysetstatus: wont-fix -> given-up
messages: + msg11790
2010-07-18 14:52:01zookosetmessages: + msg11791
2010-07-18 14:52:46zookosetmessages: + msg11792
2010-07-18 14:56:17zookosetmessages: + msg11793
2010-07-18 15:14:04zookosetmessages: + msg11794
2010-07-18 15:27:58koweysetstatus: given-up -> waiting-for
2010-07-18 16:24:49koweysetfiles: + th-ctx
2010-07-18 16:25:04koweysetfiles: + th-weird-ctx
messages: + msg11796
2017-07-31 00:01:39ghsetstatus: waiting-for -> given-up