You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2010/12/01 03:12:12 UTC

Re: subversion cross compile (arm)

Takács András wrote on Tue, Nov 30, 2010 at 20:36:55 +0100:
> Hi All,
> 
> I have problem with cross-compiling of subversion for arm. I'm using
> codesourcery toolchain. (See build details below).
> 
> My test method (after flashing my developement board):
> # svnadmin create /var/svn/testrepo
> # svnserve --config-file /etc/svnserve.cfg -d -r /var/svn
> # svn co svn://wakoond@127.0.0.1/testrepo
> # cd testrepo/
> # svn mkdir xxx
> # svn ci -m "aa"
> Adding         xxx
> svn: Commit failed (details follow):
> svn: Corrupt node-revision '0.0.t0-0'
> svn: Malformed text representation offset line in node-rev
> 

I'd use file:/// for testing.

I suppose the next hint (unless someone has tips specific to arm) would
be to see the corrupt lines in the revision file --- can you share them?
You can patch or breakpoint in subversion/libsvn_fs_fs/fs_fs.c (that is
where the error is generated) to find what lines it complains about.

You can pass --enable-maintainer-mode to configure to get some debug
aids: asserts, debug symbols, stack traces in the error message.

> 
> Could you please help me? What's the problem? Is it a build/configure
> or a toolchain/libc problem?
> Did anybody cross-compiled subversion for arm4t platform previously?
> 
> Thanks a lot! Really, I'm very thankful for everything!
> 
> Regards,
> András
> 
> ----------------------------------------------------------------------------------------------------------------------------------------------------
> 
> Toolchain: arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu
> Cross gcc:  arm-none-linux-gnueabi-gcc
> Cross cflags: -march=armv4t -mtune=arm920t
> 
> Apr configure:
> 		./configure \
> 			--prefix=/usr \
> 			--host=$(CROSS_COMPILE) \
> 			ac_cv_file__dev_zero="yes" \
> 			ac_cv_func_setpgrp_void="yes" \
> 			apr_cv_process_shared_works="yes" \
> 			apr_cv_mutex_robust_shared="no" \
> 			apr_cv_tcp_nodelay_with_cork="yes" \
> 			ac_cv_sizeof_struct_iovec="8" \
> 			apr_cv_mutex_recursive="yes" \
> 			CFLAGS=$(CROSS_CFLAGS) \
> 			LDFLAGS=$(CROSS_LDFLAGS)
> 
> Apr-utils configure:
> 		./configure \
> 			--with-apr=<MY_APR_BUILD_DIR> \
> 			--prefix=/usr \
> 			--host=$(CROSS_COMPILE) \
> 			CFLAGS=$(CROSS_CFLAGS) \
> 			LDFLAGS=$(CROSS_LDFLAGS); \
> 
> Subversion configure:
> 	./configure \
> 		--with-apr=$(PACKAGES_DIR)/apr/$(TARGET_PACKAGE)/apr \
> 		--with-apr-util=$(PACKAGES_DIR)/apr-util/$(TARGET_PACKAGE)/apr-util \
> 		--with-sqlite="$(TARGET_DEV_ROOT)/usr" \
> 		--with-zlib="$(TARGET_DEV_ROOT)/usr" \
> 		--host=$(CROSS_COMPILE) \
> 		--prefix=/usr \
> 		CFLAGS=$(CROSS_CFLAGS) \
> 		LDFLAGS=$(CROSS_LDFLAGS)
> 
> Other compiled libraries: sqlite3, zlib
> I'm usung the latest, 1.6.15 subversion and subversion-deps packages.
> (I compiled all libraries from subversion-deps, no other installed library)
> 
> --
> Takács András
> Skype: wakoond
> GTalk: wakoond
> MSN: wakoond@freestart.hu

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Branko Čibej <br...@xbc.nu> writes:

> On 06.12.2010 08:48, Takács András wrote:
>>> Here you are printing 64-bits, so some part of your system thinks that
>>> apr_off_t is 64-bits.  How are apr_off_t and APR_HAS_LARGE_FILES defined
>>> in apr.h?
>> #define APR_HAS_LARGE_FILES       0
>> typedef  off_t           apr_off_t;
>>
>> I think this is OK, isn't it?
>
> That depends on how off_t is defined ... but I expect it should be OK. I
> suggest you find the definition of APR_OFF_T_FMT, could be that that one
> is wrong, expectint 64- instead of 32-bit values.

Ah, yes. If off_t really is 32-bits but APR_OFF_T_FMT is 64-bits then
every write would write an extra 32-bits, thus storing the wrong value,
and every read would modify an extra 32-bits of memory, leading to
corruption.

-- 
Philip

Re: subversion cross compile (arm)

Posted by Branko Čibej <br...@xbc.nu>.
On 06.12.2010 08:48, Takács András wrote:
>> Here you are printing 64-bits, so some part of your system thinks that
>> apr_off_t is 64-bits.  How are apr_off_t and APR_HAS_LARGE_FILES defined
>> in apr.h?
> #define APR_HAS_LARGE_FILES       0
> typedef  off_t           apr_off_t;
>
> I think this is OK, isn't it?

That depends on how off_t is defined ... but I expect it should be OK. I
suggest you find the definition of APR_OFF_T_FMT, could be that that one
is wrong, expectint 64- instead of 32-bit values.

-- Brane

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Takács András <wa...@gmail.com> writes:

>> Here you are printing 64-bits, so some part of your system thinks that
>> apr_off_t is 64-bits.  How are apr_off_t and APR_HAS_LARGE_FILES defined
>> in apr.h?
>
> #define APR_HAS_LARGE_FILES       0
> typedef  off_t           apr_off_t;
>
> I think this is OK, isn't it?

It shows that APR is just following the rest of the system.  When you
printed values you showed 64 bits so it looks like off_t is 64-bits,
which conflicts with your earlier statement that you were using 32-bit
file offsets.  However the 64-bit values you printed look as if the
lower 32-bits are valid and the higher 32-bits are junk.  Your
environment appears to be confused about the size of file offsets.

-- 
Philip

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Takács András <wa...@gmail.com> writes:

>> Here you are printing 64-bits, so some part of your system thinks that
>> apr_off_t is 64-bits.  How are apr_off_t and APR_HAS_LARGE_FILES defined
>> in apr.h?
>
> #define APR_HAS_LARGE_FILES       0
> typedef  off_t           apr_off_t;
>
> I think this is OK, isn't it?

It shows that APR is just following the rest of the system.  When you
printed values you showed 64 bits so it looks like off_t is 64-bits,
which conflicts with your earlier statement that you were using 32-bit
file offsets.  However the 64-bit values you printed look as if the
lower 32-bits are valid and the higher 32-bits are junk.  Your
environment appears to be confused about the size of file offsets.

-- 
Philip

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
> Here you are printing 64-bits, so some part of your system thinks that
> apr_off_t is 64-bits.  How are apr_off_t and APR_HAS_LARGE_FILES defined
> in apr.h?

#define APR_HAS_LARGE_FILES       0
typedef  off_t           apr_off_t;

I think this is OK, isn't it?

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
> Here you are printing 64-bits, so some part of your system thinks that
> apr_off_t is 64-bits.  How are apr_off_t and APR_HAS_LARGE_FILES defined
> in apr.h?

#define APR_HAS_LARGE_FILES       0
typedef  off_t           apr_off_t;

I think this is OK, isn't it?

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Takács András <wa...@gmail.com> writes:

