You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steve Nash <st...@mementoSolutions.com> on 2005/09/12 16:51:08 UTC

Assertion failed: is_canonical (base, blen)

I originally raised this on the vss2svn mailing list. I was advised that I
was seeing a subversion issue rather than something in vss2svn and should
bring it up on the subversion lists.

I'm running vss2svn.pl (revision 51) as a perl script on Windows XP with
perl 5.8. I'm running against subversion 1.2.0 on Apache 2.0.54.

I'm getting an assertion error "Assertion failed: is_canonical (base,
blen),".

The logfile.txt from vss2svn contains the following error: -

=========================================

**** SETTING UP SUBVERSION DIRECTORIES ****

   Checking out working copy...
Assertion failed: is_canonical (base, blen), file
C:\Home\brane\src\svn\subversion-1.2.0-rc4\subversion\libsvn_subr\path.c,
line 114

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.

=========================================

I've attached the complete logfile as well. Are there any other diagnostics
that would help? 

I've tried adding a "/" to the end of the Subversion URL to no avail (as
suggested by the vss2svn guys).

The vss2svn DOS window looks like this: -

===============================

G:\Subversion>perl vss2svn.pl.rev51 --vssproject
$/MarketingImprovements/src/com/markimp/ant --svnrepo
http://mementotest/VSSMarkImp   --noprompt --nolabel

Cleaning up any previous vss2svn runs...


         ss.exe Found: F:\Visual_Source_Safe\win32\ss.exe

          VSS Project: $/MarketingImprovements/src/com/markimp/ant
       Subversion URL: http://mementotest/VSSMarkImp

    Local Date Format: DD/MM/YY
    Local Time Format: HH:MM
 Time Bias To Get GMT: -60 minutes
   Bias to use in DST: -60 minutes

     Set SVN revprops: yes


**** Creating database... ****



**** BUILDING INITIAL STRUCTURES; PLEASE WAIT... ****



**** Enqueueing projects... ****



**** BUILDING VSS HISTORY ****



**** IMPORTING FILE HISTORIES ****

   $/MarketingImprovements/src/com/markimp/ant/Build.java
   $/MarketingImprovements/src/com/markimp/ant/Compiler.java
   $/MarketingImprovements/src/com/markimp/ant/Configure.java
   $/MarketingImprovements/src/com/markimp/ant/JarBuilder.java
   $/MarketingImprovements/src/com/markimp/ant/MITask.java
   $/MarketingImprovements/src/com/markimp/ant/VersionControl.java
   $/MarketingImprovements/src/com/markimp/ant/VersionNumber.java
   $/MarketingImprovements/src/com/markimp/ant/WarBuilder.java
   $/MarketingImprovements/src/com/markimp/ant/configure.properties


**** DONE BUILDING VSS HISTORY ****



**** SETTING UP SUBVERSION DIRECTORIES ****

   Checking out working copy.

=====================================


Regards,

Steve Nash

 

Re: Assertion failed: is_canonical (base, blen)

Posted by Maxim Abrashkin <ma...@yandex.ru>.
Hello,

SteveKing wrote:
> 
> 
> This won't solve the problem but make it even worse!
> You just compile the project without the assert() function, which makes 
> then the program crash.

In this case program not crashed.

 From my point of view, assert in release build must not be present at all!

> The assertion is there for a reason! That means the code there assumes 
> that the URL is canonical and doesn't work correctly if it isn't.
> 
> To really fix this, you'd have to find out *why* it asserts there and 
> fix *that* problem.
> 
> Stefan
> 

Let's look at code in libsvn_subr/path.c.
What is_canonical function do?
-----------------------------------
#ifndef NDEBUG
static svn_boolean_t
is_canonical (const char *path,
               apr_size_t len)
{
   return (! SVN_PATH_IS_PLATFORM_EMPTY (path, len)
           && (len <= 1 || path[len-1] != '/'));
}
#endif
-----------------------------------
Yes, it checks path. But last condition "path[len-1] != '/')" makes me 
crazy ;) (i seen this assert in this case), why don't allow '/' at the 
end of path? I don't know.
So if this symbol incorrect at the end of path it must not be checked in 
assert, but processed in normal way.

This function placed in #ifndef NDEBUG section, so it does not work in 
release build (if release definitions is ok).

I can't find any problem with my subversion release build (with NDEBUG 
defined), all code worked as expected.

--
Maxim


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Assertion failed: is_canonical (base, blen)

Posted by SteveKing <st...@wagner-group.ch>.
Maxim Abrashkin wrote:
> Hello,
> 
>>
>> We have received a similar error message running svnserve on the 
>> svn-1.2.3 3 windows runtime.
>>
>> C:\>svnserve -d -r \tmp\merge\test_repository
>> Assertion failed: is_canonical (path->data, path->len), file 
>> C:\Home\brane\src\svn\releases\subversion-1.2.3\subversion\libsvn_subr\path.c, 
>> line 343
>>
>> This has forced us back to the 1.1.4 runtime.
>>
>> Anyone have any insight into what is causing this issue?
>>
>> Thanks,
>> -Mark
> 
> The problem is trivial: incorrect project file generation for Visual 
> Studio.
> 
> To disable assert in release configuration preprocessor definition 
> NDEBUG must be defined, but it missing in generated project file.
> 
> The fix:
> after line 601,602 in gen_win.py
>     if cfg == 'Debug':
>       fakedefines.extend(["_DEBUG","SVN_DEBUG"])
> add this lines
>     else:
>       fakedefines.extend(["NDEBUG"])
> 
> then regenerate project files and rebuild subversion.

