git-svn issue: The server unexpectedly closed the connection.

1,474 views
Skip to first unread message

Thilo Fischer

unread,
Oct 18, 2017, 7:46:51 AM10/18/17
to git-for-windows
Hello!

I use git to contribute to a svn-hosted project. Quite often `git svn rebase`or `git svn dcommit` fails with "Can't create session: Unable to connect to a repository at URL 'https://svnexample.com/trunk': Error running context: The server unexpectedly closed the connection. at /mingw64/share/perl5/site_perl/Git/SVN.pm line 717."

There was a patch submitted in some bug/issue tracker or on some git mailing list by the time of git 2.10 or a little before that solved an issue causing the same error message (only on windows systems, and as far as I remember sporadically) -- I tried hard but I could not find that bug report/error analysis/patch again. Does someone remember and can provide me a reference to that issue?

This problem seems to be related somehow with the sort-of-VPN connection I use to access svn.example.com, because the problem usually disappears when I am connected to the network of the SVN server directly, everything works for a few days, and then the problem occurs again and persists until I connect again directly to the network of the SVN server. But as I said: It seems to be this way, I have not yet done enough testing to say that it is reproducible this way, especially when it comes to persistence and (temporary) resolving of that problem.

However, it is definitely not a network issue in the first place: While I cannot access the SVN repo using git-svn, accessing the same repo with same URL and same user credentials using TortoiseSVN works. (I observed that access with TortoiseSVN is rather slow when I see the git-svn issue, so the git-svn issue might be caused by some timeout mechanism -- but this is just a wild guess.)

I did some printf-debugging in /mingw64/share/perl5/site_perl/Git/SVN.pm, /mingw64/share/perl5/site_perl/Git/SVN/Ra.pm, /usr/lib/perl5/vendor_perl/SVN/Ra.pm and the issue arises in /usr/lib/perl5/vendor_perl/SVN/Ra.pm line 529 when SVN::_Ra::svn_ra_open is invoked. From there I could not yet find the way how to further debug/investigate the issue. I could not find where _Ra comes from or where svn_ra_open is defined. Does this line of code invoke a function from /usr/bin/msys-svn_ra*.dll? (I don't know that much of perl -- is it possible to call dynamic library functions like this?)

Could someone help with a suggestion how to further analyse the issue?
Does someone know about a timeout value that could cause the issue when using my slow sort-of-VPN connection and how I could increase that timeout value?
Would it be possible to replace (with reasonable effort) the SVN .dll files with a more recent version of msys-svn or to use TortoiseSVN instead of msys-svn? Maybe this would resolve my issue ...

I am using PortableGit-2.10.2-64-bit. Prior to 2.10.2, I had the same error message sporadically (must have been the issue from the before mentioned patch submission that I cannot find again). With 2.14.0.2, I got the above error message always (or nearly always), so I stayed with 2.10.2 until now. I suspect that my problems with version below 2.10.2, with 2.10.2 and with 2.14.0.2 are different issues or defects that just result in the same error message ...

Best regards

Thilo Fischer

Alberto Fanjul Alonso

unread,
Oct 19, 2017, 10:44:21 AM10/19/17
to git-for-windows
Best way to solve this questions is been able to reproduce it.

If you can reproduce on a public svn repo, everyone could reproduce and find a solution

I'd propose an example with git 2.14 as old version are not of much interest

see you can run commands with GIT_TRACE=1 to see what git is doing or GIT_TRACE=mylog to save all into mylog file

Example:

GIT_TRACE=1 git svn dcommit

Note: I use git svn on daily basis so I would say is something related with your VPN

Thilo Fischer

unread,
Oct 20, 2017, 8:38:40 AM10/20/17
to git-for-windows
Hello,

unfortunately the issue occurs rather spontaneously. It returns regularly, but I would not call it reproduceable. At least I could not yet make out what is necessary to reproduce it.

I also use git-svn also with other repositories and don't see this issue there. I'm afraid I won't soon find a way to reproduce the issue on a public repository where anyone could reproduce and analyse the issue -- at least not without further insight into the process and where exactly it goes wrong. I'm pretty confident that I could find a way to reproduce the issue or even find a fix for whatever happens there if only I could go a little further with tracing what is happening. I already narrowed it down to /usr/lib/perl5/vendor_perl/SVN/Ra.pm line 529 but don't know yet how to go on from there: Where can I find implementation of SVN::_Ra::svn_ra_open?

I don't have the issue right now, so I can't try with GIT_TRACE at the moment -- but I don't think it would provide me any information more accurate than "fails at /usr/lib/perl5/vendor_perl/SVN/Ra.pm line 529", would it?

I will also try again with 2.14.2, both while 2.10.2 is working and also when I see the issue with 2.10.2, but I suspect there is another issue with 2.14.2 in my setup :(
Reply all
Reply to author
Forward
0 new messages