Re: svn log xml hangs and produces too many logentry closing tags

2021-08-17 Thread Attila


> On 9 Aug 2021, at 11:48, Daniel Sahlberg  wrote:
> 
> Den lör 17 juli 2021 kl 15:02 skrev Attila  >:
> On 14 Jul 2021, at 21:42, Nathan Hartman  > wrote:
>> 
>> On Tue, Jul 13, 2021 at 5:49 PM Attila > > wrote:
>>> 
>>> Hi
>>> 
>>> I have a problem getting the svn log in a branch after sync-merging a 
>>> commit from trunk.
>>> This commit in trunk is a merge of an old and complex branch with many 
>>> commits.
>>> 
>>> The client accessing the repository over svn:// url.
>>> (paths and text is redacted)
>>> The  head revision is: 10801
>>> 
>>> When I run the following command on the client (in the working copy), it 
>>> prints a long partial xml-log output, then hangs.
>>> /usr/bin/svn log --xml -g -v -r 10701:HEAD /path/to/branch-wc
>>> 
>>> When observing in "top", the command uses no visible CPU resources on hang. 
>>> (I waited ca. 2 minutes)
>>> The hanging command does mot exits on CTRL-c, it does not exits on "kill 
>>> -TERM pid", I have to send "kill -KILL pid" to terminate it.
>>> 
>>> When I run the command with strace it hangs at read(4,
>>> ...SNIP...
>>> read(4, " ( ) ( 4:file true false ) ) ( 1"..., 16384) = 16384
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d83000
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d81000
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d7f000
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d7d000
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d7b000
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d79000
>>> read(4, "***/-***_redacted_*_"..., 16384) = 14773
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d77000
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d75000
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d73000
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d71000
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d6f000
>>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>>> 0x7f63f1d6d000
>>> read(4,
>>> 
>>> When I observe the server, there is a CPU activity at the begin, but when 
>>> the client hangs, the server seems to be in idle.
>>> Just a corresponding svnserve process is there with no visible cpu usage.
>>> In svnserve.log is nothing relevant to see.
>>> 
>>> The svnserve command is:
>>> svnserve -d -r /path/to/repositories \
>>> --log-file=/var/log/svnserve.log \
>>> --memory-cache-size 1024 \
>>> --cache-txdeltas yes \
>>> --cache-fulltexts yes
>>> 
>>> When I try to get the xml-log on the server with the corresponding file:// 
>>> repository URL:
>>> /usr/bin/svn log --xml -g -v -r 10701:HEAD 
>>> file://path/to/local/repositories/project/branch <>
>>> The command finishes in ca 5-10 seconds and I get the xml output, but the 
>>> output has a way too many  lines.
>>> 
>>> There are 1217 occurrences of the string “>> of the string "" in the output xml.
>>> There are several thousand lines of  in a row in many places in 
>>> repeated blocks.
>>> 
>>> Details:
>>> Client and Server OS:
>>> Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1+deb10u1 (2020-04-27) x86_64 
>>> GNU/Linux
>>> 
>>> The repository is ca. 4 GB.
>>> Running "svnadmin verify" on the server founds no errors.
>>> I have no other problems with the server, checkout and commit works normal.
>>> 
>>> svn --version
>>> svn, version 1.10.4 (r1850624)
>>>   compiled Feb 10 2021, 20:15:45 on x86_64-pc-linux-gnu
>>> 
>>> Copyright (C) 2019 The Apache Software Foundation.
>>> This software consists of contributions made by many people;
>>> see the NOTICE file for more information.
>>> Subversion is open source software, see http://subversion.apache.org/ 
>>> 
>>> 
>>> The following repository access (RA) modules are available:
>>> 
>>> * ra_svn : Module for accessing a repository using the svn network protocol.
>>>  - with Cyrus SASL authentication
>>>  - handles 'svn' scheme
>>> * ra_local : Module for accessing a repository on local disk.
>>>  - handles 'file' scheme
>>> * ra_serf : Module for accessing a repository via WebDAV protocol using 
>>> serf.
>>>  - using serf 1.3.9 (compiled with 1.3.9)
>>>  - handles 'http' scheme
>>>  - handles 'https' scheme
>>> 
>>> The following authentication credential caches are available:
>>> 
>>> * Plaintext cache in /home/username/.subversion
>>> * Gnome Keyring
>>> * GPG-Agent
>>> * KWallet (KDE)
>> 
>> 
>> Hello Attila,
>> 
>> Thanks for this detailed explanation. There are quite a few important
>> clues here.
>> 
>

Re: svn log xml hangs and produces too many logentry closing tags

2021-08-09 Thread Daniel Sahlberg
Den lör 17 juli 2021 kl 15:02 skrev Attila :

> On 14 Jul 2021, at 21:42, Nathan Hartman  wrote:
>
>
> On Tue, Jul 13, 2021 at 5:49 PM Attila  wrote:
>
>
> Hi
>
> I have a problem getting the svn log in a branch after sync-merging a
> commit from trunk.
> This commit in trunk is a merge of an old and complex branch with many
> commits.
>
> The client accessing the repository over svn:// url.
> (paths and text is redacted)
> The  head revision is: 10801
>
> When I run the following command on the client (in the working copy), it
> prints a long partial xml-log output, then hangs.
> /usr/bin/svn log --xml -g -v -r 10701:HEAD /path/to/branch-wc
>
> When observing in "top", the command uses no visible CPU resources on
> hang. (I waited ca. 2 minutes)
> The hanging command does mot exits on CTRL-c, it does not exits on "kill
> -TERM pid", I have to send "kill -KILL pid" to terminate it.
>
> When I run the command with strace it hangs at read(4,
> ...SNIP...
> read(4, " ( ) ( 4:file true false ) ) ( 1"..., 16384) = 16384
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d83000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d81000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d7f000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d7d000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d7b000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d79000
> read(4, "***/-***_redacted_*_"..., 16384) = 14773
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d77000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d75000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d73000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d71000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d6f000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f63f1d6d000
> read(4,
>
> When I observe the server, there is a CPU activity at the begin, but when
> the client hangs, the server seems to be in idle.
> Just a corresponding svnserve process is there with no visible cpu usage.
> In svnserve.log is nothing relevant to see.
>
> The svnserve command is:
> svnserve -d -r /path/to/repositories \
> --log-file=/var/log/svnserve.log \
> --memory-cache-size 1024 \
> --cache-txdeltas yes \
> --cache-fulltexts yes
>
> When I try to get the xml-log on the server with the corresponding file://
> repository URL:
> /usr/bin/svn log --xml -g -v -r 10701:HEAD
> file://path/to/local/repositories/project/branch
> The command finishes in ca 5-10 seconds and I get the xml output, but the
> output has a way too many  lines.
>
> There are 1217 occurrences of the string “ of the string "" in the output xml.
> There are several thousand lines of  in a row in many places in
> repeated blocks.
>
> Details:
> Client and Server OS:
> Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1+deb10u1 (2020-04-27) x86_64
> GNU/Linux
>
> The repository is ca. 4 GB.
> Running "svnadmin verify" on the server founds no errors.
> I have no other problems with the server, checkout and commit works normal.
>
> svn --version
> svn, version 1.10.4 (r1850624)
>   compiled Feb 10 2021, 20:15:45 on x86_64-pc-linux-gnu
>
> Copyright (C) 2019 The Apache Software Foundation.
> This software consists of contributions made by many people;
> see the NOTICE file for more information.
> Subversion is open source software, see http://subversion.apache.org/
>
> The following repository access (RA) modules are available:
>
> * ra_svn : Module for accessing a repository using the svn network
> protocol.
>  - with Cyrus SASL authentication
>  - handles 'svn' scheme
> * ra_local : Module for accessing a repository on local disk.
>  - handles 'file' scheme
> * ra_serf : Module for accessing a repository via WebDAV protocol using
> serf.
>  - using serf 1.3.9 (compiled with 1.3.9)
>  - handles 'http' scheme
>  - handles 'https' scheme
>
> The following authentication credential caches are available:
>
> * Plaintext cache in /home/username/.subversion
> * Gnome Keyring
> * GPG-Agent
> * KWallet (KDE)
>
>
>
> Hello Attila,
>
> Thanks for this detailed explanation. There are quite a few important
> clues here.
>
> To help narrow down the search for the culprit: Are you able to run
> the same 'svn log' command against the same working copy, but without
> the '--xml', and get a correct output in a reasonable amount of time?
>
>
> Hi Nathan
>
> thanks for the suggestions.
>
> The command without the --xml parameter hangs on the client and works on
> the server.
> The text output on the server seems be ok.
> This suggests that the hang and the closing xml tags are t

Re: svn log xml hangs and produces too many logentry closing tags

2021-07-17 Thread Attila
On 14 Jul 2021, at 21:42, Nathan Hartman  wrote:
> 
> On Tue, Jul 13, 2021 at 5:49 PM Attila  > wrote:
>> 
>> Hi
>> 
>> I have a problem getting the svn log in a branch after sync-merging a commit 
>> from trunk.
>> This commit in trunk is a merge of an old and complex branch with many 
>> commits.
>> 
>> The client accessing the repository over svn:// url.
>> (paths and text is redacted)
>> The  head revision is: 10801
>> 
>> When I run the following command on the client (in the working copy), it 
>> prints a long partial xml-log output, then hangs.
>> /usr/bin/svn log --xml -g -v -r 10701:HEAD /path/to/branch-wc
>> 
>> When observing in "top", the command uses no visible CPU resources on hang. 
>> (I waited ca. 2 minutes)
>> The hanging command does mot exits on CTRL-c, it does not exits on "kill 
>> -TERM pid", I have to send "kill -KILL pid" to terminate it.
>> 
>> When I run the command with strace it hangs at read(4,
>> ...SNIP...
>> read(4, " ( ) ( 4:file true false ) ) ( 1"..., 16384) = 16384
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d83000
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d81000
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d7f000
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d7d000
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d7b000
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d79000
>> read(4, "***/-***_redacted_*_"..., 16384) = 14773
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d77000
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d75000
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d73000
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d71000
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d6f000
>> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>> 0x7f63f1d6d000
>> read(4,
>> 
>> When I observe the server, there is a CPU activity at the begin, but when 
>> the client hangs, the server seems to be in idle.
>> Just a corresponding svnserve process is there with no visible cpu usage.
>> In svnserve.log is nothing relevant to see.
>> 
>> The svnserve command is:
>> svnserve -d -r /path/to/repositories \
>> --log-file=/var/log/svnserve.log \
>> --memory-cache-size 1024 \
>> --cache-txdeltas yes \
>> --cache-fulltexts yes
>> 
>> When I try to get the xml-log on the server with the corresponding file:// 
>> repository URL:
>> /usr/bin/svn log --xml -g -v -r 10701:HEAD 
>> file://path/to/local/repositories/project/branch
>> The command finishes in ca 5-10 seconds and I get the xml output, but the 
>> output has a way too many  lines.
>> 
>> There are 1217 occurrences of the string “> of the string "" in the output xml.
>> There are several thousand lines of  in a row in many places in 
>> repeated blocks.
>> 
>> Details:
>> Client and Server OS:
>> Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1+deb10u1 (2020-04-27) x86_64 
>> GNU/Linux
>> 
>> The repository is ca. 4 GB.
>> Running "svnadmin verify" on the server founds no errors.
>> I have no other problems with the server, checkout and commit works normal.
>> 
>> svn --version
>> svn, version 1.10.4 (r1850624)
>>   compiled Feb 10 2021, 20:15:45 on x86_64-pc-linux-gnu
>> 
>> Copyright (C) 2019 The Apache Software Foundation.
>> This software consists of contributions made by many people;
>> see the NOTICE file for more information.
>> Subversion is open source software, see http://subversion.apache.org/
>> 
>> The following repository access (RA) modules are available:
>> 
>> * ra_svn : Module for accessing a repository using the svn network protocol.
>>  - with Cyrus SASL authentication
>>  - handles 'svn' scheme
>> * ra_local : Module for accessing a repository on local disk.
>>  - handles 'file' scheme
>> * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
>>  - using serf 1.3.9 (compiled with 1.3.9)
>>  - handles 'http' scheme
>>  - handles 'https' scheme
>> 
>> The following authentication credential caches are available:
>> 
>> * Plaintext cache in /home/username/.subversion
>> * Gnome Keyring
>> * GPG-Agent
>> * KWallet (KDE)
> 
> 
> Hello Attila,
> 
> Thanks for this detailed explanation. There are quite a few important
> clues here.
> 
> To help narrow down the search for the culprit: Are you able to run
> the same 'svn log' command against the same working copy, but without
> the '--xml', and get a correct output in a reasonable amount of time?

Hi Nathan

thanks for the suggestions.

The command without the --xml parameter hangs on the client and works on the 

Re: svn log xml hangs and produces too many logentry closing tags

2021-07-16 Thread Daniel Shahaf
Attila wrote on Tue, Jul 13, 2021 at 23:48:48 +0200:
> Hi
> 
> I have a problem getting the svn log in a branch after sync-merging a commit 
> from trunk.
> This commit in trunk is a merge of an old and complex branch with many 
> commits.
> 
> The client accessing the repository over svn:// url.
> (paths and text is redacted)
> The  head revision is: 10801
> 
> When I run the following command on the client (in the working copy), it 
> prints a long partial xml-log output, then hangs.
> /usr/bin/svn log --xml -g -v -r 10701:HEAD /path/to/branch-wc
> 
> When observing in "top", the command uses no visible CPU resources on hang. 
> (I waited ca. 2 minutes)
> The hanging command does mot exits on CTRL-c, it does not exits on "kill 
> -TERM pid", I have to send "kill -KILL pid" to terminate it.
> 
> When I run the command with strace it hangs at read(4,
> ...SNIP...
> read(4, " ( ) ( 4:file true false ) ) ( 1"..., 16384) = 16384
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d83000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d81000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d7f000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d7d000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d7b000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d79000
> read(4, "***/-***_redacted_*_"..., 16384) = 14773
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d77000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d75000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d73000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d71000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d6f000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d6d000
> read(4,
> 
> When I observe the server, there is a CPU activity at the begin, but when the 
> client hangs, the server seems to be in idle.
> Just a corresponding svnserve process is there with no visible cpu usage.
> In svnserve.log is nothing relevant to see.
> 
> The svnserve command is:
> svnserve -d -r /path/to/repositories \
> --log-file=/var/log/svnserve.log \
> --memory-cache-size 1024 \
> --cache-txdeltas yes \
> --cache-fulltexts yes
> 
> When I try to get the xml-log on the server with the corresponding file:// 
> repository URL:
> /usr/bin/svn log --xml -g -v -r 10701:HEAD 
> file://path/to/local/repositories/project/branch
> The command finishes in ca 5-10 seconds and I get the xml output, but the 
> output has a way too many  lines.
> 
> There are 1217 occurrences of the string “ the string "" in the output xml.
> There are several thousand lines of  in a row in many places in 
> repeated blocks.
> 
> Details:
> Client and Server OS:
> Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1+deb10u1 (2020-04-27) x86_64 
> GNU/Linux
> 
> The repository is ca. 4 GB.
> Running "svnadmin verify" on the server founds no errors.
> I have no other problems with the server, checkout and commit works normal.
> 
> svn --version
> svn, version 1.10.4 (r1850624)
>compiled Feb 10 2021, 20:15:45 on x86_64-pc-linux-gnu
>  
> Copyright (C) 2019 The Apache Software Foundation.
> This software consists of contributions made by many people;
> see the NOTICE file for more information.
> Subversion is open source software, see http://subversion.apache.org/
>  
> The following repository access (RA) modules are available:
>  
> * ra_svn : Module for accessing a repository using the svn network protocol.
>   - with Cyrus SASL authentication
>   - handles 'svn' scheme
> * ra_local : Module for accessing a repository on local disk.
>   - handles 'file' scheme
> * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
>   - using serf 1.3.9 (compiled with 1.3.9)
>   - handles 'http' scheme
>   - handles 'https' scheme
>  
> The following authentication credential caches are available:
>  
> * Plaintext cache in /home/username/.subversion
> * Gnome Keyring
> * GPG-Agent
> * KWallet (KDE)
> 
> 
> Googling around gives me these two somewhat related hits:
> https://issues.apache.org/jira/browse/SVN-4856
> https://issues.apache.org/jira/browse/SVN-4711
> 
> But I do'nt use the --search parameter.
> 
> Is this a bug or are there any suggestions how to solve this problem?

It could be SVN-4856, which doesn't use --search either, or it could be
something else that happens whenever the output is large enough.  Could
you try «svn log -v -r HEAD:0 '^/' >/dev/null» without -g?  That might
not actually be large enough (considering HEAD is ≈11k and your output
had ≈33k cases of ), so you might have to create a test

Re: svn log xml hangs and produces too many logentry closing tags

2021-07-14 Thread Nathan Hartman
On Tue, Jul 13, 2021 at 5:49 PM Attila  wrote:
>
> Hi
>
> I have a problem getting the svn log in a branch after sync-merging a commit 
> from trunk.
> This commit in trunk is a merge of an old and complex branch with many 
> commits.
>
> The client accessing the repository over svn:// url.
> (paths and text is redacted)
> The  head revision is: 10801
>
> When I run the following command on the client (in the working copy), it 
> prints a long partial xml-log output, then hangs.
> /usr/bin/svn log --xml -g -v -r 10701:HEAD /path/to/branch-wc
>
> When observing in "top", the command uses no visible CPU resources on hang. 
> (I waited ca. 2 minutes)
> The hanging command does mot exits on CTRL-c, it does not exits on "kill 
> -TERM pid", I have to send "kill -KILL pid" to terminate it.
>
> When I run the command with strace it hangs at read(4,
> ...SNIP...
> read(4, " ( ) ( 4:file true false ) ) ( 1"..., 16384) = 16384
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d83000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d81000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d7f000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d7d000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d7b000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d79000
> read(4, "***/-***_redacted_*_"..., 16384) = 14773
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d77000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d75000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d73000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d71000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d6f000
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x7f63f1d6d000
> read(4,
>
> When I observe the server, there is a CPU activity at the begin, but when the 
> client hangs, the server seems to be in idle.
> Just a corresponding svnserve process is there with no visible cpu usage.
> In svnserve.log is nothing relevant to see.
>
> The svnserve command is:
> svnserve -d -r /path/to/repositories \
> --log-file=/var/log/svnserve.log \
> --memory-cache-size 1024 \
> --cache-txdeltas yes \
> --cache-fulltexts yes
>
> When I try to get the xml-log on the server with the corresponding file:// 
> repository URL:
> /usr/bin/svn log --xml -g -v -r 10701:HEAD 
> file://path/to/local/repositories/project/branch
> The command finishes in ca 5-10 seconds and I get the xml output, but the 
> output has a way too many  lines.
>
> There are 1217 occurrences of the string “ the string "" in the output xml.
> There are several thousand lines of  in a row in many places in 
> repeated blocks.
>
> Details:
> Client and Server OS:
> Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1+deb10u1 (2020-04-27) x86_64 
> GNU/Linux
>
> The repository is ca. 4 GB.
> Running "svnadmin verify" on the server founds no errors.
> I have no other problems with the server, checkout and commit works normal.
>
> svn --version
> svn, version 1.10.4 (r1850624)
>compiled Feb 10 2021, 20:15:45 on x86_64-pc-linux-gnu
>
> Copyright (C) 2019 The Apache Software Foundation.
> This software consists of contributions made by many people;
> see the NOTICE file for more information.
> Subversion is open source software, see http://subversion.apache.org/
>
> The following repository access (RA) modules are available:
>
> * ra_svn : Module for accessing a repository using the svn network protocol.
>   - with Cyrus SASL authentication
>   - handles 'svn' scheme
> * ra_local : Module for accessing a repository on local disk.
>   - handles 'file' scheme
> * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
>   - using serf 1.3.9 (compiled with 1.3.9)
>   - handles 'http' scheme
>   - handles 'https' scheme
>
> The following authentication credential caches are available:
>
> * Plaintext cache in /home/username/.subversion
> * Gnome Keyring
> * GPG-Agent
> * KWallet (KDE)


Hello Attila,

Thanks for this detailed explanation. There are quite a few important
clues here.

To help narrow down the search for the culprit: Are you able to run
the same 'svn log' command against the same working copy, but without
the '--xml', and get a correct output in a reasonable amount of time?

If log without '--xml' works and log with '--xml' gets stuck, is it
feasible to try to bisect the revision range, e.g., run log on the
range r10701:10751, and in a separate invocation on r10751:10801, and
try to see if there's a revision in particular where SVN is getting
confused? If so, then perhaps knowing a little more about that
revisio

svn log xml hangs and produces too many logentry closing tags

2021-07-13 Thread Attila
Hi

I have a problem getting the svn log in a branch after sync-merging a commit 
from trunk.
This commit in trunk is a merge of an old and complex branch with many commits.

The client accessing the repository over svn:// url.
(paths and text is redacted)
The  head revision is: 10801

When I run the following command on the client (in the working copy), it prints 
a long partial xml-log output, then hangs.
/usr/bin/svn log --xml -g -v -r 10701:HEAD /path/to/branch-wc

When observing in "top", the command uses no visible CPU resources on hang. (I 
waited ca. 2 minutes)
The hanging command does mot exits on CTRL-c, it does not exits on "kill -TERM 
pid", I have to send "kill -KILL pid" to terminate it.

When I run the command with strace it hangs at read(4,
...SNIP...
read(4, " ( ) ( 4:file true false ) ) ( 1"..., 16384) = 16384
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d83000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d81000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d7f000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d7d000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d7b000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d79000
read(4, "***/-***_redacted_*_"..., 16384) = 14773
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d77000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d75000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d73000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d71000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d6f000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f63f1d6d000
read(4,

When I observe the server, there is a CPU activity at the begin, but when the 
client hangs, the server seems to be in idle.
Just a corresponding svnserve process is there with no visible cpu usage.
In svnserve.log is nothing relevant to see.

The svnserve command is:
svnserve -d -r /path/to/repositories \
--log-file=/var/log/svnserve.log \
--memory-cache-size 1024 \
--cache-txdeltas yes \
--cache-fulltexts yes

When I try to get the xml-log on the server with the corresponding file:// 
repository URL:
/usr/bin/svn log --xml -g -v -r 10701:HEAD 
file://path/to/local/repositories/project/branch
The command finishes in ca 5-10 seconds and I get the xml output, but the 
output has a way too many  lines.

There are 1217 occurrences of the string “" in the output xml.
There are several thousand lines of  in a row in many places in 
repeated blocks.

Details:
Client and Server OS:
Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1+deb10u1 (2020-04-27) x86_64 
GNU/Linux

The repository is ca. 4 GB.
Running "svnadmin verify" on the server founds no errors.
I have no other problems with the server, checkout and commit works normal.

svn --version
svn, version 1.10.4 (r1850624)
   compiled Feb 10 2021, 20:15:45 on x86_64-pc-linux-gnu
 
Copyright (C) 2019 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
 
The following repository access (RA) modules are available:
 
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - using serf 1.3.9 (compiled with 1.3.9)
  - handles 'http' scheme
  - handles 'https' scheme
 
The following authentication credential caches are available:
 
* Plaintext cache in /home/username/.subversion
* Gnome Keyring
* GPG-Agent
* KWallet (KDE)


Googling around gives me these two somewhat related hits:
https://issues.apache.org/jira/browse/SVN-4856
https://issues.apache.org/jira/browse/SVN-4711

But I do'nt use the --search parameter.

Is this a bug or are there any suggestions how to solve this problem?

Thanks,

Attila