This won't solve the problem but make it even worse!
You just compile the project without the assert() function, which makes 
then the program crash.
The assertion is there for a reason! That means the code there assumes 
that the URL is canonical and doesn't work correctly if it isn't.

To really fix this, you'd have to find out *why* it asserts there and 
fix *that* problem.

Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Assertion failed: is_canonical (base, blen)

Posted by Maxim Abrashkin <ma...@yandex.ru>.
Hello,

> 
> We have received a similar error message running svnserve on the 
> svn-1.2.3 3 windows runtime.
> 
> C:\>svnserve -d -r \tmp\merge\test_repository
> Assertion failed: is_canonical (path->data, path->len), file 
> C:\Home\brane\src\svn\releases\subversion-1.2.3\subversion\libsvn_subr\path.c, 
> line 343
> 
> This has forced us back to the 1.1.4 runtime.
> 
> Anyone have any insight into what is causing this issue?
> 
> Thanks,
> -Mark

The problem is trivial: incorrect project file generation for Visual 
Studio.

To disable assert in release configuration preprocessor definition 
NDEBUG must be defined, but it missing in generated project file.

The fix:
after line 601,602 in gen_win.py
     if cfg == 'Debug':
       fakedefines.extend(["_DEBUG","SVN_DEBUG"])
add this lines
     else:
       fakedefines.extend(["NDEBUG"])

then regenerate project files and rebuild subversion.

--
Maxim

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Assertion failed: is_canonical (base, blen)

Posted by Mark W Unger <ma...@gmail.com>.
We have received a similar error message running svnserve on the svn-1.2.3 3 
windows runtime.

C:\>svnserve -d -r \tmp\merge\test_repository
Assertion failed: is_canonical (path->data, path->len), file 
C:\Home\brane\src\svn\releases\subversion-
1.2.3\subversion\libsvn_subr\path.c, line 343

This has forced us back to the 1.1.4 runtime.

Anyone have any insight into what is causing this issue?

Thanks,
-Mark


On 9/12/05, Steve Nash <st...@mementosolutions.com> wrote:
> 
> I originally raised this on the vss2svn mailing list. I was advised that I 
> was seeing a subversion issue rather than something in vss2svn and should 
> bring it up on the subversion lists.
> 
> I'm running vss2svn.pl (revision 51) as a perl script on Windows XP with 
> perl 5.8. I'm running against subversion 1.2.0 on Apache 2.0.54.
> 
> I'm getting an assertion error "Assertion failed: is_canonical (base, 
> blen),". 
> 
> The logfile.txt from vss2svn contains the following error: - 
> 
> ========================================= 
> 
> **** SETTING UP SUBVERSION DIRECTORIES **** 
> 
> Checking out working copy... 
> Assertion failed: is_canonical (base, blen), file 
> C:\Home\brane\src\svn\subversion-1.2.0-rc4\subversion\libsvn_subr\path.c, 
> line 114
> 
> This application has requested the Runtime to terminate it in an unusual 
> way. 
> Please contact the application's support team for more information. 
> 
> ========================================= 
> 
> I've attached the complete logfile as well. Are there any other 
> diagnostics that would help? 
> 
> I've tried adding a "/" to the end of the Subversion URL to no avail (as 
> suggested by the vss2svn guys). 
> 
> The vss2svn DOS window looks like this: - 
> 
> =============================== 
> 
> G:\Subversion>perl vss2svn.pl.rev51 --vssproject 
> $/MarketingImprovements/src/com/markimp/ant --svnrepo *
> http://mementotest/VSSMarkImp* <http://mementotest/VSSMarkImp> --noprompt 
> --nolabel
> 
> Cleaning up any previous vss2svn runs... 
> 
>  ss.exe Found: F:\Visual_Source_Safe\win32\ss.exe 
> 
> VSS Project: $/MarketingImprovements/src/com/markimp/ant 
> Subversion URL: *http://mementotest/VSSMarkImp*<http://mementotest/VSSMarkImp> 
> 
> Local Date Format: DD/MM/YY 
> Local Time Format: HH:MM 
> Time Bias To Get GMT: -60 minutes 
> Bias to use in DST: -60 minutes 
> 
> Set SVN revprops: yes 
> 
> **** Creating database... **** 
> 
> 
> **** BUILDING INITIAL STRUCTURES; PLEASE WAIT... **** 
> 
> 
> **** Enqueueing projects... **** 
> 
> 
> **** BUILDING VSS HISTORY **** 
> 
> 
> **** IMPORTING FILE HISTORIES **** 
> 
> $/MarketingImprovements/src/com/markimp/ant/Build.java 
> $/MarketingImprovements/src/com/markimp/ant/Compiler.java 
> $/MarketingImprovements/src/com/markimp/ant/Configure.java 
> $/MarketingImprovements/src/com/markimp/ant/JarBuilder.java 
> $/MarketingImprovements/src/com/markimp/ant/MITask.java 
> $/MarketingImprovements/src/com/markimp/ant/VersionControl.java 
> $/MarketingImprovements/src/com/markimp/ant/VersionNumber.java 
> $/MarketingImprovements/src/com/markimp/ant/WarBuilder.java 
> $/MarketingImprovements/src/com/markimp/ant/configure.properties 
> 
> **** DONE BUILDING VSS HISTORY **** 
> 
> 
> **** SETTING UP SUBVERSION DIRECTORIES **** 
> 
> Checking out working copy… 
> 
> ===================================== 
> 
> Regards, 
> 
> Steve Nash 
> 
> <<...>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
> 
>