You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Colin JN Breame <co...@breame.net> on 2005/05/25 03:04:37 UTC

svn hangs in certain directories

Hello,

I've recently upgraded to version 1.1.4 and i'm having a few problems.

Everything is ok when I do:
$ svn ls svn://my_host/

But when I do:
$ svn ls svn://my_host/directory_with_a_file_in

svn hangs.  This only appears to happen in directories with files in.  e.g. 
everything is ok when listing directories that only contain directories.  
Other functions are affected (including checkout).

The server is windows based and is using svnserve.  No authenication is used.  
The client is linux based.  Both server and client are using 1.1.4.

The hang appears to result from an indefinite block when reading from the 
server (ra_svn_get_file).  As the server never returns a response.  Maybe 
there should be a timeout condition rather than just hanging...

I've attached the communications between client and server.  Before i ran the 
commands I used svnadmin recover on the repository.

Any ideas?

 -- Colin

Re: svn hangs in certain directories

Posted by Colin JN Breame <co...@breame.net>.
On Friday 27 May 2005 00:03, Molle Bestefich wrote:
> Colin JN Breame wrote:
> > Molle Bestefich wrote:
> > > I think it would be more useful for Subversion to have a progress
> > > counter, that would probably have shown you that it actually
> > > progressed with sending the file, only at a very low rate....
> > > If it really had hung, it would also show you that..
> >
> > A timeout would be useful here; if the client does not receive any
> > response from the server after x seconds (when expecting a response),
> > report an error and fail.
>
> I don't see how a timeout provides anything that a progress counter does
> not.

They address two different requirements.  A progress counter is there to give 
feedback to the user.  A timeout is there to fail as it is an error for the 
server not to respond.

>
> Further, a timeout actually potentially *introduces* problems, since
> you as a developer have no idea what kind of connection (bandwidth)
> that users are going to want to run Subversion over.

I'm not sure that it does.  Almost all applications that communicate over a 
network (such as webbrowser, email client, etc.) deal with the case "I sent a 
request to the server and it did not respond in a timely fashion".

It is only reasonable to assume that if the server hasn't responded after x 
seconds (make that 10^1000 if you like), then it probably never will, so fail 
and report an error. e.g. server did not respond to request.

>
> David Summers wrote:
> > I don't *THINK* my problem could be an MTU but I guess it is possible.
>
> Well, just in case it is, try sniffing the svn traffic and have a look-see.
> Look for TCP retransmits,  there's a good probability that they will
> show up if you have a network-related problem.
>
> Gimme a ping off-list if you want a short intro on how to do the above
> on <insert system here>.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn hangs in certain directories

Posted by Molle Bestefich <mo...@gmail.com>.
Colin JN Breame wrote:
> Molle Bestefich wrote:
> > I think it would be more useful for Subversion to have a progress
> > counter, that would probably have shown you that it actually
> > progressed with sending the file, only at a very low rate....
> > If it really had hung, it would also show you that..

> A timeout would be useful here; if the client does not receive any response
> from the server after x seconds (when expecting a response), report an error
> and fail.

I don't see how a timeout provides anything that a progress counter does not.

Further, a timeout actually potentially *introduces* problems, since
you as a developer have no idea what kind of connection (bandwidth)
that users are going to want to run Subversion over.


David Summers wrote:
> I don't *THINK* my problem could be an MTU but I guess it is possible.

Well, just in case it is, try sniffing the svn traffic and have a look-see.
Look for TCP retransmits,  there's a good probability that they will
show up if you have a network-related problem.

Gimme a ping off-list if you want a short intro on how to do the above
on <insert system here>.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: svn hangs in certain directories

Posted by Joshua Varner <jl...@gmail.com>.
On 5/26/05, Greg Hudson <gh...@mit.edu> wrote:
> On Thu, 2005-05-26 at 22:56 +0100, Colin JN Breame wrote:
> > A timeout would be useful here; if the client does not receive any response
> > from the server after x seconds (when expecting a response), report an error
> > and fail.
> 
> We've had some pretty nasty problems in the past on the ra_dav side
> because our default timeout used to be too short, at I think 120
> seconds.  Sometimes a big operation really does take that long.  So I'm
> not a big fan of timeouts.  Even if we could find the magic number which
> always means it's time to give up, it still doesn't tell the user
> whether it's a server problem or a network problem; all it does is help
> rule out a client-side problem.
> 
> Which is not to say that it's not a good idea to provide users of some
> indication that things are progressing.  We do that in some cases and
> not others.  In many of the cases where we don't, we'd have to extend
> our protocols to provide progress indications; it could get to be a lot
> of work.

