darcs

Issue 940 show contents [many in parallel] => darcs failed: Error applying hunk to file

Title show contents [many in parallel] => darcs failed: Error applying hunk to file
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, thorkilnaur, tommy, zooko
Assigned To
Topics

Created on 2008-07-01.19:40:41 by zooko, last changed 2017-07-30.23:53:28 by gh.

Messages
msg5156 (view) Author: zooko Date: 2008-07-01.19:40:39
When I run many "darcs query contents" in parallel on the same repository
(because multiple users are clicking on the trac-darcs web site, like
http://allmydata.org ), then I sometimes get this error:  

Running (cd /home/source/darcs/tahoe/server-hashedformat; TZ=UTC darcs query
contents --quiet --match "hash
20080215012747-92b7f-46b20ea5a2f9ea5678b3f901f0818f8f61e9f97a.gz"
"src/allmydata/util/base32.py") failed: 2, darcs failed: Error applying hunk to
file ./src/allmydata/mutable.py : 


If I run the same command on the command-line, or indeed most of the times when
I run it by clicking on the trac-darcs, this doesn't happen, but instead the
darcs query works normally, which suggests that there is a race condition in
which access to the darcs repository is not sufficiently locked.
msg5157 (view) Author: kowey Date: 2008-07-01.20:50:16
Zooko: could you make a script to help reproduce this?  See
http://bugs.darcs.net/issue687
msg5160 (view) Author: droundy Date: 2008-07-02.13:00:17
This looks to me more like a but in withTempDir.  Are you by any chance running
on Windows? It's possible that createDirectory isn't atomic, which would be
problematic... but Eric's right, we'd need some way to reproduce this in order
to fix it.

It is possible that the trouble is lack of atomicity in reading the repository.
 That's something that we ought to fix:  if we only read the hashed_inventory
once, then we are safe from anything but file deletions, and file deletions
would give us a different (and pretty obvious) error.

David
msg8244 (view) Author: kowey Date: 2009-08-18.12:14:12
We need somebody to devise a mechanism by which we can reproduce this bug,
probably some kind of script where we do a show contents and modify the
repository at the same time.
msg10643 (view) Author: kowey Date: 2010-04-03.11:40:02
In issue1811 I tried to reproduce this exact problem, but I got a
different error instead.  No status change otherwise; we still need
somebody to devise a means of reproducing this.  Perhaps it's a good
idea to sort out issue1811 first, though.
History
Date User Action Args
2008-07-01 19:40:41zookocreate
2008-07-01 20:50:18koweysetstatus: unread -> unknown
nosy: + kowey
assignedto: zooko
messages: + msg5157
title: darcs failed: Error applying hunk to file -> show contents [many in parallel] => darcs failed: Error applying hunk to file
2008-07-02 13:00:20droundysetnosy: + droundy
messages: + msg5160
2009-08-06 17:59:13adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, mornfall, simon, thorkilnaur, - droundy
2009-08-06 21:08:48adminsetnosy: - beschmi
2009-08-10 22:21:35adminsetnosy: - markstos, darcs-devel, jast, Serware, mornfall
2009-08-11 00:17:54adminsetnosy: - dagit
2009-08-18 12:14:14koweysetstatus: unknown -> needs-reproduction
nosy: tommy, kowey, zooko, simon, thorkilnaur, dmitry.kurochkin
messages: + msg8244
assignedto: zooko ->
2009-08-25 18:09:03adminsetnosy: + darcs-devel, - simon
2009-08-27 14:26:36adminsetnosy: tommy, kowey, darcs-devel, zooko, thorkilnaur, dmitry.kurochkin
2010-04-03 11:40:03koweysetmessages: + msg10643
2017-07-30 23:53:28ghsetstatus: needs-reproduction -> given-up