Discussion:
Subversion crashes during local checkout
Michael Osipov
2018-03-29 20:32:45 UTC
Permalink
Hi folks,

Subversion crashes here while trying to check out locally via file://
with an apparently invalid URL.

All commands are run in PowerShell on
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> [System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 16299 0
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn --version
svn, version 1.9.7 (r1800392)
compiled Aug 8 2017, 22:14:48 on x86-microsoft-windows
from TortoiseSVN 1.9.7
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn co file://D:\Entwicklung\svn-repos\scm-sv
n-test-at-sign .
svn: E235000: In file 'D:\Development\SVN\Releases\TortoiseSVN-1.9.7\ext\subversion\subversion\libsvn_client\checkout.c' line 87: assertion failed (svn_uri_is_canonical(url, scratch_pool))
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv
n.exe --version
svn, version 1.10.0-alpha3 (Alpha 3)
compiled Aug 22 2017, 08:13:12 on x86_64-microsoft-windows10.0.14393
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv
n.exe co file://D:\Entwicklung\svn-repos\scm-svn-test-at-sign .
svn: E235000: In file '..\..\..\subversion\libsvn_client\checkout.c' line 88: assertion failed (svn_uri_is_canonical(url, scratch_pool))
I know that the URL should start with file:///, but I would expect
something like "invalid URL". The assert failed isn't really helpful to
the user.

Ideas?

Michael
Johan Corveleyn
2018-03-30 11:33:47 UTC
Permalink
Post by Michael Osipov
Hi folks,
Subversion crashes here while trying to check out locally via file:// with
an apparently invalid URL.
All commands are run in PowerShell on
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
[System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 16299 0
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn --version
svn, version 1.9.7 (r1800392)
compiled Aug 8 2017, 22:14:48 on x86-microsoft-windows
from TortoiseSVN 1.9.7
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn co
file://D:\Entwicklung\svn-repos\scm-sv
n-test-at-sign .
svn: E235000: In file
'D:\Development\SVN\Releases\TortoiseSVN-1.9.7\ext\subversion\subversion\libsvn_client\checkout.c'
line 87: assertion failed (svn_uri_is_canonical(url, scratch_pool))
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv
n.exe --version
svn, version 1.10.0-alpha3 (Alpha 3)
compiled Aug 22 2017, 08:13:12 on x86_64-microsoft-windows10.0.14393
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv
n.exe co file://D:\Entwicklung\svn-repos\scm-svn-test-at-sign .
svn: E235000: In file '..\..\..\subversion\libsvn_client\checkout.c' line
88: assertion failed (svn_uri_is_canonical(url, scratch_pool))
I know that the URL should start with file:///, but I would expect something
like "invalid URL". The assert failed isn't really helpful to the user.
Ideas?
Michael
Hello Michael,

Agreed that Subversion shouldn't crash on that.

I don't have much time to look into it further, but I've quickly done
a few tests on the command line. It seems you only get this crash if
you use a backslash (which is normal on Windows of course) after the
'D:'. If you use a forward slash it doesn't crash.

So it seems that in that particular case, in libsvn_subr/dirent_uri.c
[1], svn_uri_is_canonical() does not agree with the output of
svn_uri_canonicalize().

[1] http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_subr/dirent_uri.c
--
Johan
Michael Osipov
2018-03-30 18:49:08 UTC
Permalink
Post by Johan Corveleyn
Post by Michael Osipov
Hi folks,
Subversion crashes here while trying to check out locally via file:// with
an apparently invalid URL.
All commands are run in PowerShell on
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
[System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 16299 0
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn --version
svn, version 1.9.7 (r1800392)
compiled Aug 8 2017, 22:14:48 on x86-microsoft-windows
from TortoiseSVN 1.9.7
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn co
file://D:\Entwicklung\svn-repos\scm-sv
n-test-at-sign .
svn: E235000: In file
'D:\Development\SVN\Releases\TortoiseSVN-1.9.7\ext\subversion\subversion\libsvn_client\checkout.c'
line 87: assertion failed (svn_uri_is_canonical(url, scratch_pool))
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv
n.exe --version
svn, version 1.10.0-alpha3 (Alpha 3)
compiled Aug 22 2017, 08:13:12 on x86_64-microsoft-windows10.0.14393
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv
n.exe co file://D:\Entwicklung\svn-repos\scm-svn-test-at-sign .
svn: E235000: In file '..\..\..\subversion\libsvn_client\checkout.c' line
88: assertion failed (svn_uri_is_canonical(url, scratch_pool))
I know that the URL should start with file:///, but I would expect something
like "invalid URL". The assert failed isn't really helpful to the user.
Ideas?
Michael
Hello Michael,
Agreed that Subversion shouldn't crash on that.
I don't have much time to look into it further, but I've quickly done
a few tests on the command line. It seems you only get this crash if
you use a backslash (which is normal on Windows of course) after the
'D:'. If you use a forward slash it doesn't crash.
So it seems that in that particular case, in libsvn_subr/dirent_uri.c
[1], svn_uri_is_canonical() does not agree with the output of
svn_uri_canonicalize().
[1] http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_subr/dirent_uri.c
Thanks Johan,

shall I file an issue in JIRA?

Michael
Johan Corveleyn
2018-03-30 19:12:25 UTC
Permalink
Post by Michael Osipov
Post by Johan Corveleyn
Post by Michael Osipov
Hi folks,
Subversion crashes here while trying to check out locally via file:// with
an apparently invalid URL.
All commands are run in PowerShell on
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
[System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 16299 0
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn --version
svn, version 1.9.7 (r1800392)
compiled Aug 8 2017, 22:14:48 on x86-microsoft-windows
from TortoiseSVN 1.9.7
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn co
file://D:\Entwicklung\svn-repos\scm-sv
n-test-at-sign .
svn: E235000: In file
'D:\Development\SVN\Releases\TortoiseSVN-1.9.7\ext\subversion\subversion\libsvn_client\checkout.c'
line 87: assertion failed (svn_uri_is_canonical(url, scratch_pool))
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv
n.exe --version
svn, version 1.10.0-alpha3 (Alpha 3)
compiled Aug 22 2017, 08:13:12 on x86_64-microsoft-windows10.0.14393
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv
n.exe co file://D:\Entwicklung\svn-repos\scm-svn-test-at-sign .
svn: E235000: In file '..\..\..\subversion\libsvn_client\checkout.c' line
88: assertion failed (svn_uri_is_canonical(url, scratch_pool))
I know that the URL should start with file:///, but I would expect something
like "invalid URL". The assert failed isn't really helpful to the user.
Ideas?
Michael
Hello Michael,
Agreed that Subversion shouldn't crash on that.
I don't have much time to look into it further, but I've quickly done
a few tests on the command line. It seems you only get this crash if
you use a backslash (which is normal on Windows of course) after the
'D:'. If you use a forward slash it doesn't crash.
So it seems that in that particular case, in libsvn_subr/dirent_uri.c
[1], svn_uri_is_canonical() does not agree with the output of
svn_uri_canonicalize().
[1]
http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_subr/dirent_uri.c
Thanks Johan,
shall I file an issue in JIRA?
Yes, please go ahead with that, to make sure we don't forget about
this. Not sure if anyone will get to this soonish, but having the
issue on record is a good first step in any case.

Thanks,
--
Johan
Michael Osipov
2018-03-30 19:22:51 UTC
Permalink
Post by Johan Corveleyn
Post by Michael Osipov
Post by Johan Corveleyn
Post by Michael Osipov
Hi folks,
Subversion crashes here while trying to check out locally via file:// with
an apparently invalid URL.
All commands are run in PowerShell on
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
[System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 16299 0
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn --version
svn, version 1.9.7 (r1800392)
compiled Aug 8 2017, 22:14:48 on x86-microsoft-windows
from TortoiseSVN 1.9.7
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn co
file://D:\Entwicklung\svn-repos\scm-sv
n-test-at-sign .
svn: E235000: In file
'D:\Development\SVN\Releases\TortoiseSVN-1.9.7\ext\subversion\subversion\libsvn_client\checkout.c'
line 87: assertion failed (svn_uri_is_canonical(url, scratch_pool))
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv
n.exe --version
svn, version 1.10.0-alpha3 (Alpha 3)
compiled Aug 22 2017, 08:13:12 on x86_64-microsoft-windows10.0.14393
PS D:\Entwicklung\Projekte\scm-svn-test-at-sign>
D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv
n.exe co file://D:\Entwicklung\svn-repos\scm-svn-test-at-sign .
svn: E235000: In file '..\..\..\subversion\libsvn_client\checkout.c' line
88: assertion failed (svn_uri_is_canonical(url, scratch_pool))
I know that the URL should start with file:///, but I would expect something
like "invalid URL". The assert failed isn't really helpful to the user.
Ideas?
Michael
Hello Michael,
Agreed that Subversion shouldn't crash on that.
I don't have much time to look into it further, but I've quickly done
a few tests on the command line. It seems you only get this crash if
you use a backslash (which is normal on Windows of course) after the
'D:'. If you use a forward slash it doesn't crash.
So it seems that in that particular case, in libsvn_subr/dirent_uri.c
[1], svn_uri_is_canonical() does not agree with the output of
svn_uri_canonicalize().
[1]
http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_subr/dirent_uri.c
Thanks Johan,
shall I file an issue in JIRA?
Yes, please go ahead with that, to make sure we don't forget about
this. Not sure if anyone will get to this soonish, but having the
issue on record is a good first step in any case.
Done: https://issues.apache.org/jira/browse/SVN-4732

Loading...