Problem with commit code with long path name containing comma

Hi Support,

User reported bitbucket commit issue today as follows:

I encounter the problem of “error: Delta source ended unexpectedly” when I want to push my commit to the SVN repository in ottdump develop branch.

dchau@HK-RND-D12L7K2 MINGW64 /h/ottdump (develop)
$ git push origin develop
Enumerating objects: 243, done.
Counting objects: 100% (243/243), done.
Delta compression using up to 8 threads.
Compressing objects: 100% (117/117), done.
Writing objects: 100% (123/123), 8.70 KiB | 495.00 KiB/s, done.
Total 123 (delta 110), reused 0 (delta 0)
remote: Resolving deltas: 100% (110/110), completed with 110 local objects.
remote: error: Delta source ended unexpectedly
remote:
remote: Fetching revisions from SVN repository:
remote: up to date
remote: Sending commits to SVN repository:
To https://bitbucket360.harmonicinc.com/scm/ng/ottdump.git
! [remote rejected] develop -> develop (pre-receive hook declined)
error: failed to push some refs to ‘https://dchau@bitbucket360.harmonicinc.com/s cm/ng/ottdump.git’

I have tried to separate the commit into deleting files and then add them back, however, I can’t even delete the files.

dchau@HK-RND-D12L7K2 MINGW64 /h/ottdump (develop)
$ git push origin
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (11/11), 803 bytes | 401.00 KiB/s, done.
Total 11 (delta 5), reused 7 (delta 2)
remote: error: ‘/svn/repo/!svn/wrk/e5917adf-6801-0010-b037-37efd031ea67/NG/ottdump/trunk/ottdump/examples/hls_with_webvtt/hcde360_40341/Content/HLS/CatchUp/channel(name=dd189a80-e641-11e8-9ee4-85870391f467/Segment(15420037847621534).vtt’ path not found: 404 Not Found (http://hsvn)
remote:
remote: Fetching revisions from SVN repository:
remote: up to date
remote: Sending commits to SVN repository:
To https://bitbucket360.harmonicinc.com/scm/ng/ottdump.git
! [remote rejected] develop -> develop (pre-receive hook declined)
error: failed to push some refs to ‘https://dchau@bitbucket360.harmonicinc.com/scm/ng/ottdump.git

In addition, I observed that files like

ottdump\examples\dash_with_webvtt_and_teletext\hcde360_40341\Content\DASH\Live\channel(dd189a80-e641-11e8-9ee4-85870391f467)\1542003127435item-03item_Segment-3163836785.vtt

is okay to be deleted/added while

ottdump/examples/hls_with_webvtt/hcde360_40341/Content/HLS/CatchUp/channel(name=dd189a80-e641-11e8-9ee4-85870391f467,startTime=15420037839860000,endTime=15420039039860000)/Stream(03)/Segment(15420038688461534).vtt

will result with the error mentioned above.

I tried to commit the same file under SVN and no problem at all and I suspect there is some path handling issue with comma in between for the subgit plugin:

The commit issue should be related to the subgit plugin when handling path containing “comma”: ie: channel(name=dd189a80-e641-11e8-9ee4-85870391f467/Segment(15420037847621534).vtt’ path not found

Original path: channel(name=dd189a80-e641-11e8-9ee4-85870391f467,startTime=15420037839860000,endTime=15420039039860000)

Can you advise if this is a known issue or this is some other issue causing the failure ?

regards,
Terry

Hello Terry

I haven’t heard yet about issues like this and I haven’t seen a case where commas bring any problems. Actually, I just tested the paths you mentioned and didn’t face any problems, all the files were successfully created, pushed, and deleted. It looks more like an issue of the repository rather than the paths issue, but the issue definitely should be investigated. May we have svnmirror* log files from the repository in question for analysis?

Hi Support,

Attached is the svnmirror.log.

regards,
Terry

Hi Terry

I see no files in this thread, could you re-upload it again, please?

added

Hi Terry

thank you for the logs.

It looks that you are right, commas in the paths indeed is a problem, but it’s not completely clear what causes the issue. Judging from the logs, the addon sends correct URLs, but on the SVN side, we see the path is cut on the first comma. Strange is that the same files can successfully be committed from the SVN side as you mentioned. The issue cause is yet unclear, we would need more investigation to find out it. Could you please provide us with a little more details on your setup, namely

  • what is the SVN edition and version that is installed on the ‘HSVN’ server and what is the operating system of that server?
  • what are Bitbucket and SVN Mirror version and what is the OS on the Bitbucket server?
  • which SVN client (and version) have you used to commit those files to the SVN server and which protocol was used to communicate the SVN server?

Thank you in advance.

At this time we can suggest a workaround to remove the ‘CatchUp’ directory on the SVN side and then add it again with all the files. The history of the files will be interrupted by that, but it definitely will resolve the issue, consider this workaround if you need the quickest solution.

what is the SVN edition and version that is installed on the ‘HSVN’ server and what is the operating system of that server?

HSVN is running with Wandisco MSP 1.9. svn version should be 1.9.7
OS for the server = Centos 6.9 x64

what are Bitbucket and SVN Mirror version and what is the OS on the Bitbucket server?

Bitbucket server version = 5.7.0
OS of bitbucket server = Centos 7.4.1708

which SVN client (and version) have you used to commit those files to the SVN server and which protocol was used to communicate the SVN server?

TortoiseSVN client (1.8.7.25475).
through http

Hello Terry,

Thank you for the answers.
Unfortunately, we haven’t managed to reproduce the issue in our environment; but nonetheless, we’ve managed to find out what the cause may be inspecting the code.
Judging from the logs, you have a relatively old add-on version (probably, it’s 3.4.1?); there was a bug in SVNKIT (which is one if the components of the add-on) that might lead to a problem like that you have faced with. This bug has been fixed in the first half of 2018 but fixed SVNKIT version has been built into SVN Mirror add-on only in last versions, 3.4.5 and the latest 3.4.6.
So the solution is to update the add-on to at least 3.4.5.
Please let us know if it helped.