Why not add it as a parameter that can be configured for different
repositories. With no default you get the current behavior, but for
someone like me who has a work machine that only accesses svn on our
internal network, we can set a timeout that would reflect the lower
network latency.

I don't know how much effort it would be to add, but it would allow
both of your positions and  give the clients more control.
Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: svn hangs in certain directories

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2005-05-26 at 22:56 +0100, Colin JN Breame wrote:
> A timeout would be useful here; if the client does not receive any response 
> from the server after x seconds (when expecting a response), report an error 
> and fail.

We've had some pretty nasty problems in the past on the ra_dav side
because our default timeout used to be too short, at I think 120
seconds.  Sometimes a big operation really does take that long.  So I'm
not a big fan of timeouts.  Even if we could find the magic number which
always means it's time to give up, it still doesn't tell the user
whether it's a server problem or a network problem; all it does is help
rule out a client-side problem.

Which is not to say that it's not a good idea to provide users of some
indication that things are progressing.  We do that in some cases and
not others.  In many of the cases where we don't, we'd have to extend
our protocols to provide progress indications; it could get to be a lot
of work.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn hangs in certain directories

Posted by Colin JN Breame <co...@breame.net>.
On Thursday 26 May 2005 22:14, Molle Bestefich wrote:

> I think it would be more useful for Subversion to have a progress
> counter, that would probably have shown you that it actually
> progressed with sending the file, only at a very low rate....
> If it really had hung, it would also show you that..

The problem is that it is impossible to tell from the users p.o.v. whether svn 
has hung (because of a bug) or hung (because svn is waiting indefinitely for 
the server to respond and there are network errors).

A timeout would be useful here; if the client does not receive any response 
from the server after x seconds (when expecting a response), report an error 
and fail.

Looking at libsvn_ra_svn/marshal.c readbuf_input:

/* Always block for reading. */
  if (conn->sock && conn->block_handler)
    apr_socket_timeout_set(conn->sock, -1);

According to the documentation, apr_socket_timeout_set will:

	t < 0  -- read and write calls block

I'm not sure what block_handler does (or if it is set), but it might be worth 
changing this.

 -- Colin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn hangs in certain directories

Posted by "Ph. Marek" <ph...@bmlv.gv.at>.
On Thursday 26 May 2005 23:49, David Summers wrote:
> Thanks for the info.
>
> I don't *THINK* my problem could be an MTU but I guess it is possible.
>
> If I see it happen again or it becomes a problem I'll definitely check
> that out.
I've seen some problems with (brain-dead) firewalls and bigger packets.

