darcs

Issue 1226 Error applying hunk to file

Title Error applying hunk to file
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, thorkilnaur, zooko
Assigned To
Topics

Created on 2008-11-13.02:51:51 by zooko, last changed 2009-08-27.14:22:50 by admin.

Messages
msg6660 (view) Author: zooko Date: 2008-11-13.02:51:47
Occasionally when I attempt to run "darcs query contents --quiet -- 
match "hash  
20080827183950-92b7f-1aed175f9fff0fb5d8907ca5c492643d7b8bf788.gz"  
"CREDITS"

I get:

darcs failed:  Error applying hunk to file ./src/allmydata/test/ 
test_system.py

This is on this repository:

http://allmydata.org/source/tahoe/trunk-hashedformat

Oh!  And look at this: "darcs check" finds a truncated line, then  
"darcs repair" says "already consistent, no changes made", then  
"darcs check" finds everything consistent!  Seems like there is a  
sporadic bug in zlib or bytestring usage or so.

source@org:~/darcs/tahoe/trunk-hashedformat-aside$ time darcs check - 
v -v -v -v 2>&1 | tee /tmp/x.log.txt
Checking patch 467/3191 : Mon Apr 16 19:29:57 PDT 2007   
warner@allmydata.com
Checking patch 953/3191 : Fri Jul 13 16:38:25 PDT 2007   
warner@lothar.com
Checking patch 1284/3191 : Wed Sep 19 11:50:13 PDT 2007   
warner@allmydata.com
Checking patch 1623/3191 : Mon Nov 19 11:04:50 PST 2007   
warner@allmydata.com
Checking patch 1730/3191 : Sat Dec 22 08:49:20 PST 2007  zooko@zooko.com
Checking patch 1854/3191
Checking patch 2097/3191 : Wed Feb  6 16:39:03 PST 2008   
warner@allmydata.com
Checking patch 2281/3191 : Mon Mar 10 19:59:30 PDT 2008  zooko@zooko.com
Checking patch 2386/3191 : Sun Apr  6 22:09:56 PDT 2008   
secorp@allmydata.com
Checking patch 2420/3191 : Fri Apr 11 11:11:30 PDT 2008   
secorp@allmydata.com
Checking patch 2564/3191 : Fri May 16 18:04:05 PDT 2008   
secorp@allmydata.com
Checking patch 2846/3191 : Thu Aug  7 11:45:46 PDT 2008   
warner@lothar.com
Checking patch 3006/3191 : Thu Sep 25 14:34:33 PDT 2008  zooko@zooko.com
Reading pristine 366/379
Checking that patch names are unique...
Checking patches...
Looks like we have a difference...
Difference:  hunk ./src/allmydata/test/test_system.py 1886
-        def _got_repair_results(ou
+        def _got_repair_results(out):

Inconsistent repository!

real    0m14.867s
user    0m11.290s
sys     0m2.160s
source@org:~/darcs/tahoe/trunk-hashedformat-aside$ darcs repair
The repository is already consistent, no changes made.
source@org:~/darcs/tahoe/trunk-hashedformat-aside$ time darcs check - 
v -v -v -v 2>&1 | tee /tmp/x.log.txt
Checking patch 448/3191 : Thu Apr 12 19:41:48 PDT 2007   
warner@allmydata.com
Checking patch 914/3191 : Tue Jul 10 15:28:38 PDT 2007   
warner@lothar.com
Checking patch 1271/3191 : Tue Sep 18 15:04:30 PDT 2007  zooko@zooko.com
Checking patch 1590/3191 : Fri Nov  9 16:14:36 PST 2007  zooko@zooko.com
Checking patch 1661/3191 : Mon Dec 10 16:35:08 PST 2007   
warner@lothar.com
Checking patch 1731/3191 : Sat Dec 22 08:49:35 PST 2007  zooko@zooko.com
Checking patch 1774/3191 : Thu Jan  3 14:55:43 PST 2008  zooko@zooko.com
Checking patch 1934/3191
Checking patch 2063/3191 : Tue Feb  5 13:27:41 PST 2008   
warner@allmydata.com
Checking patch 2138/3191 : Wed Feb 13 02:57:19 PST 2008  amber@yukyuk
Checking patch 2271/3191
Checking patch 2382/3191 : Thu Apr  3 16:08:22 PDT 2008   
warner@allmydata.com
Checking patch 2526/3191 : Tue May  6 08:23:36 PDT 2008  zooko@zooko.com
Checking patch 2668/3191 : Tue Jun 10 11:55:28 PDT 2008   
warner@allmydata.com
Checking patch 2863/3191 : Tue Aug 12 13:55:17 PDT 2008   
warner@allmydata.com
Checking patch 3036/3191 : Mon Oct  6 16:16:20 PDT 2008   
warner@allmydata.com
Checking that patch names are unique...
Checking patches...
The repository is consistent!

real    0m17.789s
user    0m11.140s
sys     0m2.210s
msg6661 (view) Author: zooko Date: 2008-11-13.02:53:14
source@org:~/darcs/tahoe/trunk-hashedformat-aside$ darcs --version
2.1.0 (+ 2 patches)
source@org:~/darcs/tahoe/trunk-hashedformat-aside$ darcs --exact-version
darcs compiled on Oct 20 2008, at 14:05:25
# configured Mon Oct 20 13:54:36 PDT 2008
./configure /usr/local/stow/darcs-2.1.0-plus/share/config.site 
/usr/local/stow/darcs-2.1.0-plus/etc/config.site

Context:

[rewrite push_coalesce_patch to avoid calls to lengthFL.
David Roundy <droundy@darcs.net>**20080924161517
 Ignore-this: cf746702c3b1e06ab2d400878e20e305
]

[Optimize clean_hashdir's use of cleanCaches.
Petr Rockai <me@mornfall.net>**20081007191237

 We now only ask cleanCaches to look at files we have unlinked and therefore
 might have caused their cached equivalents to drop link-count to 1. Limits
 number of stats to O(n), n = number of cleaned out files.
]

[TAG 2.1.0
Eric Kow <E.Y.Kow@brighton.ac.uk>**20081009120532]
msg6662 (view) Author: dagit Date: 2008-11-13.03:13:05
Hi Zooko!

Thanks for the bug report.

Do you think you could give us a quick summary of which versions of
darcs you know for sure are giving the buggy behavior?

Thanks!
Jason
msg6663 (view) Author: dagit Date: 2008-11-13.03:13:51
My apologies for reading your posts out of order.  I see you have
given us the info already.
msg6664 (view) Author: zooko Date: 2008-11-13.03:17:03
Yes, it happens reliably if you put "darcs check" in a while loop, but not
always on the same file:

source@org:~/darcs/tahoe/trunk-hashedformat-aside$ while [ $? = 0 ] ; do darcs
check -v -v -v -v -v  ; done
Checking that patch names are unique...
Checking patches...
Unapplicable patch:
Thu Apr 17 13:09:22 PDT 2008  warner@allmydata.com
  * mutable WIP: merge in patches from current trunk

darcs failed:  Error applying hunk to file ./src/allmydata/mutable.py
msg6666 (view) Author: zooko Date: 2008-11-13.03:26:20
Sometimes the check failure takes a few iterations:

source@org:~/darcs/tahoe/trunk-hashedformat-aside$ while [ $? = 0 ] ; do darcs
check -v -v -v -v -v  ; done
Checking that patch names are unique...
Checking patches...
The repository is consistent!
Checking that patch names are unique...
Checking patches...
The repository is consistent!
Checking that patch names are unique...
Checking patches...
The repository is consistent!
Checking that patch names are unique...
Checking patches...
The repository is consistent!
Checking that patch names are unique...
Checking patches...
The repository is consistent!
Checking that patch names are unique...
Checking patches...
The repository is consistent!
Checking that patch names are unique...
Checking patches...
The repository is consistent!
Checking that patch names are unique...
Checking patches...
The repository is consistent!
Checking that patch names are unique...
Checking patches...
The repository is consistent!
Checking that patch names are unique...
Checking patches...
The repository is consistent!
Checking that patch names are unique...
Checking patches...
Unapplicable patch:
Thu Nov  6 20:35:47 PST 2008  warner@allmydata.com
  * checker: add is_recoverable() to checker results, make our stub
immutable-verifier not throw an exception on unrecoverable files, add tests

darcs failed:  Error applying hunk to file ./src/allmydata/test/test_system.py
msg6667 (view) Author: zooko Date: 2008-11-13.03:37:47
Hopefully this has already been fixed!

I upgraded to the current stable version of darcs and the problem hasn't
recurred yet:

zooko@org:~/playground/darcs/darcs-2$ darcs --version
2.1.0pre2 (+ 433 patches)
source@org:~/darcs/tahoe/trunk-hashedformat-aside$ while [ $? = 0 ] ; do darcs
check -v -v -v -v -v  ; done
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
The repository is consistent!
Checking that patch names are unique...
Applying patches...
msg6668 (view) Author: dagit Date: 2008-11-13.03:40:36
On Wed, Nov 12, 2008 at 7:37 PM, Zooko <bugs@darcs.net> wrote:
>
> Zooko <zooko@zooko.com> added the comment:
>
> Hopefully this has already been fixed!
>
> I upgraded to the current stable version of darcs and the problem hasn't
> recurred yet:

It would be weird, but I wonder if this is related to the recent patch
that doesn't allow for writing 0 length bytestrings.

Then the question to me is, why did we start working with 0 length bytestrings?

Thoughts anyone?

Jason
msg6669 (view) Author: zooko Date: 2008-11-13.12:08:33
Yep, I upgraded to 2.1.0pre2 (+ 433 patches) and left that check loop running
overnight and there were no more errors.  What status should I set this ticket
to?  It appears to be a bug in 2.1.0 +2 patches that is fixed in 2.1.0 + 433
patches.
msg8091 (view) Author: kowey Date: 2009-08-11.14:44:01
I'm marking this presumed-dead as Zooko does not appear to be experiencing any
more trouble with this.
History
Date User Action Args
2008-11-13 02:51:51zookocreate
2008-11-13 02:53:17zookosetpriority: bug
nosy: kowey, zooko, dagit, simon, thorkilnaur, dmitry.kurochkin
status: unread -> unknown
messages: + msg6661
2008-11-13 03:13:09dagitsetnosy: kowey, zooko, dagit, simon, thorkilnaur, dmitry.kurochkin
messages: + msg6662
2008-11-13 03:13:54dagitsetnosy: kowey, zooko, dagit, simon, thorkilnaur, dmitry.kurochkin
messages: + msg6663
2008-11-13 03:17:07zookosetnosy: kowey, zooko, dagit, simon, thorkilnaur, dmitry.kurochkin
messages: + msg6664
2008-11-13 03:26:22zookosetnosy: kowey, zooko, dagit, simon, thorkilnaur, dmitry.kurochkin
messages: + msg6666
2008-11-13 03:37:49zookosetnosy: kowey, zooko, dagit, simon, thorkilnaur, dmitry.kurochkin
messages: + msg6667
2008-11-13 03:40:38dagitsetnosy: kowey, zooko, dagit, simon, thorkilnaur, dmitry.kurochkin
messages: + msg6668
2008-11-13 12:08:37zookosetnosy: kowey, zooko, dagit, simon, thorkilnaur, dmitry.kurochkin
messages: + msg6669
2009-08-10 23:51:35adminsetnosy: - dagit
2009-08-11 14:44:04koweysetstatus: unknown -> given-up
nosy: kowey, zooko, simon, thorkilnaur, dmitry.kurochkin
messages: + msg8091
2009-08-25 17:34:29adminsetnosy: + darcs-devel, - simon
2009-08-27 14:22:50adminsetnosy: kowey, darcs-devel, zooko, thorkilnaur, dmitry.kurochkin