> I checked my toolchain. It's using 32 bit file offsets.
> I tried an other toolchain (ct-ng + eglibc). Same result. :(
>
> 2010/12/3 Philip Martin <ph...@wandisco.com>:
>> Takács András <wa...@gmail.com> writes:
>>
>>> Here at the nodrerev->data_rep section I preinted out the revision,
>>> offset, size, enpanded_size fields from the noderev->data_rep
>>> structure:
>>>
>>> rev 0
>>> offs 4618629949752868864
>>
>> In hex: 4018AB7800000000

Here you are printing 64-bits, so some part of your system thinks that
apr_off_t is 64-bits.  How are apr_off_t and APR_HAS_LARGE_FILES defined
in apr.h?

-- 
Philip

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Takács András <wa...@gmail.com> writes:

> I checked my toolchain. It's using 32 bit file offsets.
> I tried an other toolchain (ct-ng + eglibc). Same result. :(
>
> 2010/12/3 Philip Martin <ph...@wandisco.com>:
>> Takács András <wa...@gmail.com> writes:
>>
>>> Here at the nodrerev->data_rep section I preinted out the revision,
>>> offset, size, enpanded_size fields from the noderev->data_rep
>>> structure:
>>>
>>> rev 0
>>> offs 4618629949752868864
>>
>> In hex: 4018AB7800000000

Here you are printing 64-bits, so some part of your system thinks that
apr_off_t is 64-bits.  How are apr_off_t and APR_HAS_LARGE_FILES defined
in apr.h?

-- 
Philip

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
I checked my toolchain. It's using 32 bit file offsets.
I tried an other toolchain (ct-ng + eglibc). Same result. :(

--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond@freestart.hu



2010/12/3 Philip Martin <ph...@wandisco.com>:
> Takács András <wa...@gmail.com> writes:
>
>> One more interesting addition:
>>
>> The representation_string function is called from svn_fs_fs__write_noderev.
>> Here at the nodrerev->data_rep section I preinted out the revision,
>> offset, size, enpanded_size fields from the noderev->data_rep
>> structure:
>>
>> rev 0
>> offs 4618629949752868864
>
> In hex: 4018AB7800000000
>
>> size 4
>> exp size 4
>> md5 2d2977d1c96f487abe4a1e202dd03b4e
>>
>> The offset seems to be quite high. Is it normal?
>>
>> The next debug step is in the representation_string function. Before
>> calling the apr_psprintf function, I printed out again the fields:
>>
>> rs rev 0
>> rs offs 4618628953320456192
>
> in hex: 4018AA9000000000
>
>> rs size 4
>> rs exp size 4
>> rs md5 2d2977d1c96f487abe4a1e202dd03b4e
>>
>
> At a guess its a 32/64 bit issue.  Are you using 64 file offsets?
>
> --
> Philip
>

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
I checked my toolchain. It's using 32 bit file offsets.
I tried an other toolchain (ct-ng + eglibc). Same result. :(

--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond@freestart.hu



2010/12/3 Philip Martin <ph...@wandisco.com>:
> Takács András <wa...@gmail.com> writes:
>
>> One more interesting addition:
>>
>> The representation_string function is called from svn_fs_fs__write_noderev.
>> Here at the nodrerev->data_rep section I preinted out the revision,
>> offset, size, enpanded_size fields from the noderev->data_rep
>> structure:
>>
>> rev 0
>> offs 4618629949752868864
>
> In hex: 4018AB7800000000
>
>> size 4
>> exp size 4
>> md5 2d2977d1c96f487abe4a1e202dd03b4e
>>
>> The offset seems to be quite high. Is it normal?
>>
>> The next debug step is in the representation_string function. Before
>> calling the apr_psprintf function, I printed out again the fields:
>>
>> rs rev 0
>> rs offs 4618628953320456192
>
> in hex: 4018AA9000000000
>
>> rs size 4
>> rs exp size 4
>> rs md5 2d2977d1c96f487abe4a1e202dd03b4e
>>
>
> At a guess its a 32/64 bit issue.  Are you using 64 file offsets?
>
> --
> Philip
>

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> Takács András <wa...@gmail.com> writes:
>
>> The next debug step is in the representation_string function. Before
>> calling the apr_psprintf function, I printed out again the fields:
>>
>> rs rev 0
>> rs offs 4618628953320456192
>
> in hex: 4018AA9000000000
>
>> rs size 4
>> rs exp size 4
>> rs md5 2d2977d1c96f487abe4a1e202dd03b4e
>>
>
> At a guess its a 32/64 bit issue.  Are you using 64 file offsets?

Obviously you are printing 64-bit offsets, so some part of your system
uses 64-bit offsets.  I think the problem is that some other part of
your system is only writing 32-bits into 64-bits of memory, and leaving
the higher 32-bits with random values.

-- 
Philip

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> Takács András <wa...@gmail.com> writes:
>
>> The next debug step is in the representation_string function. Before
>> calling the apr_psprintf function, I printed out again the fields:
>>
>> rs rev 0
>> rs offs 4618628953320456192
>
> in hex: 4018AA9000000000
>
>> rs size 4
>> rs exp size 4
>> rs md5 2d2977d1c96f487abe4a1e202dd03b4e
>>
>
> At a guess its a 32/64 bit issue.  Are you using 64 file offsets?

Obviously you are printing 64-bit offsets, so some part of your system
uses 64-bit offsets.  I think the problem is that some other part of
your system is only writing 32-bits into 64-bits of memory, and leaving
the higher 32-bits with random values.

-- 
Philip

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Takács András <wa...@gmail.com> writes:

> One more interesting addition:
>
> The representation_string function is called from svn_fs_fs__write_noderev.
> Here at the nodrerev->data_rep section I preinted out the revision,
> offset, size, enpanded_size fields from the noderev->data_rep
> structure:
>
> rev 0
> offs 4618629949752868864

In hex: 4018AB7800000000

> size 4
> exp size 4
> md5 2d2977d1c96f487abe4a1e202dd03b4e
>
> The offset seems to be quite high. Is it normal?
>
> The next debug step is in the representation_string function. Before
> calling the apr_psprintf function, I printed out again the fields:
>
> rs rev 0
> rs offs 4618628953320456192

in hex: 4018AA9000000000

> rs size 4
> rs exp size 4
> rs md5 2d2977d1c96f487abe4a1e202dd03b4e
>

At a guess its a 32/64 bit issue.  Are you using 64 file offsets?

-- 
Philip

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Takács András <wa...@gmail.com> writes:

> One more interesting addition:
>
> The representation_string function is called from svn_fs_fs__write_noderev.
> Here at the nodrerev->data_rep section I preinted out the revision,
> offset, size, enpanded_size fields from the noderev->data_rep
> structure:
>
> rev 0
> offs 4618629949752868864

In hex: 4018AB7800000000

> size 4
> exp size 4
> md5 2d2977d1c96f487abe4a1e202dd03b4e
>
> The offset seems to be quite high. Is it normal?
>
> The next debug step is in the representation_string function. Before
> calling the apr_psprintf function, I printed out again the fields:
>
> rs rev 0
> rs offs 4618628953320456192

in hex: 4018AA9000000000

> rs size 4
> rs exp size 4
> rs md5 2d2977d1c96f487abe4a1e202dd03b4e
>

At a guess its a 32/64 bit issue.  Are you using 64 file offsets?

-- 
Philip

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
One more interesting addition:

The representation_string function is called from svn_fs_fs__write_noderev.
Here at the nodrerev->data_rep section I preinted out the revision,
offset, size, enpanded_size fields from the noderev->data_rep
structure:

rev 0
offs 4618629949752868864
size 4
exp size 4
md5 2d2977d1c96f487abe4a1e202dd03b4e

The offset seems to be quite high. Is it normal?

The next debug step is in the representation_string function. Before
calling the apr_psprintf function, I printed out again the fields:

rs rev 0
rs offs 4618628953320456192
rs size 4
rs exp size 4
rs md5 2d2977d1c96f487abe4a1e202dd03b4e

Compare the offs and the rs offs lines! The values are modified. How????
I did a small test again, and before my debug lines in the
representation_string function, I did this:

rep->offset = 400;

The result:

rs rev 0
rs offs 4618629039219802512
rs size 4
rs exp size 4
rs md5 2d2977d1c96f487abe4a1e202dd03b4e

The offs field modified again, but this isn't 400!!! How????

I think it is a memory corruption thing, but I don't know where to find it!


Thanks a lot every small idea!



András

--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond@freestart.hu



2010/12/3 Takács András <wa...@gmail.com>:
> The problems seems to be somewhere between the generation
> (representation_string) and the writing of the
> /var/svn/testrepo/db/transactions/0-0.txn/node.0.0 file.
> The bugous string will be in the file.
>
> I'll try to locate the bug at the weekend.
>
> András
>
>
>
> --
> Takács András
> Skype: wakoond
> GTalk: wakoond
> MSN: wakoond@freestart.hu
>
>
>
> 2010/12/3 Philip Martin <ph...@wandisco.com>:
>> Takács András <wa...@gmail.com> writes:
>>
>>> 2010/12/3 Philip Martin <ph...@wandisco.com>:
>>>> Takács András <wa...@gmail.com> writes:
>>>>
>>>>> / # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
>>>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
>>>>> 2d2977d1c96f487abe4a1e202dd03b4e'
>>>>> read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
>>>>> read_rep_offsets: [LINE 1956] '0'
>>>>> read_rep_offsets: [LINE 1973] '0'
>>>>> read_rep_offsets: [LINE 1984] '4'
>>>>> read_rep_offsets: [LINE 1995] '4'
>>>>> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
>>>>> apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
>>>>> Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
>>>>> svn_fsfs__write_noderev HEADER_TEXT
>>>>> rev 0
>>>>> offs 4618626049922564096
>>>>> size 4
>>>>> exp size 4
>>>>> md5 2d2977d1c96f487abe4a1e202dd03b4e
>>>>> svn_fsfs__write_noderev HEADER_TEXT OK
>>>>
>>>> So here the file should contain the line
>>>>
>>>> text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
>>>
>>> This line is in /var/svn/testrepo/db/revs/0/0 file.
>>> It is parsed correctly.
>>
>> The new file
>>  '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
>> should also contain that same line.  Does it?
>>
>>>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
>>>>> read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'
>>>>
>>>> but here when you read the file you get the wrong data.  Is the file
>>>> corrupt or does the problem occur svn_fs_fs__read_noderev?
>>>
>>> I don't know the internal mechanism of subversion, so I don't know
>>> what is this second text representation.
>>> I guess it is generated for the committing (next) revision.
>>> The issue coming (I think) from this function: svn_fsfs__write_noderev
>>> which is called from svn_fs_fs__put_node_revision
>>
>> The problem appears to be the data in the transactions/0-0.txn/node.0.0
>> file.  Either it is getting corrupted when written to the file, or when
>> subsequently read from the file.
>>
>> --
>> Philip
>>
>

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
One more interesting addition:

The representation_string function is called from svn_fs_fs__write_noderev.
Here at the nodrerev->data_rep section I preinted out the revision,
offset, size, enpanded_size fields from the noderev->data_rep
structure:

rev 0
offs 4618629949752868864
size 4
exp size 4
md5 2d2977d1c96f487abe4a1e202dd03b4e

The offset seems to be quite high. Is it normal?

The next debug step is in the representation_string function. Before
calling the apr_psprintf function, I printed out again the fields:

rs rev 0
rs offs 4618628953320456192
rs size 4
rs exp size 4
rs md5 2d2977d1c96f487abe4a1e202dd03b4e

Compare the offs and the rs offs lines! The values are modified. How????
I did a small test again, and before my debug lines in the
representation_string function, I did this:

rep->offset = 400;

The result:

rs rev 0
rs offs 4618629039219802512
rs size 4
rs exp size 4
rs md5 2d2977d1c96f487abe4a1e202dd03b4e

The offs field modified again, but this isn't 400!!! How????

I think it is a memory corruption thing, but I don't know where to find it!


Thanks a lot every small idea!



András

--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond@freestart.hu



2010/12/3 Takács András <wa...@gmail.com>:
> The problems seems to be somewhere between the generation
> (representation_string) and the writing of the
> /var/svn/testrepo/db/transactions/0-0.txn/node.0.0 file.
> The bugous string will be in the file.
>
> I'll try to locate the bug at the weekend.
>
> András
>
>
>
> --
> Takács András
> Skype: wakoond
> GTalk: wakoond
> MSN: wakoond@freestart.hu
>
>
>
> 2010/12/3 Philip Martin <ph...@wandisco.com>:
>> Takács András <wa...@gmail.com> writes:
>>
>>> 2010/12/3 Philip Martin <ph...@wandisco.com>:
>>>> Takács András <wa...@gmail.com> writes:
>>>>
>>>>> / # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
>>>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
>>>>> 2d2977d1c96f487abe4a1e202dd03b4e'
>>>>> read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
>>>>> read_rep_offsets: [LINE 1956] '0'
>>>>> read_rep_offsets: [LINE 1973] '0'
>>>>> read_rep_offsets: [LINE 1984] '4'
>>>>> read_rep_offsets: [LINE 1995] '4'
>>>>> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
>>>>> apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
>>>>> Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
>>>>> svn_fsfs__write_noderev HEADER_TEXT
>>>>> rev 0
>>>>> offs 4618626049922564096
>>>>> size 4
>>>>> exp size 4
>>>>> md5 2d2977d1c96f487abe4a1e202dd03b4e
>>>>> svn_fsfs__write_noderev HEADER_TEXT OK
>>>>
>>>> So here the file should contain the line
>>>>
>>>> text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
>>>
>>> This line is in /var/svn/testrepo/db/revs/0/0 file.
>>> It is parsed correctly.
>>
>> The new file
>>  '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
>> should also contain that same line.  Does it?
>>
>>>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
>>>>> read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'
>>>>
>>>> but here when you read the file you get the wrong data.  Is the file
>>>> corrupt or does the problem occur svn_fs_fs__read_noderev?
>>>
>>> I don't know the internal mechanism of subversion, so I don't know
>>> what is this second text representation.
>>> I guess it is generated for the committing (next) revision.
>>> The issue coming (I think) from this function: svn_fsfs__write_noderev
>>> which is called from svn_fs_fs__put_node_revision
>>
>> The problem appears to be the data in the transactions/0-0.txn/node.0.0
>> file.  Either it is getting corrupted when written to the file, or when
>> subsequently read from the file.
>>
>> --
>> Philip
>>
>

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
The problems seems to be somewhere between the generation
(representation_string) and the writing of the
/var/svn/testrepo/db/transactions/0-0.txn/node.0.0 file.
The bugous string will be in the file.

I'll try to locate the bug at the weekend.

András



--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond@freestart.hu



2010/12/3 Philip Martin <ph...@wandisco.com>:
> Takács András <wa...@gmail.com> writes:
>
>> 2010/12/3 Philip Martin <ph...@wandisco.com>:
>>> Takács András <wa...@gmail.com> writes:
>>>
>>>> / # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
>>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
>>>> 2d2977d1c96f487abe4a1e202dd03b4e'
>>>> read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
>>>> read_rep_offsets: [LINE 1956] '0'
>>>> read_rep_offsets: [LINE 1973] '0'
>>>> read_rep_offsets: [LINE 1984] '4'
>>>> read_rep_offsets: [LINE 1995] '4'
>>>> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
>>>> apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
>>>> Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
>>>> svn_fsfs__write_noderev HEADER_TEXT
>>>> rev 0
>>>> offs 4618626049922564096
>>>> size 4
>>>> exp size 4
>>>> md5 2d2977d1c96f487abe4a1e202dd03b4e
>>>> svn_fsfs__write_noderev HEADER_TEXT OK
>>>
>>> So here the file should contain the line
>>>
>>> text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
>>
>> This line is in /var/svn/testrepo/db/revs/0/0 file.
>> It is parsed correctly.
>
> The new file
>  '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
> should also contain that same line.  Does it?
>
>>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
>>>> read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'
>>>
>>> but here when you read the file you get the wrong data.  Is the file
>>> corrupt or does the problem occur svn_fs_fs__read_noderev?
>>
>> I don't know the internal mechanism of subversion, so I don't know
>> what is this second text representation.
>> I guess it is generated for the committing (next) revision.
>> The issue coming (I think) from this function: svn_fsfs__write_noderev
>> which is called from svn_fs_fs__put_node_revision
>
> The problem appears to be the data in the transactions/0-0.txn/node.0.0
> file.  Either it is getting corrupted when written to the file, or when
> subsequently read from the file.
>
> --
> Philip
>

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
The problems seems to be somewhere between the generation
(representation_string) and the writing of the
/var/svn/testrepo/db/transactions/0-0.txn/node.0.0 file.
The bugous string will be in the file.

I'll try to locate the bug at the weekend.

András



--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond@freestart.hu



2010/12/3 Philip Martin <ph...@wandisco.com>:
> Takács András <wa...@gmail.com> writes:
>
>> 2010/12/3 Philip Martin <ph...@wandisco.com>:
>>> Takács András <wa...@gmail.com> writes:
>>>
>>>> / # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
>>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
>>>> 2d2977d1c96f487abe4a1e202dd03b4e'
>>>> read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
>>>> read_rep_offsets: [LINE 1956] '0'
>>>> read_rep_offsets: [LINE 1973] '0'
>>>> read_rep_offsets: [LINE 1984] '4'
>>>> read_rep_offsets: [LINE 1995] '4'
>>>> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
>>>> apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
>>>> Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
>>>> svn_fsfs__write_noderev HEADER_TEXT
>>>> rev 0
>>>> offs 4618626049922564096
>>>> size 4
>>>> exp size 4
>>>> md5 2d2977d1c96f487abe4a1e202dd03b4e
>>>> svn_fsfs__write_noderev HEADER_TEXT OK
>>>
>>> So here the file should contain the line
>>>
>>> text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
>>
>> This line is in /var/svn/testrepo/db/revs/0/0 file.
>> It is parsed correctly.
>
> The new file
>  '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
> should also contain that same line.  Does it?
>
>>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
>>>> read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'
>>>
>>> but here when you read the file you get the wrong data.  Is the file
>>> corrupt or does the problem occur svn_fs_fs__read_noderev?
>>
>> I don't know the internal mechanism of subversion, so I don't know
>> what is this second text representation.
>> I guess it is generated for the committing (next) revision.
>> The issue coming (I think) from this function: svn_fsfs__write_noderev
>> which is called from svn_fs_fs__put_node_revision
>
> The problem appears to be the data in the transactions/0-0.txn/node.0.0
> file.  Either it is getting corrupted when written to the file, or when
> subsequently read from the file.
>
> --
> Philip
>

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Takács András <wa...@gmail.com> writes:

> 2010/12/3 Philip Martin <ph...@wandisco.com>:
>> Takács András <wa...@gmail.com> writes:
>>
>>> / # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
>>> 2d2977d1c96f487abe4a1e202dd03b4e'
>>> read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
>>> read_rep_offsets: [LINE 1956] '0'
>>> read_rep_offsets: [LINE 1973] '0'
>>> read_rep_offsets: [LINE 1984] '4'
>>> read_rep_offsets: [LINE 1995] '4'
>>> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
>>> apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
>>> Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
>>> svn_fsfs__write_noderev HEADER_TEXT
>>> rev 0
>>> offs 4618626049922564096
>>> size 4
>>> exp size 4
>>> md5 2d2977d1c96f487abe4a1e202dd03b4e
>>> svn_fsfs__write_noderev HEADER_TEXT OK
>>
>> So here the file should contain the line
>>
>> text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
>
> This line is in /var/svn/testrepo/db/revs/0/0 file.
> It is parsed correctly.

The new file 
 '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
should also contain that same line.  Does it?

>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
>>> read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'
>>
>> but here when you read the file you get the wrong data.  Is the file
>> corrupt or does the problem occur svn_fs_fs__read_noderev?
>
> I don't know the internal mechanism of subversion, so I don't know
> what is this second text representation.
> I guess it is generated for the committing (next) revision.
> The issue coming (I think) from this function: svn_fsfs__write_noderev
> which is called from svn_fs_fs__put_node_revision

The problem appears to be the data in the transactions/0-0.txn/node.0.0
file.  Either it is getting corrupted when written to the file, or when
subsequently read from the file.

-- 
Philip

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Takács András <wa...@gmail.com> writes:

> 2010/12/3 Philip Martin <ph...@wandisco.com>:
>> Takács András <wa...@gmail.com> writes:
>>
>>> / # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
>>> 2d2977d1c96f487abe4a1e202dd03b4e'
>>> read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
>>> read_rep_offsets: [LINE 1956] '0'
>>> read_rep_offsets: [LINE 1973] '0'
>>> read_rep_offsets: [LINE 1984] '4'
>>> read_rep_offsets: [LINE 1995] '4'
>>> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
>>> apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
>>> Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
>>> svn_fsfs__write_noderev HEADER_TEXT
>>> rev 0
>>> offs 4618626049922564096
>>> size 4
>>> exp size 4
>>> md5 2d2977d1c96f487abe4a1e202dd03b4e
>>> svn_fsfs__write_noderev HEADER_TEXT OK
>>
>> So here the file should contain the line
>>
>> text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
>
> This line is in /var/svn/testrepo/db/revs/0/0 file.
> It is parsed correctly.

The new file 
 '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
should also contain that same line.  Does it?

>>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>>> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
>>> read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'
>>
>> but here when you read the file you get the wrong data.  Is the file
>> corrupt or does the problem occur svn_fs_fs__read_noderev?
>
> I don't know the internal mechanism of subversion, so I don't know
> what is this second text representation.
> I guess it is generated for the committing (next) revision.
> The issue coming (I think) from this function: svn_fsfs__write_noderev
> which is called from svn_fs_fs__put_node_revision

The problem appears to be the data in the transactions/0-0.txn/node.0.0
file.  Either it is getting corrupted when written to the file, or when
subsequently read from the file.

-- 
Philip

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
2010/12/3 Philip Martin <ph...@wandisco.com>:
> Takács András <wa...@gmail.com> writes:
>
>> / # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
>> 2d2977d1c96f487abe4a1e202dd03b4e'
>> read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
>> read_rep_offsets: [LINE 1956] '0'
>> read_rep_offsets: [LINE 1973] '0'
>> read_rep_offsets: [LINE 1984] '4'
>> read_rep_offsets: [LINE 1995] '4'
>> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
>> apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
>> Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
>> svn_fsfs__write_noderev HEADER_TEXT
>> rev 0
>> offs 4618626049922564096
>> size 4
>> exp size 4
>> md5 2d2977d1c96f487abe4a1e202dd03b4e
>> svn_fsfs__write_noderev HEADER_TEXT OK
>
> So here the file should contain the line
>
> text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e

This line is in /var/svn/testrepo/db/revs/0/0 file.
It is parsed correctly.

>
>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
>> read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'
>
> but here when you read the file you get the wrong data.  Is the file
> corrupt or does the problem occur svn_fs_fs__read_noderev?

I don't know the internal mechanism of subversion, so I don't know
what is this second text representation.
I guess it is generated for the committing (next) revision.
The issue coming (I think) from this function: svn_fsfs__write_noderev
which is called from svn_fs_fs__put_node_revision

>
>> read_rep_offsets: [LINE 1956] '0'
>> read_rep_offsets: [LINE 1973] '4'
>> read_rep_offsets: [LINE 1984] '4'
>> read_rep_offsets: [LINE 1995] '531704'
>> subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
>> svn: Corrupt node-revision '0.0.t0-0'
>> subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
>> svn: Malformed text representation offset line in node-rev
>> read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
>> strlen(str) 6 (APR_MD5_DIGESTS
>> IZE*2) 32 revision 0 offset 4 size 0 expsize 4
>
> --
> Philip
>

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
2010/12/3 Philip Martin <ph...@wandisco.com>:
> Takács András <wa...@gmail.com> writes:
>
>> / # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
>> 2d2977d1c96f487abe4a1e202dd03b4e'
>> read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
>> read_rep_offsets: [LINE 1956] '0'
>> read_rep_offsets: [LINE 1973] '0'
>> read_rep_offsets: [LINE 1984] '4'
>> read_rep_offsets: [LINE 1995] '4'
>> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
>> apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
>> Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
>> svn_fsfs__write_noderev HEADER_TEXT
>> rev 0
>> offs 4618626049922564096
>> size 4
>> exp size 4
>> md5 2d2977d1c96f487abe4a1e202dd03b4e
>> svn_fsfs__write_noderev HEADER_TEXT OK
>
> So here the file should contain the line
>
> text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e

This line is in /var/svn/testrepo/db/revs/0/0 file.
It is parsed correctly.

>
>> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
>> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
>> read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'
>
> but here when you read the file you get the wrong data.  Is the file
> corrupt or does the problem occur svn_fs_fs__read_noderev?

I don't know the internal mechanism of subversion, so I don't know
what is this second text representation.
I guess it is generated for the committing (next) revision.
The issue coming (I think) from this function: svn_fsfs__write_noderev
which is called from svn_fs_fs__put_node_revision

>
>> read_rep_offsets: [LINE 1956] '0'
>> read_rep_offsets: [LINE 1973] '4'
>> read_rep_offsets: [LINE 1984] '4'
>> read_rep_offsets: [LINE 1995] '531704'
>> subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
>> svn: Corrupt node-revision '0.0.t0-0'
>> subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
>> svn: Malformed text representation offset line in node-rev
>> read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
>> strlen(str) 6 (APR_MD5_DIGESTS
>> IZE*2) 32 revision 0 offset 4 size 0 expsize 4
>
> --
> Philip
>

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Takács András <wa...@gmail.com> writes:

> / # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
> 2d2977d1c96f487abe4a1e202dd03b4e'
> read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
> read_rep_offsets: [LINE 1956] '0'
> read_rep_offsets: [LINE 1973] '0'
> read_rep_offsets: [LINE 1984] '4'
> read_rep_offsets: [LINE 1995] '4'
> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
> apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
> Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
> svn_fsfs__write_noderev HEADER_TEXT
> rev 0
> offs 4618626049922564096
> size 4
> exp size 4
> md5 2d2977d1c96f487abe4a1e202dd03b4e
> svn_fsfs__write_noderev HEADER_TEXT OK

So here the file should contain the line

text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e

> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
> read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'

but here when you read the file you get the wrong data.  Is the file
corrupt or does the problem occur svn_fs_fs__read_noderev?

> read_rep_offsets: [LINE 1956] '0'
> read_rep_offsets: [LINE 1973] '4'
> read_rep_offsets: [LINE 1984] '4'
> read_rep_offsets: [LINE 1995] '531704'
> subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
> svn: Corrupt node-revision '0.0.t0-0'
> subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
> svn: Malformed text representation offset line in node-rev
> read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
> strlen(str) 6 (APR_MD5_DIGESTS
> IZE*2) 32 revision 0 offset 4 size 0 expsize 4

-- 
Philip

Re: subversion cross compile (arm)

Posted by Philip Martin <ph...@wandisco.com>.
Takács András <wa...@gmail.com> writes:

> / # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
> 2d2977d1c96f487abe4a1e202dd03b4e'
> read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
> read_rep_offsets: [LINE 1956] '0'
> read_rep_offsets: [LINE 1973] '0'
> read_rep_offsets: [LINE 1984] '4'
> read_rep_offsets: [LINE 1995] '4'
> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
> apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
> Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
> svn_fsfs__write_noderev HEADER_TEXT
> rev 0
> offs 4618626049922564096
> size 4
> exp size 4
> md5 2d2977d1c96f487abe4a1e202dd03b4e
> svn_fsfs__write_noderev HEADER_TEXT OK

So here the file should contain the line

text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e

> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
> read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'

but here when you read the file you get the wrong data.  Is the file
corrupt or does the problem occur svn_fs_fs__read_noderev?

> read_rep_offsets: [LINE 1956] '0'
> read_rep_offsets: [LINE 1973] '4'
> read_rep_offsets: [LINE 1984] '4'
> read_rep_offsets: [LINE 1995] '531704'
> subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
> svn: Corrupt node-revision '0.0.t0-0'
> subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
> svn: Malformed text representation offset line in node-rev
> read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
> strlen(str) 6 (APR_MD5_DIGESTS
> IZE*2) 32 revision 0 offset 4 size 0 expsize 4

-- 
Philip

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
Hi!

I continued the work on my issue.
It seems to be a memory allocation or over-writing problem.

There is the section (see between HEADER_TEXT and HEADER_TEXT OK)
where it calling representation_string, which has to generate the
'text: ...' string. I printed out the input parameters.
Later, there is a totally different string (at the parsing section, at
the bottom of the log).

If I'm changing the order of the debug print lines (rev, offset, size,
etc) The value of these are changing too (everything else is the
same).
Ie: If there is only the rev: ... debug line, the result is:
rev 4618626049922564096

My imagine is that, this is a memory corruption bug, but I'm unable to
compile valgrind, or any other high level debug utility to my
development board.
Can anybody help me in debugging and fixing???

Regards,
András


/ # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
2d2977d1c96f487abe4a1e202dd03b4e'
read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
read_rep_offsets: [LINE 1956] '0'
read_rep_offsets: [LINE 1973] '0'
read_rep_offsets: [LINE 1984] '4'
read_rep_offsets: [LINE 1995] '4'
read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
svn_fsfs__write_noderev HEADER_TEXT
rev 0
offs 4618626049922564096
size 4
exp size 4
md5 2d2977d1c96f487abe4a1e202dd03b4e
svn_fsfs__write_noderev HEADER_TEXT OK
fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'
read_rep_offsets: [LINE 1956] '0'
read_rep_offsets: [LINE 1973] '4'
read_rep_offsets: [LINE 1984] '4'
read_rep_offsets: [LINE 1995] '531704'
subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
svn: Corrupt node-revision '0.0.t0-0'
subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
svn: Malformed text representation offset line in node-rev
read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
strlen(str) 6 (APR_MD5_DIGESTS
IZE*2) 32 revision 0 offset 4 size 0 expsize 4
/ #


--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond@freestart.hu



2010/12/2 Takács András <wa...@gmail.com>:
> Hi All, Hi daniel,
>
> Daniel, thanks a lot your help, I'm getting more closer to the origin
> of the issue. (I hope.)
> I CC'ed the dev@ list as well, so I'm summarize the problem again.
>
> I'm cross compiling subversion for an ARM9 based development board (mini2440).
> (You'll find my configure options below.)
> This is a totaly clean environbent. There are just the libraries of
> toolchain (codesourcery).
> I built apr, apr-util, zlib, and sqlite from subversion-deps package,
> and the subversion itself.
> It is version 1.6.15.
>
> I'm createing a new repository with svn create, and after it I'm
> trying svn mkdir file:///...
> The result is:
> svn: Commit failed (details follow):
> svn: Corrupt node-revision '0.0.t0-0'
> svn: Malformed text representation offset line in node-rev
>
> Based on Daniel's help, I started to patch fs_fs.c, and adding debug
> messages to it:
> / # svnadmin create /var/svn/testrepo   <=== I'm creating the repository
> / # cat /var/svn/testrepo/db/revs/0/0     <=== Checking the revision
> file. Seems to be OK.
> PLAIN
> END
> ENDREP
> id: 0.0.r0/17
> type: dir
> count: 0
> text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
> cpath: /
>
>
> 17 107
> / # svn mkdir file:///var/svn/testrepo/xxx -m "mmmmm"
> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev   <=== It is the
> bottom of the get_node_revision_body function
> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
> 2d2977d1c96f487abe4a1e202dd03b4e'
> read_rep_offsets: [LINE 1947] '0 0 4 4
> 2d2977d1c96f487abe4a1e202dd03b4e' <== The string parameter of
> read_rep_offsets
> read_rep_offsets: [LINE 1956] '0'  <=== Return str of first apr_strtok
> read_rep_offsets: [LINE 1973] '0'  <=== Return str of second apr_strtok
> read_rep_offsets: [LINE 1984] '4'  <=== Return str of third apr_strtok
> read_rep_offsets: [LINE 1995] '4'  <=== Return str of fourth apr_strtok
> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'  <===
> Return str of fifth apr_strtok
> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
> apr_strtok: [LINE 35] '0.0.t0-0'
> apr_strtok: [LINE 58] '0'
> apr_strtok: [LINE 35] '0.t0-0'
> apr_strtok: [LINE 58] '0'
> apr_strtok: [LINE 35] 't0-0'
> apr_strtok: [LINE 58] 't0-0'
> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 4621479420036127952 (null)'
> read_rep_offsets: [LINE 1947] '0 4 4 4621479420036127952 (null)'
> read_rep_offsets: [LINE 1956] '0'
> read_rep_offsets: [LINE 1973] '4'
> read_rep_offsets: [LINE 1984] '4'
> read_rep_offsets: [LINE 1995] '4621479420036127952'
> subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
> svn: Corrupt node-revision '0.0.t0-0'
> subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
> svn: Malformed text representation offset line in node-rev
> read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
> strlen(str) 6 (APR_MD5_DIGESTS
> IZE*2) 32 revision 0 offset 4 size 0 expsize 4
> / #
>
> I figured out, that the first execution of fs_fs__read_noderev is
> parsing the /var/svn/testrepo/db/revs/0/0 file.
> What is the input of the second execution? I see thet it is in wrong
> format, but what is the origin of this?
>
>
> Thanks a lot!
>
> Regards,
> András
>
>
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Toolchain: arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu
> Cross gcc:  arm-none-linux-gnueabi-gcc
> Cross cflags: -march=armv4t -mtune=arm920t
>
> Apr configure:
>               ./configure \
>                       --prefix=/usr \
>                       --host=$(CROSS_COMPILE) \
>                       ac_cv_file__dev_zero="yes" \
>                       ac_cv_func_setpgrp_void="yes" \
>                       apr_cv_process_shared_works="yes" \
>                       apr_cv_mutex_robust_shared="no" \
>                       apr_cv_tcp_nodelay_with_cork="yes" \
>                       ac_cv_sizeof_struct_iovec="8" \
>                       apr_cv_mutex_recursive="yes" \
>                       CFLAGS=$(CROSS_CFLAGS) \
>                       LDFLAGS=$(CROSS_LDFLAGS)
>
> Apr-utils configure:
>               ./configure \
>                       --with-apr=<MY_APR_BUILD_DIR> \
>                       --prefix=/usr \
>                       --host=$(CROSS_COMPILE) \
>                       CFLAGS=$(CROSS_CFLAGS) \
>                       LDFLAGS=$(CROSS_LDFLAGS); \
>
> Subversion configure:
>       ./configure \
>               --with-apr=$(PACKAGES_DIR)/apr/$(TARGET_PACKAGE)/apr \
>               --with-apr-util=$(PACKAGES_DIR)/apr-util/$(TARGET_PACKAGE)/apr-util
> \
>               --with-sqlite="$(TARGET_DEV_ROOT)/usr" \
>               --with-zlib="$(TARGET_DEV_ROOT)/usr" \
>               --host=$(CROSS_COMPILE) \
>               --prefix=/usr \
>               CFLAGS=$(CROSS_CFLAGS) \
>               LDFLAGS=$(CROSS_LDFLAGS)
>
> Other compiled libraries: sqlite3, zlib
> I'm usung the latest, 1.6.15 subversion and subversion-deps packages.
> (I compiled all libraries from subversion-deps, no other installed library)
>
>
>
>
>
> --
> Takács András
> Skype: wakoond
> GTalk: wakoond
> MSN: wakoond@freestart.hu
>

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
Hi!

I continued the work on my issue.
It seems to be a memory allocation or over-writing problem.

There is the section (see between HEADER_TEXT and HEADER_TEXT OK)
where it calling representation_string, which has to generate the
'text: ...' string. I printed out the input parameters.
Later, there is a totally different string (at the parsing section, at
the bottom of the log).

If I'm changing the order of the debug print lines (rev, offset, size,
etc) The value of these are changing too (everything else is the
same).
Ie: If there is only the rev: ... debug line, the result is:
rev 4618626049922564096

My imagine is that, this is a memory corruption bug, but I'm unable to
compile valgrind, or any other high level debug utility to my
development board.
Can anybody help me in debugging and fixing???

Regards,
András


/ # svn mkdir file:///var/svn/testrepo/xxx -m "aaa"
fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
2d2977d1c96f487abe4a1e202dd03b4e'
read_rep_offsets: [LINE 1947] '0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e'
read_rep_offsets: [LINE 1956] '0'
read_rep_offsets: [LINE 1973] '0'
read_rep_offsets: [LINE 1984] '4'
read_rep_offsets: [LINE 1995] '4'
read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'
apr_file_open: '/var/svn/testrepo/db/transactions/0-0.txn/node.0.0'
Call svn_fsfs__write_noderev in svn_fs_fs__put_node_revision [LINE 2390]
svn_fsfs__write_noderev HEADER_TEXT
rev 0
offs 4618626049922564096
size 4
exp size 4
md5 2d2977d1c96f487abe4a1e202dd03b4e
svn_fsfs__write_noderev HEADER_TEXT OK
fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 531704 (null)'
read_rep_offsets: [LINE 1947] '0 4 4 531704 (null)'
read_rep_offsets: [LINE 1956] '0'
read_rep_offsets: [LINE 1973] '4'
read_rep_offsets: [LINE 1984] '4'
read_rep_offsets: [LINE 1995] '531704'
subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
svn: Corrupt node-revision '0.0.t0-0'
subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
svn: Malformed text representation offset line in node-rev
read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
strlen(str) 6 (APR_MD5_DIGESTS
IZE*2) 32 revision 0 offset 4 size 0 expsize 4
/ #


--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond@freestart.hu



2010/12/2 Takács András <wa...@gmail.com>:
> Hi All, Hi daniel,
>
> Daniel, thanks a lot your help, I'm getting more closer to the origin
> of the issue. (I hope.)
> I CC'ed the dev@ list as well, so I'm summarize the problem again.
>
> I'm cross compiling subversion for an ARM9 based development board (mini2440).
> (You'll find my configure options below.)
> This is a totaly clean environbent. There are just the libraries of
> toolchain (codesourcery).
> I built apr, apr-util, zlib, and sqlite from subversion-deps package,
> and the subversion itself.
> It is version 1.6.15.
>
> I'm createing a new repository with svn create, and after it I'm
> trying svn mkdir file:///...
> The result is:
> svn: Commit failed (details follow):
> svn: Corrupt node-revision '0.0.t0-0'
> svn: Malformed text representation offset line in node-rev
>
> Based on Daniel's help, I started to patch fs_fs.c, and adding debug
> messages to it:
> / # svnadmin create /var/svn/testrepo   <=== I'm creating the repository
> / # cat /var/svn/testrepo/db/revs/0/0     <=== Checking the revision
> file. Seems to be OK.
> PLAIN
> END
> ENDREP
> id: 0.0.r0/17
> type: dir
> count: 0
> text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
> cpath: /
>
>
> 17 107
> / # svn mkdir file:///var/svn/testrepo/xxx -m "mmmmm"
> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev   <=== It is the
> bottom of the get_node_revision_body function
> fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
> 2d2977d1c96f487abe4a1e202dd03b4e'
> read_rep_offsets: [LINE 1947] '0 0 4 4
> 2d2977d1c96f487abe4a1e202dd03b4e' <== The string parameter of
> read_rep_offsets
> read_rep_offsets: [LINE 1956] '0'  <=== Return str of first apr_strtok
> read_rep_offsets: [LINE 1973] '0'  <=== Return str of second apr_strtok
> read_rep_offsets: [LINE 1984] '4'  <=== Return str of third apr_strtok
> read_rep_offsets: [LINE 1995] '4'  <=== Return str of fourth apr_strtok
> read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'  <===
> Return str of fifth apr_strtok
> fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
> apr_strtok: [LINE 35] '0.0.t0-0'
> apr_strtok: [LINE 58] '0'
> apr_strtok: [LINE 35] '0.t0-0'
> apr_strtok: [LINE 58] '0'
> apr_strtok: [LINE 35] 't0-0'
> apr_strtok: [LINE 58] 't0-0'
> fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 4621479420036127952 (null)'
> read_rep_offsets: [LINE 1947] '0 4 4 4621479420036127952 (null)'
> read_rep_offsets: [LINE 1956] '0'
> read_rep_offsets: [LINE 1973] '4'
> read_rep_offsets: [LINE 1984] '4'
> read_rep_offsets: [LINE 1995] '4621479420036127952'
> subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
> svn: Corrupt node-revision '0.0.t0-0'
> subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
> svn: Malformed text representation offset line in node-rev
> read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
> strlen(str) 6 (APR_MD5_DIGESTS
> IZE*2) 32 revision 0 offset 4 size 0 expsize 4
> / #
>
> I figured out, that the first execution of fs_fs__read_noderev is
> parsing the /var/svn/testrepo/db/revs/0/0 file.
> What is the input of the second execution? I see thet it is in wrong
> format, but what is the origin of this?
>
>
> Thanks a lot!
>
> Regards,
> András
>
>
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Toolchain: arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu
> Cross gcc:  arm-none-linux-gnueabi-gcc
> Cross cflags: -march=armv4t -mtune=arm920t
>
> Apr configure:
>               ./configure \
>                       --prefix=/usr \
>                       --host=$(CROSS_COMPILE) \
>                       ac_cv_file__dev_zero="yes" \
>                       ac_cv_func_setpgrp_void="yes" \
>                       apr_cv_process_shared_works="yes" \
>                       apr_cv_mutex_robust_shared="no" \
>                       apr_cv_tcp_nodelay_with_cork="yes" \
>                       ac_cv_sizeof_struct_iovec="8" \
>                       apr_cv_mutex_recursive="yes" \
>                       CFLAGS=$(CROSS_CFLAGS) \
>                       LDFLAGS=$(CROSS_LDFLAGS)
>
> Apr-utils configure:
>               ./configure \
>                       --with-apr=<MY_APR_BUILD_DIR> \
>                       --prefix=/usr \
>                       --host=$(CROSS_COMPILE) \
>                       CFLAGS=$(CROSS_CFLAGS) \
>                       LDFLAGS=$(CROSS_LDFLAGS); \
>
> Subversion configure:
>       ./configure \
>               --with-apr=$(PACKAGES_DIR)/apr/$(TARGET_PACKAGE)/apr \
>               --with-apr-util=$(PACKAGES_DIR)/apr-util/$(TARGET_PACKAGE)/apr-util
> \
>               --with-sqlite="$(TARGET_DEV_ROOT)/usr" \
>               --with-zlib="$(TARGET_DEV_ROOT)/usr" \
>               --host=$(CROSS_COMPILE) \
>               --prefix=/usr \
>               CFLAGS=$(CROSS_CFLAGS) \
>               LDFLAGS=$(CROSS_LDFLAGS)
>
> Other compiled libraries: sqlite3, zlib
> I'm usung the latest, 1.6.15 subversion and subversion-deps packages.
> (I compiled all libraries from subversion-deps, no other installed library)
>
>
>
>
>
> --
> Takács András
> Skype: wakoond
> GTalk: wakoond
> MSN: wakoond@freestart.hu
>

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
Hi All, Hi daniel,

Daniel, thanks a lot your help, I'm getting more closer to the origin
of the issue. (I hope.)
I CC'ed the dev@ list as well, so I'm summarize the problem again.

I'm cross compiling subversion for an ARM9 based development board (mini2440).
(You'll find my configure options below.)
This is a totaly clean environbent. There are just the libraries of
toolchain (codesourcery).
I built apr, apr-util, zlib, and sqlite from subversion-deps package,
and the subversion itself.
It is version 1.6.15.

I'm createing a new repository with svn create, and after it I'm
trying svn mkdir file:///...
The result is:
svn: Commit failed (details follow):
svn: Corrupt node-revision '0.0.t0-0'
svn: Malformed text representation offset line in node-rev

Based on Daniel's help, I started to patch fs_fs.c, and adding debug
messages to it:
/ # svnadmin create /var/svn/testrepo   <=== I'm creating the repository
/ # cat /var/svn/testrepo/db/revs/0/0     <=== Checking the revision
file. Seems to be OK.
PLAIN
END
ENDREP
id: 0.0.r0/17
type: dir
count: 0
text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
cpath: /


17 107
/ # svn mkdir file:///var/svn/testrepo/xxx -m "mmmmm"
fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev   <=== It is the
bottom of the get_node_revision_body function
fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
2d2977d1c96f487abe4a1e202dd03b4e'
read_rep_offsets: [LINE 1947] '0 0 4 4
2d2977d1c96f487abe4a1e202dd03b4e' <== The string parameter of
read_rep_offsets
read_rep_offsets: [LINE 1956] '0'  <=== Return str of first apr_strtok
read_rep_offsets: [LINE 1973] '0'  <=== Return str of second apr_strtok
read_rep_offsets: [LINE 1984] '4'  <=== Return str of third apr_strtok
read_rep_offsets: [LINE 1995] '4'  <=== Return str of fourth apr_strtok
read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'  <===
Return str of fifth apr_strtok
fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
apr_strtok: [LINE 35] '0.0.t0-0'
apr_strtok: [LINE 58] '0'
apr_strtok: [LINE 35] '0.t0-0'
apr_strtok: [LINE 58] '0'
apr_strtok: [LINE 35] 't0-0'
apr_strtok: [LINE 58] 't0-0'
fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 4621479420036127952 (null)'
read_rep_offsets: [LINE 1947] '0 4 4 4621479420036127952 (null)'
read_rep_offsets: [LINE 1956] '0'
read_rep_offsets: [LINE 1973] '4'
read_rep_offsets: [LINE 1984] '4'
read_rep_offsets: [LINE 1995] '4621479420036127952'
subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
svn: Corrupt node-revision '0.0.t0-0'
subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
svn: Malformed text representation offset line in node-rev
read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
strlen(str) 6 (APR_MD5_DIGESTS
IZE*2) 32 revision 0 offset 4 size 0 expsize 4
/ #

I figured out, that the first execution of fs_fs__read_noderev is
parsing the /var/svn/testrepo/db/revs/0/0 file.
What is the input of the second execution? I see thet it is in wrong
format, but what is the origin of this?


Thanks a lot!

Regards,
András




----------------------------------------------------------------------------------------------------------------------------------------------------

Toolchain: arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu
Cross gcc:  arm-none-linux-gnueabi-gcc
Cross cflags: -march=armv4t -mtune=arm920t

Apr configure:
               ./configure \
                       --prefix=/usr \
                       --host=$(CROSS_COMPILE) \
                       ac_cv_file__dev_zero="yes" \
                       ac_cv_func_setpgrp_void="yes" \
                       apr_cv_process_shared_works="yes" \
                       apr_cv_mutex_robust_shared="no" \
                       apr_cv_tcp_nodelay_with_cork="yes" \
                       ac_cv_sizeof_struct_iovec="8" \
                       apr_cv_mutex_recursive="yes" \
                       CFLAGS=$(CROSS_CFLAGS) \
                       LDFLAGS=$(CROSS_LDFLAGS)

Apr-utils configure:
               ./configure \
                       --with-apr=<MY_APR_BUILD_DIR> \
                       --prefix=/usr \
                       --host=$(CROSS_COMPILE) \
                       CFLAGS=$(CROSS_CFLAGS) \
                       LDFLAGS=$(CROSS_LDFLAGS); \

Subversion configure:
       ./configure \
               --with-apr=$(PACKAGES_DIR)/apr/$(TARGET_PACKAGE)/apr \
               --with-apr-util=$(PACKAGES_DIR)/apr-util/$(TARGET_PACKAGE)/apr-util
\
               --with-sqlite="$(TARGET_DEV_ROOT)/usr" \
               --with-zlib="$(TARGET_DEV_ROOT)/usr" \
               --host=$(CROSS_COMPILE) \
               --prefix=/usr \
               CFLAGS=$(CROSS_CFLAGS) \
               LDFLAGS=$(CROSS_LDFLAGS)

Other compiled libraries: sqlite3, zlib
I'm usung the latest, 1.6.15 subversion and subversion-deps packages.
(I compiled all libraries from subversion-deps, no other installed library)





--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond@freestart.hu

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
Hi All, Hi daniel,

Daniel, thanks a lot your help, I'm getting more closer to the origin
of the issue. (I hope.)
I CC'ed the dev@ list as well, so I'm summarize the problem again.

I'm cross compiling subversion for an ARM9 based development board (mini2440).
(You'll find my configure options below.)
This is a totaly clean environbent. There are just the libraries of
toolchain (codesourcery).
I built apr, apr-util, zlib, and sqlite from subversion-deps package,
and the subversion itself.
It is version 1.6.15.

I'm createing a new repository with svn create, and after it I'm
trying svn mkdir file:///...
The result is:
svn: Commit failed (details follow):
svn: Corrupt node-revision '0.0.t0-0'
svn: Malformed text representation offset line in node-rev

Based on Daniel's help, I started to patch fs_fs.c, and adding debug
messages to it:
/ # svnadmin create /var/svn/testrepo   <=== I'm creating the repository
/ # cat /var/svn/testrepo/db/revs/0/0     <=== Checking the revision
file. Seems to be OK.
PLAIN
END
ENDREP
id: 0.0.r0/17
type: dir
count: 0
text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
cpath: /


17 107
/ # svn mkdir file:///var/svn/testrepo/xxx -m "mmmmm"
fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev   <=== It is the
bottom of the get_node_revision_body function
fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
2d2977d1c96f487abe4a1e202dd03b4e'
read_rep_offsets: [LINE 1947] '0 0 4 4
2d2977d1c96f487abe4a1e202dd03b4e' <== The string parameter of
read_rep_offsets
read_rep_offsets: [LINE 1956] '0'  <=== Return str of first apr_strtok
read_rep_offsets: [LINE 1973] '0'  <=== Return str of second apr_strtok
read_rep_offsets: [LINE 1984] '4'  <=== Return str of third apr_strtok
read_rep_offsets: [LINE 1995] '4'  <=== Return str of fourth apr_strtok
read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e'  <===
Return str of fifth apr_strtok
fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
apr_strtok: [LINE 35] '0.0.t0-0'
apr_strtok: [LINE 58] '0'
apr_strtok: [LINE 35] '0.t0-0'
apr_strtok: [LINE 58] '0'
apr_strtok: [LINE 35] 't0-0'
apr_strtok: [LINE 58] 't0-0'
fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 4621479420036127952 (null)'
read_rep_offsets: [LINE 1947] '0 4 4 4621479420036127952 (null)'
read_rep_offsets: [LINE 1956] '0'
read_rep_offsets: [LINE 1973] '4'
read_rep_offsets: [LINE 1984] '4'
read_rep_offsets: [LINE 1995] '4621479420036127952'
subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
svn: Corrupt node-revision '0.0.t0-0'
subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
svn: Malformed text representation offset line in node-rev
read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
strlen(str) 6 (APR_MD5_DIGESTS
IZE*2) 32 revision 0 offset 4 size 0 expsize 4
/ #

I figured out, that the first execution of fs_fs__read_noderev is
parsing the /var/svn/testrepo/db/revs/0/0 file.
What is the input of the second execution? I see thet it is in wrong
format, but what is the origin of this?


Thanks a lot!

Regards,
András




----------------------------------------------------------------------------------------------------------------------------------------------------

Toolchain: arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu
Cross gcc:  arm-none-linux-gnueabi-gcc
Cross cflags: -march=armv4t -mtune=arm920t

Apr configure:
               ./configure \
                       --prefix=/usr \
                       --host=$(CROSS_COMPILE) \
                       ac_cv_file__dev_zero="yes" \
                       ac_cv_func_setpgrp_void="yes" \
                       apr_cv_process_shared_works="yes" \
                       apr_cv_mutex_robust_shared="no" \
                       apr_cv_tcp_nodelay_with_cork="yes" \
                       ac_cv_sizeof_struct_iovec="8" \
                       apr_cv_mutex_recursive="yes" \
                       CFLAGS=$(CROSS_CFLAGS) \
                       LDFLAGS=$(CROSS_LDFLAGS)

Apr-utils configure:
               ./configure \
                       --with-apr=<MY_APR_BUILD_DIR> \
                       --prefix=/usr \
                       --host=$(CROSS_COMPILE) \
                       CFLAGS=$(CROSS_CFLAGS) \
                       LDFLAGS=$(CROSS_LDFLAGS); \

Subversion configure:
       ./configure \
               --with-apr=$(PACKAGES_DIR)/apr/$(TARGET_PACKAGE)/apr \
               --with-apr-util=$(PACKAGES_DIR)/apr-util/$(TARGET_PACKAGE)/apr-util
\
               --with-sqlite="$(TARGET_DEV_ROOT)/usr" \
               --with-zlib="$(TARGET_DEV_ROOT)/usr" \
               --host=$(CROSS_COMPILE) \
               --prefix=/usr \
               CFLAGS=$(CROSS_CFLAGS) \
               LDFLAGS=$(CROSS_LDFLAGS)

Other compiled libraries: sqlite3, zlib
I'm usung the latest, 1.6.15 subversion and subversion-deps packages.
(I compiled all libraries from subversion-deps, no other installed library)





--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond@freestart.hu

Re: subversion cross compile (arm)

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Takács András wrote on Wed, Dec 01, 2010 at 08:16:56 +0100:
> > I suppose the next hint (unless someone has tips specific to arm) would
> > be to see the corrupt lines in the revision file --- can you share them?
> > You can patch or breakpoint in subversion/libsvn_fs_fs/fs_fs.c (that is
> > where the error is generated) to find what lines it complains about.
> 
> The problem is at this line in fs_fs.c:
> if ((str == NULL) || (strlen(str) != (APR_MD5_DIGESTSIZE * 2)))
> Here the length of str is 6, and APR_MD5_DIGESTSIZE*2 should be 32.
> 
> Sorry, but I don't know which is the revision file, I'm not too
> familiar with svn internals. (I'm just using it)
> Did you mean the entries file from the .svn directory? I pasted it below.
> 

No; the error is in the libsvn_fs libraries, which is roughly the
opposite end of the world relative to libsvn_wc's entries files...
(and I bet the error will reproduce even with 'svn mkdir URL', which
doesn't involve an entries file at all)

When the error occurs, fs_fs.c is reading a node-revision header from
some file; and that header is corrupt.  I asked you to look in *that*
file (it will be somewhere under /var/run/svn/db/) and see in what way
it is corrupted.  For example, what is the value of read_rep_offsets()'s
second parameter?

For reference, read_rep_offsets() --- the function where that error
occurs --- is the function that parses the "text:" line in the
following:

[[[
id: c-1.0.r1/998
type: file
count: 0
text: 1 106 44 32 8ac35a19435b31b928de300b32e930cd b3f85be4422626e7443b6ddcf60bb451dc7f0560 0-0/_e
cpath: /trunk/A/B/E/alpha
copyroot: 0 /
]]]

so the second parameter is expected to contain the "1 106 ... 0-0/_e" string.

> Thanks!
> 
> Regards,
> András

Re: subversion cross compile (arm)

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Takács András wrote on Wed, Dec 01, 2010 at 08:16:56 +0100:
> > I suppose the next hint (unless someone has tips specific to arm) would
> > be to see the corrupt lines in the revision file --- can you share them?
> > You can patch or breakpoint in subversion/libsvn_fs_fs/fs_fs.c (that is
> > where the error is generated) to find what lines it complains about.
> 
> The problem is at this line in fs_fs.c:
> if ((str == NULL) || (strlen(str) != (APR_MD5_DIGESTSIZE * 2)))
> Here the length of str is 6, and APR_MD5_DIGESTSIZE*2 should be 32.
> 
> Sorry, but I don't know which is the revision file, I'm not too
> familiar with svn internals. (I'm just using it)
> Did you mean the entries file from the .svn directory? I pasted it below.
> 

No; the error is in the libsvn_fs libraries, which is roughly the
opposite end of the world relative to libsvn_wc's entries files...
(and I bet the error will reproduce even with 'svn mkdir URL', which
doesn't involve an entries file at all)

When the error occurs, fs_fs.c is reading a node-revision header from
some file; and that header is corrupt.  I asked you to look in *that*
file (it will be somewhere under /var/run/svn/db/) and see in what way
it is corrupted.  For example, what is the value of read_rep_offsets()'s
second parameter?

For reference, read_rep_offsets() --- the function where that error
occurs --- is the function that parses the "text:" line in the
following:

[[[
id: c-1.0.r1/998
type: file
count: 0
text: 1 106 44 32 8ac35a19435b31b928de300b32e930cd b3f85be4422626e7443b6ddcf60bb451dc7f0560 0-0/_e
cpath: /trunk/A/B/E/alpha
copyroot: 0 /
]]]

so the second parameter is expected to contain the "1 106 ... 0-0/_e" string.

> Thanks!
> 
> Regards,
> András

Re: subversion cross compile (arm)

Posted by Takács András <wa...@gmail.com>.
Hi!

> I'd use file:/// for testing.

Same result :(

> I suppose the next hint (unless someone has tips specific to arm) would
> be to see the corrupt lines in the revision file --- can you share them?
> You can patch or breakpoint in subversion/libsvn_fs_fs/fs_fs.c (that is
> where the error is generated) to find what lines it complains about.
> You can pass --enable-maintainer-mode to configure to get some debug
> aids: asserts, debug symbols, stack traces in the error message.

The problem is at this line in fs_fs.c:
if ((str == NULL) || (strlen(str) != (APR_MD5_DIGESTSIZE * 2)))
Here the length of str is 6, and APR_MD5_DIGESTSIZE*2 should be 32.

Sorry, but I don't know which is the revision file, I'm not too
familiar with svn internals. (I'm just using it)
Did you mean the entries file from the .svn directory? I pasted it below.

Thanks!

Regards,
András

----------------------------------------------------------------------------------------------------------------------------------------------------

# cat .svn/entries
10

dir
0
file:///var/svn/testrepo
file:///var/svn/testrepo



1970-01-01T00:00:14.631784Z
0















1c376b8e-1dd2-11b2-8415-0399146d2571


xxx
dir



add


/home/testrepo #