darcs

Issue 1207 pull waits, trying to talk to each server in _darcs/prefs/repos and _darcs/prefs/sources

Title pull waits, trying to talk to each server in _darcs/prefs/repos and _darcs/prefs/sources
Priority bug Status given-up
Milestone Resolved in 2.8.0
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, mornfall, thorkilnaur, twb, zooko
Assigned To
Topics Performance

Created on 2008-11-06.19:42:57 by zooko, last changed 2017-07-31.00:03:54 by gh.

Messages
msg6610 (view) Author: zooko Date: 2008-11-06.19:42:54
This was originally reported in issue1153, but it is obscured by a handful of
other issues.  This bug report is to draw attention to this specific issue:

If you have a server in your _darcs/prefs/sources which does not respond to ssh
connections, darcs will block for something on the order of 60 seconds.  Here's
how to reproduce this problem:

1.  Do a "darcs pull -a $REMOTE_REPO" which pulls a few patches and see how long
it takes.
2.  Do "darcs oblit --all --last=$X" to remove a few patches so that we can
benchmark how long it takes to repull them.
3.  rm _darcs/prefs/repos
4.  rm _darcs/prefs/sources
5.  /bin/rm -rf ~/.darcs/cache
6.  echo "nobody@192.168.3.2:nodir" > _darcs/prefs/repos
7.  Do the same "darcs pull -a $REMOTE_REPO" that you did earlier.  The bug is
that it takes many minutes -- something 60 seconds for every patch that it pulls.

Hmmmm.  Now I can't reproduce this bug.  :-(

I'm sure that I had this bug reliably before, and I'm sure that I saw it last
week when I was travelling at a security conference.  In both cases, the
solution is to clear out _darcs/prefs/repos and _darcs/prefs/source so that
servers which are currently unreachable are not tried.

There are detailed logs showing this bug happening over on issue1153.  See for
example "out2.txt" in which darcs pauses for long periods of time trying to
connect to the non-existent 192.168.1.147 address.

I wonder why I can't reproduce it?  Argh.
msg7204 (view) Author: twb Date: 2009-01-26.08:01:16
On Thu, Nov 06, 2008 at 08:42:54AM +0000, Zooko wrote:
> If you have a server in your _darcs/prefs/sources which does not respond to ssh
> connections, darcs will block for something on the order of 60 seconds.  Here's
> how to reproduce this problem:
> 
> [...]
> 6.  echo "nobody@192.168.3.2:nodir" > _darcs/prefs/repos
> 7.  Do the same "darcs pull -a $REMOTE_REPO" that you did earlier.  The bug is
> that it takes many minutes -- something 60 seconds for every patch that it pulls.
> 
> Hmmmm.  Now I can't reproduce this bug.  :-(

Could the problem be that your DNS is/was busted, and trying to
resolve foo.org in the original repos/source file was timing out?
That would explain why you can't reproduce it with an IP.
msg8231 (view) Author: kowey Date: 2009-08-18.09:19:09
As I mentioned on issue1153, here is the relevant plan from Darcs hacking sprint
#2 (thanks to Petr):

 * check for availability of repo root (that we're fetching from), and if not
available
 * remote: ignore the entry for this darcs (we want to keep the entry in case
it's just transient error)

    "WARNING: can't use <foo> please remove it from _darcs/prefs/sources"

 * long term? on timeout: disable all sources from a given host for this darcs
(URL, Ssh [transient])
msg12191 (view) Author: kowey Date: 2010-08-15.18:21:54
I think this has been resolved with Adolfo's Google Summer of Code work
in issue1599
History
Date User Action Args
2008-11-06 19:42:57zookocreate
2009-01-26 08:01:22twbsetstatus: unread -> unknown
nosy: + twb
messages: + msg7204
2009-08-10 23:50:47adminsetnosy: - dagit
2009-08-18 09:19:13koweysetstatus: unknown -> needs-implementation
nosy: + mornfall
topic: + Performance
messages: + msg8231
2009-08-18 09:19:52koweysettopic: + Target-2.4
nosy: kowey, zooko, simon, twb, thorkilnaur, dmitry.kurochkin, mornfall
2009-08-25 17:33:48adminsetnosy: + darcs-devel, - simon
2009-08-27 14:26:10adminsetnosy: kowey, darcs-devel, zooko, twb, thorkilnaur, dmitry.kurochkin, mornfall
2009-11-15 16:15:24tux_rockersettopic: - Target-2.4
2010-08-15 18:21:55koweysetmessages: + msg12191
resolvedin: 2.8.0
2017-07-31 00:03:54ghsetstatus: needs-implementation -> given-up