Show History functionality is not working from the SVNKIT connector

Hello Team,

Our application is Eclipse RCP based application and recently we have found 1 issue with the SHOW HISTORY functionality from the SVN Repository

After connecting to the repository from SVNKIT , when we try to fetch Show History for any of the directory it is showing us Show History(32% completed and History view is also loaded but data loading shows as Pending)
After approximate one hours we get the below pop up saying

Get log messages for '<svn_url>'
**svn:E175002:timed out waiting for server **
svn:E175002:REPORT request failed on '<directory_path>'

The same functionality we tried from the Tortoise SVN and CMD Prompt there there is no issue fetching the data , only when we try to see history from SVNKIT we get this error.

Next we tried for different repositories but the issue exists only for this repository and another repository.

These 2 repositories are created from PARENT repository from a particular revision where there is no such issue in the PARENT repository

We would like to understand if anyone has faced the similar issue in past. If YES could you please give your inputs on how to overcome and what caused this issue suddenly?

Hello Mitali,
what protocol are you using? I guess, HTTP, right?

We never got reports like this. The first thing to try is to set

-Dsvnkit.http.httpV2Enabled=true

JVM property. (how to that in Eclipse)

It will switch to a slighly different variant of HTTP protocol. If this solves the problem, something is wrong related to HTTP/HTTPv2. Otherwise, I would recommend you to try to reproduce the problem using “jsvn log” command of jsvn command line utility (which is just a command line version of SVNKit) and compare it to a similar “svn log” utility of native SVN command line.

If there’s still a difference, it would be nice if you could catch the requests using a sniffer. Ideally, with identical HTTPv2 on/off settings they should produce similar HTTP requests and thus have similar server behaviour. If something is wrong with SVNKit, it’s because of a difference in requests.

But note that by default SVNKit has HTTPv2 off, while native SVN has HTTPv2 on, so they are incomparable by default. In SVNKit HTTPv2 can be enabled using

-Dsvnkit.http.httpV2Enabled=true

JVM property while in native SVN HTTPv2 support can be disabled with

SVN_I_LIKE_LATENCY_SO_IGNORE_HTTPV2=yes

environment variable.

Another possible idea: measure the time native SVN requires to get the log. Maybe it takes a while for the SVN server to prepare the log while SVNKit is not patient enough to wait this amount of time and fails earlier. This can be configured in ~/.subversion using http-timeout option.

At SVNKit level we have read and connect timeout support, but I don’t know how Eclipse uses it.

Hi Dmitry,

Thanks for your reply!
We tried your suggestions , please find our analysis

Regarding enabling the HTTPV2 variable we tried this update from our app heavy client but the issue still exists .

Next we downloaded SVNKIT CLI both the versions 1.10 and 1.7 and we are able to get the logs there.

Please Note for our application we are using SVNKIT v1.8.14 , from our assumptions we are calling a wrapper before loading the data , which wrapper seems to be working fine but only while loading the data i.e., revision no , author name and etc the it gets stuck.

Next thing can you tell us if we can capture more logs from the Subversion SVNKIT i.e., from the heavy client.

It will be really helpful to do the deeper study on this issue.

Thanks

Hello Mitali,
what do you mean by “heavy” client?

My suggestion was to compare network requests of SVNKit command line utility and native Subversion command line utility with a sniffer (Wireshark) or logging tcp proxy (e.g. TcpCatcher). Probably this way we could find out what’s wrong with HTTP requests SVNKit composes.

Hello Dmitry,

By “heavy” client we mean the Eclipse.

Hello Dmitry,

We tried using the SVN cli and SVNKIT CLI and we have generated the below logs
The below logs are generated using Mockserver proxy settings

-----------------jsvn CLI-----------------------
" “OPTIONS {Repository}/development HTTP/1.1” 200 - “-” 0
" “PROPFIND /{Repository}/development HTTP/1.1” 207 724 “-” 0
" “PROPFIND /{Repository}/!svn/vcc/default HTTP/1.1” 207 424 “-” 0
" “PROPFIND /{Repository}/!svn/bln/3 HTTP/1.1” 207 475 “-” 0
" “PROPFIND /{Repository}/development HTTP/1.1” 207 724 “-” 0
" “PROPFIND /{Repository}/!svn/vcc/default HTTP/1.1” 207 424 “-” 0
" “PROPFIND /{Repository}/!svn/bln/3 HTTP/1.1” 207 475 “-” 0
" “PROPFIND /{Repository}/development HTTP/1.1” 207 724 “-” 0
" “PROPFIND /{Repository}/!svn/vcc/default HTTP/1.1” 207 436 “-” 0
" “REPORT /{Repository}/!svn/bc/3/development HTTP/1.1” 200 715 “-” 19

---------------------svn CLI----------------

[ “OPTIONS /{Repository}/development/spec HTTP/1.1” 200 201 “-” 0
[ “OPTIONS /{Repository}/development/spec HTTP/1.1” 200 97 “-” 0
[ “OPTIONS /{Repository}/development/spec HTTP/1.1” 200 201 “-” 0
[ “OPTIONS /{Repository}/development/spec HTTP/1.1” 200 201 “-” 0
[“OPTIONS /{Repository}/development/spec HTTP/1.1” 200 201 “-” 0
[ “REPORT /{Repository}/!svn/rvr/3/development/spec HTTP/1.1” 200 715 “-” 18

Could you please help us understand what went wrong or anything else needs to be done from our end?

Hello ,

We have increased http-timeout in ~/subversion to 4hrs , but still the issue exists.

Is there any default timeout( 60minutes ) in SVNKIT side which also needs to be modified ?

Thanks for your Support!
Regards,
Mitali

Hello Dmitry,

We have done some more analysis. After updating the http-timeout in ~/subversion to 4hrs the issue still exists Hence we reduced the value to 60seconds but the issue still exists

i.e., we still get the timed out error after clicking on SHOW HISTORY exactly after 1 hour the pop up comes.

Next we found the below piece of code

Here we see that the below piece of code

ISVNAuthenticationManager authManager = myRepository.getAuthenticationManager();
int connectTimeout = authManager != null ? authManager.getConnectTimeout(myRepository) : 0;
int readTimeout = authManager != null ? authManager.getReadTimeout(myRepository) : DEFAULT_HTTP_TIMEOUT;
if (readTimeout < 0) {
readTimeout = DEFAULT_HTTP_TIMEOUT;
}

Here as per the code the value is set to 60 minutes exactly and our error also comes after 60 minutes exactly .
private static final int DEFAULT_HTTP_TIMEOUT = 3600*1000;

Hence we would like to understand this getAuthenticationManager() is coming from where and how our SVN repository is fetching data from this Authentication Manager and how this ‘readTimeout’ fied is mapped with our SVN repository?

Any help is appreciated.

Thanks in advance for your Support!
Regards,
Mitali