It happened like this:
- WinXP sends a packet with DF (don't fragment) set
- other point returns data, which has DF _not_ set, and gets 
  fragmented.
- Firewall discards packets, because they don't match locally
  generated flags.

Maybe check the firewall and/or substitute with another.


Regards,

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn hangs in certain directories

Posted by Molle Bestefich <mo...@gmail.com>.
Colin JN Breame wrote:
> I've changed my broadband router to use an MTU of 1400, and this seems to have
> solved the problem.  It might be related to MTU discovery, although I'm not
> sure at the moment.
> 
> In the end it turned out not to be subversion related.

> p.s. i still think that svn could use a timeout error message rather than just
> hanging.

You could start by using a sniffer to look at what's happening behind
the scenes.
Large slowdowns like you see are often caused by network problems.

I think it would be more useful for Subversion to have a progress
counter, that would probably have shown you that it actually
progressed with sending the file, only at a very low rate....
If it really had hung, it would also show you that..

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: svn hangs in certain directories

Posted by David Summers <da...@summersoft.fay.ar.us>.
Thanks for the info.

I don't *THINK* my problem could be an MTU but I guess it is possible.

If I see it happen again or it becomes a problem I'll definitely check 
that out.


Thanks!
    - David

On Thu, 26 May 2005, Colin JN Breame wrote:

> On Wednesday 25 May 2005 06:01, David Summers wrote:
>> I have also seen this behaviour, but I've not been able to
>> classify/predict when it will happen.  It happened 10+ times a week or so
>> ago but I've not seen it since.
>>
>>     - David
>>
>
> Seems that this was caused by a problem with MTU!
>
> I've changed my broadband router to use an MTU of 1400, and this seems to have
> solved the problem.  It might be related to MTU discovery, although I'm not
> sure at the moment.
>
> In the end it turned out not to be subversion related.
>
> -- Colin
>
> p.s. i still think that svn could use a timeout error message rather than just
> hanging.
>
>> On Wed, 25 May 2005, Colin JN Breame wrote:
>>> I've recently upgraded to version 1.1.4 and i'm having a few problems.
>>>
>>> Everything is ok when I do:
>>> $ svn ls svn://my_host/
>>>
>>> But when I do:
>>> $ svn ls svn://my_host/directory_with_a_file_in
>>>
>>> svn hangs.  This only appears to happen in directories with files in.
>>> e.g. everything is ok when listing directories that only contain
>>> directories. Other functions are affected (including checkout).
>>>
>>> The server is windows based and is using svnserve.  No authenication is
>>> used. The client is linux based.  Both server and client are using 1.1.4.
>>>
>>> The hang appears to result from an indefinite block when reading from the
>>> server (ra_svn_get_file).  As the server never returns a response.  Maybe
>>> there should be a timeout condition rather than just hanging...
>>>
>>> I've attached the communications between client and server.  Before i ran
>>> the commands I used svnadmin recover on the repository.
>>>
>>> Any ideas?
>>>
>>> -- Colin
>>
>> --
>> David Wayne Summers        "Linux: Because reboots are for hardware
>> upgrades!" david@summersoft.fay.ar.us PGP Key:
>> http://summersoft.fay.ar.us/~david/pgp.txt PGP Key fingerprint =  0B44 B118
>> 85CC F4EC 7021  1ED4 1516 5B78 E320 2001
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

--
David Wayne Summers        "Linux: Because reboots are for hardware upgrades!"
david@summersoft.fay.ar.us PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  0B44 B118 85CC F4EC 7021  1ED4 1516 5B78 E320 2001

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn hangs in certain directories

Posted by Colin JN Breame <co...@breame.net>.
On Wednesday 25 May 2005 06:01, David Summers wrote:
> I have also seen this behaviour, but I've not been able to
> classify/predict when it will happen.  It happened 10+ times a week or so
> ago but I've not seen it since.
>
>     - David
>

Seems that this was caused by a problem with MTU!

I've changed my broadband router to use an MTU of 1400, and this seems to have 
solved the problem.  It might be related to MTU discovery, although I'm not 
sure at the moment.

In the end it turned out not to be subversion related.

 -- Colin

p.s. i still think that svn could use a timeout error message rather than just 
hanging.

> On Wed, 25 May 2005, Colin JN Breame wrote:
> > I've recently upgraded to version 1.1.4 and i'm having a few problems.
> >
> > Everything is ok when I do:
> > $ svn ls svn://my_host/
> >
> > But when I do:
> > $ svn ls svn://my_host/directory_with_a_file_in
> >
> > svn hangs.  This only appears to happen in directories with files in. 
> > e.g. everything is ok when listing directories that only contain
> > directories. Other functions are affected (including checkout).
> >
> > The server is windows based and is using svnserve.  No authenication is
> > used. The client is linux based.  Both server and client are using 1.1.4.
> >
> > The hang appears to result from an indefinite block when reading from the
> > server (ra_svn_get_file).  As the server never returns a response.  Maybe
> > there should be a timeout condition rather than just hanging...
> >
> > I've attached the communications between client and server.  Before i ran
> > the commands I used svnadmin recover on the repository.
> >
> > Any ideas?
> >
> > -- Colin
>
> --
> David Wayne Summers        "Linux: Because reboots are for hardware
> upgrades!" david@summersoft.fay.ar.us PGP Key:
> http://summersoft.fay.ar.us/~david/pgp.txt PGP Key fingerprint =  0B44 B118
> 85CC F4EC 7021  1ED4 1516 5B78 E320 2001

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn hangs in certain directories

Posted by David Summers <da...@summersoft.fay.ar.us>.
I have also seen this behaviour, but I've not been able to 
classify/predict when it will happen.  It happened 10+ times a week or so 
ago but I've not seen it since.

    - David

On Wed, 25 May 2005, Colin JN Breame wrote:

> I've recently upgraded to version 1.1.4 and i'm having a few problems.
>
> Everything is ok when I do:
> $ svn ls svn://my_host/
>
> But when I do:
> $ svn ls svn://my_host/directory_with_a_file_in
>
> svn hangs.  This only appears to happen in directories with files in.  e.g.
> everything is ok when listing directories that only contain directories.
> Other functions are affected (including checkout).
>
> The server is windows based and is using svnserve.  No authenication is used.
> The client is linux based.  Both server and client are using 1.1.4.
>
> The hang appears to result from an indefinite block when reading from the
> server (ra_svn_get_file).  As the server never returns a response.  Maybe
> there should be a timeout condition rather than just hanging...
>
> I've attached the communications between client and server.  Before i ran the
> commands I used svnadmin recover on the repository.
>
> Any ideas?
>
> -- Colin
>

--
David Wayne Summers        "Linux: Because reboots are for hardware upgrades!"
david@summersoft.fay.ar.us PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  0B44 B118 85CC F4EC 7021  1ED4 1516 5B78 E320 2001

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org