You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Vlad Skvortsov <vs...@73rus.com> on 2007/02/24 00:31:31 UTC

svn status freezes in working copies with unusual file names

Hi!

I've done a quick search in the issue database, but haven't found 
related issues.

16:39 [vss@tiger] ~/tmp > uname -a
FreeBSD tiger.escuela 6.2-STABLE FreeBSD 6.2-STABLE #1: Sat Jan 27 
16:42:20 PST 2007 root@tiger.escuela:/usr/obj/usr/src/sys/TIGER i386
16:39 [vss@tiger] ~/tmp > svn --version
svn, version 1.4.2 (r22196)
compiled Feb 2 2007, 17:36:41

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet 
(http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles 'http' scheme
- handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme

16:39 [vss@tiger] ~/tmp > cat create.c
#include <unistd.h>
#include <fcntl.h>

int main(void)
{
int fd;

fd = open("\x8b", O_WRONLY | O_CREAT, 0644);
close(fd);
}
16:39 [vss@tiger] ~/tmp > gcc create.c -o ./create
16:39 [vss@tiger] ~/tmp > svnadmin create repo
16:39 [vss@tiger] ~/tmp > svn co file://`pwd`/repo wc
Checked out revision 0.
16:39 [vss@tiger] ~/tmp > cd wc
16:39 [vss@tiger] ~/tmp/wc > ../create
16:40 [vss@tiger] ~/tmp/wc > ls | hexdump -C
00000000 8b 0a |▀.|
00000002
16:40 [vss@tiger] ~/tmp/wc > svn st
^C^C^C
^Z
[1]+ Stopped svn st
16:40 [vss@tiger] ~/tmp/wc >

After issuing the 'status' command svn gets busy, taking almost 100% of CPU.

-- 
Vlad Skvortsov, vss@73rus.com, http://vss.73rus.com

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

Re: svn status freezes in working copies with unusual file names

Posted by Vlad Skvortsov <vs...@73rus.com>.
Malcolm Rowe wrote:
> On Sat, Feb 24, 2007 at 05:26:16AM +0000, Malcolm Rowe wrote:
>   
>> The problem is that we use (destlen == 0) to determine when to increase
>> the size of the buffer, but that doesn't help: there are some cases
>> (like this) where we can have some spare destination buffer, but not
>> enough to encode the next character.
>>     
>
> I found a simple-enough way to do it in r23491/23492.  I'll propose for
> backport to 1.4.x.
>   

Ok, great, thanks!

-- 
Vlad Skvortsov, vss@73rus.com, http://vss.73rus.com

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

Re: svn status freezes in working copies with unusual file names

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Sat, Feb 24, 2007 at 05:26:16AM +0000, Malcolm Rowe wrote:
> The problem is that we use (destlen == 0) to determine when to increase
> the size of the buffer, but that doesn't help: there are some cases
> (like this) where we can have some spare destination buffer, but not
> enough to encode the next character.

I found a simple-enough way to do it in r23491/23492.  I'll propose for
backport to 1.4.x.

Regards,
Malcolm

Re: svn status freezes in working copies with unusual file names

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Fri, Feb 23, 2007 at 08:23:50PM -0800, Vlad Skvortsov wrote:
> Malcolm Rowe wrote:
> >>After issuing the 'status' command svn gets busy, taking almost 100% of 
> >>CPU.
> >
> >I can't reproduce this on trunk.  What's your LANG and related settings?
> >(the output of 'locale').
> 
> LANG=ru_RU.KOI8-R

Okay, I can reproduce this now.  It looks like there's a bug in
libsvn_subr/utf.c:convert_to_stringbuf().  The source character \x8b
will convert (at least according to my apr_xlate_conv_buffer()) to the
UTF-8 sequence \xe2 \x96 \x80 (U+2580 UPPER HALF BLOCK).

We pass apr_xlate_conv_buffer() the source string, source length (1),
and a destination buffer of length 2.  Unfortunately, this isn't long
enough to encode the output, so APR just does nothing.

The problem is that we use (destlen == 0) to determine when to increase
the size of the buffer, but that doesn't help: there are some cases
(like this) where we can have some spare destination buffer, but not
enough to encode the next character.  We should probably identify
this problem (i.e. no error, but there are the same number of source
characters remaining, or something similar), and then boost the destbuf
by some amount.

(Anyone see a straightforward way to achieve that?)

Actually, I'm surprised we don't see this more often.

Regards,
Malcolm

Re: svn status freezes in working copies with unusual file names

Posted by Vlad Skvortsov <vs...@73rus.com>.
Malcolm Rowe wrote:
>> After issuing the 'status' command svn gets busy, taking almost 100% of CPU.
>>
>>     
>
> I can't reproduce this on trunk.  What's your LANG and related settings?
> (the output of 'locale').
>   


20:33 [vss@tiger] ~ > locale
LANG=ru_RU.KOI8-R
LC_CTYPE="ru_RU.KOI8-R"
LC_COLLATE="ru_RU.KOI8-R"
LC_TIME=C
LC_NUMERIC="ru_RU.KOI8-R"
LC_MONETARY="ru_RU.KOI8-R"
LC_MESSAGES="ru_RU.KOI8-R"
LC_ALL=

-- 
Vlad Skvortsov, vss@73rus.com, http://vss.73rus.com

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

Re: svn status freezes in working copies with unusual file names

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Fri, Feb 23, 2007 at 04:31:31PM -0800, Vlad Skvortsov wrote:
> After issuing the 'status' command svn gets busy, taking almost 100% of CPU.
> 

I can't reproduce this on trunk.  What's your LANG and related settings?
(the output of 'locale').

Regards,
Malcolm