Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: Using fsvs as UID 0

fsvs
Discussion topic

Hide all messages in topic

All messages in topic

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-16 10:48:00 PDT
Message Could you please tell me which line crashes fsvs?

Index: checksum.c
====================​====================​====================​=======
--- checksum.c (Revision 743)
+++ checksum.c (Arbeitskopie)
@@ -490,6 +490,7 @@
 {
        int status;
        int i;
+ AC_CV_C_UINT32_T tmp;


        status=0;
@@ -560,9 +561,10 @@
                         * border-checking there. Only here, in this loop,
                         * is the value needed. */
                        mb_f->last_state=​mb_f->state;
- mb_f->state = (mb_f->state*CS__​MANBER_PRIME + data[i] -
- manber_parms.values[ mb_f->backtrack[ mb_f->bktrk_last ] ] )
- % CS__MANBER_MODULUS;
+ tmp=mb_f->backtrack[ mb_f->bktrk_last ];
+ tmp=manber_parms.values[ tmp ];
+ tmp= data[i]-tmp;
+ mb_f->state = (mb_f->state*CS__​MANBER_PRIME + tmp) % CS__MANBER_MODULUS;
                        mb_f->backtrack[ mb_f->bktrk_last ] = data[i];
                        mb_f->bktrk_last = ( mb_f->bktrk_last + 1 ) &
                                (CS__MANBER_BACKTRACK - 1);

Thank you!

Phil

--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-12 05:01:26 PDT
Message Hello Ben!

Benjamin M. wrote:
> any idea how I could pinpoint any problem in it or create a subset?
Well, I hoped that some /md5s file would be read directly before the crash
- that could have told me *why* fsvs crashes here. The file itself could
help me, too; but this is a simple CRC algorithm.

Why it crashes for you I don't know yet -- and I didn't think that it
could *ever* crash, since it should be data-independent.

You could help me a bit and set a breakpoint in the "while (i<maxlen)"
line above - and document i, maxlen, *mb_f, and manber_parms for the steps
until it crashes.


Hmmm ... backtrack is even a "unsigned char", so there cannot be values
outside [0..255] which is the range of manber_parms.values ...
And since i<maxlen, data[i] should be defined, too.

You could try to use a temporary variable, to find out which part of this
expression doesn't work.


I'll take a few more looks.


Regards,

Phil


--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-11 10:38:54 PDT
Message On Saturday 10 March 2007 21:02 Benjamin M. wrote:
...
> ... BUT I think I've found the root cause of the problem: the WAA
> directory. After creating a new WAA directory the bus error went away.
> If I use the old WAA the bus error returns.
>
> So probably WAA corruption... If you want more info about the possible
> cause... just let me know how I can provide you that...
Well, if that's the case, use
    fsvs status -C -C -d -D waa__open
and send me the last file it wants to open - that should be some ".../md5s"
file.


Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author benjaminm
Full name Benjamin M.
Date 2007-03-10 12:02:26 PST
Message Philipp Marek wrote, On 10/03/07 02:35:
> On Friday 09 March 2007 23:03 Benjamin M. wrote:
>
>>> Is it just this file, or the amount of data? Please try committing parts
>>> - other directories, and try to keep this file for a single commit, so
>>> that at least this question gets answered.
>>>
>>> Is that some critical file? It seems to happen just at the beginning.
>>> Maybe changing a single byte at the start would change something ...
>>>
>> I will investigate... but so far ... good news... a sync-repos seems to
>> have fixed the problem... go figure...
>>
> And the next commit would have committed that file???
>
> Is there a chance of bad memory, or something like that?
> A sync-repos should make no difference ...
>
I spoke too quickly... even after a sync-repos I was getting bus errors
IF changes happened between the sync-repos and the status...

fsvs status -C -C
    [bus error]
fsvs sync-repos
fsvs status -C -C
    [no bus error]
    [some changes to files...]
fsvs status -C -C
    [bus error]


... BUT I think I've found the root cause of the problem: the WAA
directory. After creating a new WAA directory the bus error went away.
If I use the old WAA the bus error returns.

So probably WAA corruption... If you want more info about the possible
cause... just let me know how I can provide you that...

Ben.
Attachments

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-09 23:35:14 PST
Message On Friday 09 March 2007 23:03 Benjamin M. wrote:
> > Is it just this file, or the amount of data? Please try committing parts
> > - other directories, and try to keep this file for a single commit, so
> > that at least this question gets answered.
> >
> > Is that some critical file? It seems to happen just at the beginning.
> > Maybe changing a single byte at the start would change something ...
>
> I will investigate... but so far ... good news... a sync-repos seems to
> have fixed the problem... go figure...
And the next commit would have committed that file???

Is there a chance of bad memory, or something like that?
A sync-repos should make no difference ..


Regards,

Phil


--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author benjaminm
Full name Benjamin M.
Date 2007-03-09 14:03:47 PST
Message Philipp Marek wrote, On 09/03/07 11:51:
> On Friday 09 March 2007 17:42 Benjamin M. wrote:
>
>> I would be thrilled to be able to give you an answer...
>>
> Then why don't you?
>
Lack of knowledge and the hard reality of being at the beginning of the
learning curve... Remember... I'm a power user not a developer!
>> In the meantime
>> I will only be able to give you problems to solve... ;-)
>>
>> About 015 ... no luck with r732...
>>
> Yes, I know. I'm working on that ... should be done by Monday.
Ok. I just wanted to be sure that the problem had been acknowledged...



Philipp Marek wrote, On 09/03/07 13:43:
> On Friday 09 March 2007 16:59 Benjamin M. wrote:
>
>> Program received signal SIGBUS, Bus error.
>> [Switching to Thread -1209022080 (LWP 24317)]
>> 0x0804b0e0 in cs___end_of_block (
>> data=0xb7cf1000 "<snip>"..., maxlen=34229, eob=0xbfe2d200,
>> mb_f=0x8064ba0) at checksum.c:563
>> 563 mb_f->state =
>> (mb_f->state*CS__​MANBER_PRIME + data[i] -
>> (gdb) print *mb_f
>> $1 = {sts = 0xb7c2f888, input = 0x0, last_fpos = 0, fpos = 0,
>> full_md5_ctx = {state = {1732584193, 4023233417, 2562383102, 271733878},
>> count = {0, 0}, buffer = '\0' <repeats 63 times>, xlate = 0x0},
>> full_md5 = '\0' <repeats 15 times>, block_md5_ctx = {state =
>> {1732584193, 4023233417, 2562383102, 271733878}, count = {0, 0}, buffer
>> = '\0' <repeats 63 times>, xlate = 0x0},
>> block_md5 = '\0' <repeats 15 times>, manber_fd = -1, state =
>> 958297347, last_state = 958297347, bktrk_bytes = 2048, bktrk_last = 0,
>> backtrack = "<snip>"..., data_bits = 127}
>> (gdb) print i
>> $2 = 32768
>>
> I just committed 1.2GB, 98346 files+directories, without a problem.
>
> Is it just this file, or the amount of data? Please try committing parts -
> other directories, and try to keep this file for a single commit, so that at
> least this question gets answered.
>
> Is that some critical file? It seems to happen just at the beginning. Maybe
> changing a single byte at the start would change something ...

I will investigate... but so far ... good news... a sync-repos seems to
have fixed the problem... go figure...

Ben.
Attachments

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-09 10:43:52 PST
Message On Friday 09 March 2007 16:59 Benjamin M. wrote:
> Program received signal SIGBUS, Bus error.
> [Switching to Thread -1209022080 (LWP 24317)]
> 0x0804b0e0 in cs___end_of_block (
> data=0xb7cf1000 "<snip>"..., maxlen=34229, eob=0xbfe2d200,
> mb_f=0x8064ba0) at checksum.c:563
> 563 mb_f->state =
> (mb_f->state*CS__​MANBER_PRIME + data[i] -
> (gdb) print *mb_f
> $1 = {sts = 0xb7c2f888, input = 0x0, last_fpos = 0, fpos = 0,
> full_md5_ctx = {state = {1732584193, 4023233417, 2562383102, 271733878},
> count = {0, 0}, buffer = '\0' <repeats 63 times>, xlate = 0x0},
> full_md5 = '\0' <repeats 15 times>, block_md5_ctx = {state =
> {1732584193, 4023233417, 2562383102, 271733878}, count = {0, 0}, buffer
> = '\0' <repeats 63 times>, xlate = 0x0},
> block_md5 = '\0' <repeats 15 times>, manber_fd = -1, state =
> 958297347, last_state = 958297347, bktrk_bytes = 2048, bktrk_last = 0,
> backtrack = "<snip>"..., data_bits = 127}
> (gdb) print i
> $2 = 32768
I just committed 1.2GB, 98346 files+directories, without a problem.

Is it just this file, or the amount of data? Please try committing parts -
other directories, and try to keep this file for a single commit, so that at
least this question gets answered.

Is that some critical file? It seems to happen just at the beginning. Maybe
changing a single byte at the start would change something ...


Regards,

Phil


--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-09 08:51:10 PST
Message On Friday 09 March 2007 17:42 Benjamin M. wrote:
> I would be thrilled to be able to give you an answer...
Then why don't you?

> In the meantime
> I will only be able to give you problems to solve... ;-)
>
> About 015 ... no luck with r732...
Yes, I know. I'm working on that ... should be done by Monday.


Regards,

Phil


--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author benjaminm
Full name Benjamin M.
Date 2007-03-09 08:42:08 PST
Message Philipp Marek wrote, On 09/03/07 11:04:
> On Friday 09 March 2007 16:59 Benjamin M. wrote:
>
>> Program received signal SIGBUS, Bus error.
>> [Switching to Thread -1209022080 (LWP 24317)]
>> 0x0804b0e0 in cs___end_of_block (
>> data=0xb7cf1000 "<snip>"..., maxlen=34229, eob=0xbfe2d200,
>> mb_f=0x8064ba0) at checksum.c:563
>> 563 mb_f->state =
>> (mb_f->state*CS__​MANBER_PRIME + data[i] -
>> (gdb) print *mb_f
>> $1 = {sts = 0xb7c2f888, input = 0x0, last_fpos = 0, fpos = 0,
>> full_md5_ctx = {state = {1732584193, 4023233417, 2562383102, 271733878},
>> count = {0, 0}, buffer = '\0' <repeats 63 times>, xlate = 0x0},
>> full_md5 = '\0' <repeats 15 times>, block_md5_ctx = {state =
>> {1732584193, 4023233417, 2562383102, 271733878}, count = {0, 0}, buffer
>> = '\0' <repeats 63 times>, xlate = 0x0},
>> block_md5 = '\0' <repeats 15 times>, manber_fd = -1, state =
>> 958297347, last_state = 958297347, bktrk_bytes = 2048, bktrk_last = 0,
>> backtrack = "<snip>"..., data_bits = 127}
>> (gdb) print i
>> $2 = 32768
>>
> So i<maxlen, is in range.
> bktrk_last is 0 ...
>
> What's the problem here?
>
I would be thrilled to be able to give you an answer... In the meantime
I will only be able to give you problems to solve... ;-)

About 015 ... no luck with r732...

 svn up
At revision 732.
<snip>
make run-tests TEST_LIST=015*
make -C test BINARY=/usr/src/fsvs​-trunk-head/trunk/fs​vs/src/fsvs
make[1]: Entering directory `/usr/src/fsvs-trunk​-head/trunk/fsvs/src​/test'
Running tests...

____________________​____________________​_______________
  "015_sync_repos":1: (Fri Mar 9 11:34:11 EST 2007)
rm: cannot remove
`/tmp/fsvs-test-waa/​e4/79/8deec02e0e6ad5​c46340b8c3ec09//*': No such file
or directory
rm: cannot remove
`/tmp/fsvs-test-waa/​b7/b4/33516382a18f54​5c01dce608138a//*': No such file
or directory
Directory file is /tmp/fsvs-test-waa/b​7/b4/33516382a18f545​c01dce608138a//dir
step 1: update from empty set.
Updated file:///tmp/fsvs-tes​t-0/repos/trunk to revision 4.
step 2: update from already-up-to-date.
Updated file:///tmp/fsvs-tes​t-0/repos/trunk to revision 4.
step 3: build new list
step 4: sync
sync-repos for file:///tmp/fsvs-tes​t-0/repos/trunk rev 4.
found MD5s: update=0ed24f3367014​eaf99812777f2941918 -
            noop update=0ed24f3367014​eaf99812777f2941918 -
                   sync=bfd559e3c3f0dce​d7121d70807ea5743 -
                from wc=285339293f3ef7cfa​c9203b015f15049 -
"015_sync_repos":73: NOK:
/tmp/fsvs-test-0/log​/015.sync-repos-test​.sync.tmp and
/tmp/fsvs-test-0/log​/015.sync-repos-test​.up.tmp are different
--- /tmp/fsvs-test-0/log​/015.sync-repos-test​.sync.tmp 2007-03-09
11:34:13.000000000 -0500
+++ /tmp/fsvs-test-0/log​/015.sync-repos-test​.up.tmp 2007-03-09
11:34:13.000000000 -0500
@@ -1,43 +1,43 @@
 6 64 50 1024 330 24 $
-0040700 45f18c85 45f18c85 0 nd x 4096 4 0 fd04 114718 0 10 0 0 .
+0040755 45f18c85 45f18c85 0 nd x 4096 4 0 fd04 114718 0 10 0 0 .
 0020765 45f18c85 45ab8035 0 cdev:0x1:0x3
acfb5bef3e5ba6e7c254​b0f1355fc804 259 4 1 fd04 114830 1 0 1 2 device
-0040754 45f18c85 45eb11b4 0 nd x 4096 4 1 fd04 115244 1 3 0 0 tree
-0040754 45f18c85 45eb11b4 0 nd x 4096 4 1 fd04 115245 3 3 0 0 a
-0040754 45f18c85 45eb11b4 0 nd x 4096 4 1 fd04 115248 4 3 0 0 1
"015_sync_repos":75: NOK: 'fsvs sync-repos' error
----++---- /usr/src/fsvs-trunk-​head/trunk/fsvs/src/​test/015_sync_repos
failed ----++----
make[1]: *** [run_tests] Error 1
make[1]: Leaving directory `/usr/src/fsvs-trunk​-head/trunk/fsvs/src​/test'
make: *** [run-tests] Error 2

Ben.
Attachments

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-09 08:04:24 PST
Message On Friday 09 March 2007 16:59 Benjamin M. wrote:
> Program received signal SIGBUS, Bus error.
> [Switching to Thread -1209022080 (LWP 24317)]
> 0x0804b0e0 in cs___end_of_block (
> data=0xb7cf1000 "<snip>"..., maxlen=34229, eob=0xbfe2d200,
> mb_f=0x8064ba0) at checksum.c:563
> 563 mb_f->state =
> (mb_f->state*CS__​MANBER_PRIME + data[i] -
> (gdb) print *mb_f
> $1 = {sts = 0xb7c2f888, input = 0x0, last_fpos = 0, fpos = 0,
> full_md5_ctx = {state = {1732584193, 4023233417, 2562383102, 271733878},
> count = {0, 0}, buffer = '\0' <repeats 63 times>, xlate = 0x0},
> full_md5 = '\0' <repeats 15 times>, block_md5_ctx = {state =
> {1732584193, 4023233417, 2562383102, 271733878}, count = {0, 0}, buffer
> = '\0' <repeats 63 times>, xlate = 0x0},
> block_md5 = '\0' <repeats 15 times>, manber_fd = -1, state =
> 958297347, last_state = 958297347, bktrk_bytes = 2048, bktrk_last = 0,
> backtrack = "<snip>"..., data_bits = 127}
> (gdb) print i
> $2 = 32768
So i<maxlen, is in range.
bktrk_last is 0 ...

What's the problem here?




--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author benjaminm
Full name Benjamin M.
Date 2007-03-09 07:59:16 PST
Message Ph. Marek wrote, On 09/03/07 02:21:
>> 0x0804b0e0 in cs___end_of_block (
>> data=0xb7cfc000 "<snip>"..., maxlen=34229, eob=0xbff92c70,
>> mb_f=0x8064ac0) at checksum.c:563
>> 563 mb_f->state =
>> (mb_f->state*CS__​MANBER_PRIME + data[i] -
>>
> This is a simple calculation ... How can that go wrong?
>
> Could you tell the variables' data?
> print *mb_f
> print i
>
Program received signal SIGBUS, Bus error.
[Switching to Thread -1209022080 (LWP 24317)]
0x0804b0e0 in cs___end_of_block (
    data=0xb7cf1000 "<snip>"..., maxlen=34229, eob=0xbfe2d200,
mb_f=0x8064ba0) at checksum.c:563
563 mb_f->state =
(mb_f->state*CS__​MANBER_PRIME + data[i] -
(gdb) print *mb_f
$1 = {sts = 0xb7c2f888, input = 0x0, last_fpos = 0, fpos = 0,
full_md5_ctx = {state = {1732584193, 4023233417, 2562383102, 271733878},
count = {0, 0}, buffer = '\0' <repeats 63 times>, xlate = 0x0},
  full_md5 = '\0' <repeats 15 times>, block_md5_ctx = {state =
{1732584193, 4023233417, 2562383102, 271733878}, count = {0, 0}, buffer
= '\0' <repeats 63 times>, xlate = 0x0},
  block_md5 = '\0' <repeats 15 times>, manber_fd = -1, state =
958297347, last_state = 958297347, bktrk_bytes = 2048, bktrk_last = 0,
  backtrack = "<snip>"..., data_bits = 127}
(gdb) print i
$2 = 32768

Ben.
Attachments

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-08 23:21:38 PST
Message >> Oh no, please say it don't ;-/
> What? Isn't that the pure joy of software development... ;-)
>
> The good news is that I can reproduce at will... with status and commit...
So you can experience the joy of software development? Good!

> 0x0804b0e0 in cs___end_of_block (
> data=0xb7cfc000 "<snip>"..., maxlen=34229, eob=0xbff92c70,
> mb_f=0x8064ac0) at checksum.c:563
> 563 mb_f->state =
> (mb_f->state*CS__​MANBER_PRIME + data[i] -
This is a simple calculation ... How can that go wrong?

Could you tell the variables' data?
   print *mb_f
   print i

Strange ... is mb_f->bktrk_last corrupted?


Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author benjaminm
Full name Benjamin M.
Date 2007-03-08 13:59:07 PST
Message Ph. Marek wrote, On 08/03/07 02:01:
>> but... on *big* directory (5095 files/dirs) I get Bus error when using
>> -C -C (without... it works as expected...):
>>
> Oh no, please say it don't ;-/
>
>
What? Isn't that the pure joy of software development... ;-)

The good news is that I can reproduce at will... with status and commit...
>> fsvs ci -m "<snip>" -C -C -d
>>
> ...
>
>> Program received signal SIGBUS, Bus error.
>> [Switching to Thread -1208153728 (LWP 10517)]
>> 0x0804b040 in cs___end_of_block ()
>> (gdb) bt
>> #0 0x0804b040 in cs___end_of_block ()
>> #1 0x0804bed7 in cs__compare_file ()
>> #2 0x0804fec1 in ops__update_single_entry ()
>>
> Could you tell me which code line that is?
>
I have snipped some data...

Program received signal SIGBUS, Bus error.
[Switching to Thread -1208977024 (LWP 13471)]
0x0804b0e0 in cs___end_of_block (
    data=0xb7cfc000 "<snip>"..., maxlen=34229, eob=0xbff92c70,
mb_f=0x8064ac0) at checksum.c:563
563 mb_f->state =
(mb_f->state*CS__​MANBER_PRIME + data[i] -

(gdb) bt
#0 0x0804b0e0 in cs___end_of_block (
    data=0xb7cfc000 "<snip>"..., maxlen=34229, eob=0xbff92c70,
mb_f=0x8064ac0) at checksum.c:563
#1 0x0804bf77 in cs__compare_file (sts=0xb7c3a888, fullpath=0x8d66400
"<snip>", result=0xbff92cc4) at checksum.c:332
#2 0x0804ff61 in ops__update_single_entry (sts=0xb7c3a888,
fullpath=0x8d66400 "<snip>") at est_ops.c:1181
#3 0x0805b7d9 in waa__update_tree (root=0xbff92dbc,
cur_block=0x8d4b938) at waa.c:1560
#4 0x0805c133 in waa__partial_update (root=0xbff92dbc, argc=0,
normalized=0x8d519d8, blocks=0x80663ec) at waa.c:1967
#5 0x0805c1ed in waa__read_or_build_tree (root=0xbff92dbc, argc=0,
normalized=0x8d519d8, return_ENOENT=0) at waa.c:1670
#6 0x08055546 in st__work (root=0xbff92dbc, argc=0, argv=0xbff92edc) at
status.c:215
#7 0x08050e11 in main (argc=0, args=0xbff92ed4) at fsvs.c:653

Ben.
Attachments

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-07 23:01:18 PST
Message >> Bug:
Should have been "But" - nomen est omen.

>> $ fsvs st -C -C
>> should report it (doing a checksum), and
>> $ fsvs commit -C -C
>> too.
>>
> yep... -C -C was my *workaround*...
>
> but... on *big* directory (5095 files/dirs) I get Bus error when using
> -C -C (without... it works as expected...):
Oh no, please say it don't ;-/

> fsvs ci -m "<snip>" -C -C -d
...
> Program received signal SIGBUS, Bus error.
> [Switching to Thread -1208153728 (LWP 10517)]
> 0x0804b040 in cs___end_of_block ()
> (gdb) bt
> #0 0x0804b040 in cs___end_of_block ()
> #1 0x0804bed7 in cs__compare_file ()
> #2 0x0804fec1 in ops__update_single_entry ()
Could you tell me which code line that is?


>> So, BTW ... why does your fsvs give no MD5 of that file?
> Hmmm... probably because info was applied on the directory "." ("fsvs
> info" without any path)... not on test.txt...
Yes, sorry. It's been too late.

>> And now to your point - should fsvs on a sync-repos *always* check the
>> local
>> files for identity? (Doing a MD5?) Would be slow.
> I would expect any synchronization function (probably only used when
> things go wrong...) to set the wc ready to be use as *business as
> usual*... and not having to care about using additional arguments on
> subsequent commands to be sure it's the case. A quick fix (?) could be
> to have something like:
>
> fsvs sync-repos [-r rev] [-C [-C]]

> So the user can decide between speed and the checksum peace of mind...
>> Should it do that always on status? Probably not.
> I agree. Status needs no change.
>> But you're right, in that it could see the differing mtime, and say
>> "possibly
>> changed" - as it does with other files.
>>
>> How's r726 for you?
> Better. But [-C [-C]] on sync-repos would be perfect! ;-)
Hmmm... I'll get back to you on that, IIDF. I'd like to think a bit about
that.


Regards,

Phil


--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author benjaminm
Full name Benjamin M.
Date 2007-03-07 21:31:57 PST
Message Philipp Marek wrote, On 07/03/07 14:22:
>> I would expect test.txt to be reported as Changed... am I missing
>> something?
>>
> No. AFAIK (without looking) sync-repos has a small bug, in that files *with
> the same size* are not reported as changed, because their mtime is read after
> syncing. (See mtime, ctime stamps above).
>
> Bug:
> $ fsvs st -C -C
> should report it (doing a checksum), and
> $ fsvs commit -C -C
> too.
>
yep... -C -C was my *workaround*...

but... on *big* directory (5095 files/dirs) I get Bus error when using
-C -C (without... it works as expected...):

fsvs ci -m "<snip>" -C -C -d

<snip>

23:10:50.733 hlp__lstat[helper.c:316]
./var/html/galleries​/pages/144.php: uid=700 gid=700 mode=0100664
dev=0xfd07 ino=774597 rdev=0x0 size=23949
23:10:50.733 ops___stat_to_action​[est_ops.c:274] change = 24
23:10:50.733 cs__compare_file[che​cksum.c:280] checking for modification
on ./var/html/galleries​/pages/144.php
23:10:50.733 cs__compare_file[che​cksum.c:282] hashing
./var/html/galleries​/pages/144.php
23:10:50.733 cs___end_of_block[ch​ecksum.c:498] manber reinit
23:10:50.733 cs___end_of_block[ch​ecksum.c:595] on return at fpos=0:
00000000 (databits= 0)
23:10:50.733 cs__compare_file[che​cksum.c:322] mapping 24703 bytes from 0
23:10:50.734 cs___end_of_block[ch​ecksum.c:579] manber found a border:
19714 F2AED6B5 45D40000 f065e5c2f2568c70de54​a8f9f806a199
23:10:50.734 cs___end_of_block[ch​ecksum.c:595] on return at fpos=19714:
45D40000 (databits=7f)

Program received signal SIGBUS, Bus error.
[Switching to Thread -1208153728 (LWP 10517)]
0x0804b040 in cs___end_of_block ()
(gdb) bt
#0 0x0804b040 in cs___end_of_block ()
#1 0x0804bed7 in cs__compare_file ()
#2 0x0804fec1 in ops__update_single_entry ()
#3 0x0805b30d in waa__update_tree ()
#4 0x0805bc67 in waa__partial_update ()
#5 0x0805bd21 in waa__read_or_build_tree ()
#6 0x0804d136 in ci__work ()
#7 0x08050c72 in main ()


> So, BTW ... why does your fsvs give no MD5 of that file?
> $ fsvs info big_file
> .... 588888 ./big_file
> Type: file
> URL: file:///tmp/ram/fsvs​-test-1000/repos/tru​nk/big_file
> Status: 0x0 (unmodified)
> Flags: 0x0 (none)
> Dev: 20
> Inode: 16306
> Mode: 0100644
> UID/GID: 1000 (flip)/1000 (flip)
> MTime: Wed Mar 7 19:57:53 2007
> CTime: Wed Mar 7 19:57:53 2007
> WAA-Path: /tmp/ram/waa/be/9b/c​359b8d47483ea64ef5fa​a12ac2d/
> Revision: 4
> Repos-MD5: 9f588ff5001de3467365​2c4a767575e4
> Size: 588888
>
> $ echo 'Hello world!' | md5sum
> 59ca0efa9f5633cb0371​bbc0355478d8 -
> Could you please check whether fsvs really prints no MD5 for you?
> Why not?
>
Hmmm... probably because info was applied on the directory "." ("fsvs
info" without any path)... not on test.txt...

$ fsvs info
.... 4096 .
        Type: directory

<snip>


Here on text.txt

$ fsvs info test.txt
.... 15 ./test.txt
        Type: file
        URL: file:///tmp/fsvs-tes​t-repos/test.txt
        Status: 0x0 (unmodified)
        Flags: 0x0 (none)
        Dev: 64772
        Inode: 16421
        Mode: 0100664
        UID/GID: 700 (webmaster)/700 (webmaster)
        MTime: Wed Mar 7 09:40:42 2007
        CTime: Wed Mar 7 09:40:42 2007
        WAA-Path: /tmp/fsvs-test-waa/c​8/7a/49247ae33399f07​ced864e301e46/
        Revision: 3
        Repos-MD5: fd26eea2963d107fc314​d4b92cc14333
        Size: 15

> And now to your point - should fsvs on a sync-repos *always* check the local
> files for identity? (Doing a MD5?) Would be slow.
I would expect any synchronization function (probably only used when
things go wrong...) to set the wc ready to be use as *business as
usual*... and not having to care about using additional arguments on
subsequent commands to be sure it's the case. A quick fix (?) could be
to have something like:

fsvs sync-repos [-r rev] [-C [-C]]

So the user can decide between speed and the checksum peace of mind...
> Should it do that always on status? Probably not.
>
I agree. Status needs no change.
> But you're right, in that it could see the differing mtime, and say "possibly
> changed" - as it does with other files.
>
> How's r726 for you?
Better. But [-C [-C]] on sync-repos would be perfect! ;-)

Ben.
Attachments

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-07 11:22:24 PST
Message On Wednesday 07 March 2007 15:44 Benjamin M. wrote:
> Ph. Marek wrote, On 07/03/07 02:50:
> > Don't you have r703?
> No more problem with diff or run-tests 023 with FSVS 1.1.0.
That's good.

> Now... I have tried the sync-repos command...
...
> $ fsvs info
>
>
> An error occurred: No such file or directory (2)
> in info__work: Couldn't find a working copy with matching base.
> FSVS (licensed under the GPLv2), (C) by Ph. Marek; version trunk:677
That's ok. It could be a bit more user-friendly, though.

> $ fsvs urls file:///tmp/fsvs-test-repos/
> $ fsvs info
> No tree information available. Did you commit?
> $ fsvs sync-repos
> NmC. 0
> .mC. 0 .
> Sync-repos to revision 1.
> $ fsvs info
> .... 4096 .
> Type: directory
> URL: file:///tmp/fsvs-test-repos/
> Status: 0x0 (unmodified)
> Flags: 0x0 (none)
> Dev: 64772
> Inode: 16387
> Mode: 040775
> UID/GID: 700 (webmaster)/700 (webmaster)
> MTime: Wed Mar 7 09:16:52 2007
> CTime: Wed Mar 7 09:16:52 2007
> WAA-Path:
> /tmp/fsvs-test-waa/5​a/b8/caa10538a87aff4​9fe6f19370d6c/
> Revision: 1
> Size: 4096
> $ fsvs st
> <returns nothing>
There you're right. It should possibly return the file.

> $ fsvs remote-status
> .m.. 4096 .
> Remote-status against revision 1.
>
> $ cat test.txt
> Hello world!
> $ svn cat file:///tmp/fsvs-tes​t-repos/test.txt
> Hello World!
>
> I would expect test.txt to be reported as Changed... am I missing
> something?
No. AFAIK (without looking) sync-repos has a small bug, in that files *with
the same size* are not reported as changed, because their mtime is read after
syncing. (See mtime, ctime stamps above).

Bug:
   $ fsvs st -C -C
should report it (doing a checksum), and
   $ fsvs commit -C -C
too.


So, BTW ... why does your fsvs give no MD5 of that file?
  $ fsvs info big_file
  .... 588888 ./big_file
        Type: file
        URL: file:///tmp/ram/fsvs​-test-1000/repos/tru​nk/big_file
        Status: 0x0 (unmodified)
        Flags: 0x0 (none)
        Dev: 20
        Inode: 16306
        Mode: 0100644
        UID/GID: 1000 (flip)/1000 (flip)
        MTime: Wed Mar 7 19:57:53 2007
        CTime: Wed Mar 7 19:57:53 2007
        WAA-Path: /tmp/ram/waa/be/9b/c​359b8d47483ea64ef5fa​a12ac2d/
        Revision: 4
        Repos-MD5: 9f588ff5001de3467365​2c4a767575e4
        Size: 588888

  $ echo 'Hello world!' | md5sum
  59ca0efa9f5633cb0371​bbc0355478d8 -
Could you please check whether fsvs really prints no MD5 for you?
Why not?
I'd like to know whether the MD5 is locally correct or not.


And now to your point - should fsvs on a sync-repos *always* check the local
files for identity? (Doing a MD5?) Would be slow. Should it do that always on
status? Probably not.
But you're right, in that it could see the differing mtime, and say "possibly
changed" - as it does with other files.


How's r726 for you?


Regards,

Phil


--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author benjaminm
Full name Benjamin M.
Date 2007-03-07 06:44:08 PST
Message Ph. Marek wrote, On 07/03/07 02:50:
> 09:03:05.182 up__parse_prop[update.c:183] marking mtime
> "2007-03-06T14:00:03.000000Z" to Tue Mar 6 09:02:14 2007
> I assume you're GMT-5.
>
> Don't you have r703?
> http://fsvs.tigris.o​rg/source/browse/fsv​s/trunk/fsvs/src/upd​ate.c?rev=703&r1​=699&r2=703
>
>
No more problem with diff or run-tests 023 with FSVS 1.1.0.

Now... I have tried the sync-repos command...

$ cd /tmp
$ mkdir fsvs-test-wc
$ mkdir fsvs-test-waa
$ svnadmin create fsvs-test-repos
$ export WAA=/tmp/fsvs-test-waa
$ cd fsvs-test-wc/
$ fsvs urls file:///tmp/fsvs-test-repos/
$ fsvs st
.m.. 4096 .
$ echo 'Hello World!' > test.txt
$ fsvs st
N... 13 ./test.txt
.mC. 4096 .
$ fsvs commit -m "commit 1"
Committing to file:///tmp/fsvs-test-repos
N... 13 ./test.txt
committed revision 1 on 2007-03-07T14:15:50.415373Z as webmaster
$ fsvs st
$ echo 'Hello world!' > test.txt
$ fsvs st
.m.. 4096 .
.m.? 13 ./test.txt
$ fsvs diff test.txt
--- ./test.txt Rev. 1 (Wed Mar 7 09:15:20 2007)
+++ ./test.txt Local version (Wed Mar 7 09:16:34 2007)
@@ -1 +1 @@
-Hello World!
+Hello world!
$ mv /tmp/fsvs-test-waa /tmp/fsvs-test-waa~
$ mkdir /tmp/fsvs-test-waa
$ fsvs info


An error occurred: No such file or directory (2)
  in info__work: Couldn't find a working copy with matching base.
FSVS (licensed under the GPLv2), (C) by Ph. Marek; version trunk:677
$ fsvs urls file:///tmp/fsvs-test-repos/
$ fsvs info
No tree information available. Did you commit?
$ fsvs sync-repos
NmC. 0
.mC. 0 .
Sync-repos to revision 1.
$ fsvs info
.... 4096 .
        Type: directory
        URL: file:///tmp/fsvs-test-repos/
        Status: 0x0 (unmodified)
        Flags: 0x0 (none)
        Dev: 64772
        Inode: 16387
        Mode: 040775
        UID/GID: 700 (webmaster)/700 (webmaster)
        MTime: Wed Mar 7 09:16:52 2007
        CTime: Wed Mar 7 09:16:52 2007
        WAA-Path:
/tmp/fsvs-test-waa/5​a/b8/caa10538a87aff4​9fe6f19370d6c/
        Revision: 1
        Size: 4096
$ fsvs st
<returns nothing>
$ fsvs remote-status
.m.. 4096 .
Remote-status against revision 1.

$ cat test.txt
Hello world!
$ svn cat file:///tmp/fsvs-tes​t-repos/test.txt
Hello World!

I would expect test.txt to be reported as Changed... am I missing something?

Ben.

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-06 23:50:33 PST
Message 09:03:05.182 up__parse_prop[update.c:183] marking mtime
"2007-03-06T14:00:03.000000Z" to Tue Mar 6 09:02:14 2007
I assume you're GMT-5.

Don't you have r703?
http://fsvs.tigris.o​rg/source/browse/fsv​s/trunk/fsvs/src/upd​ate.c?rev=703&r1​=699&r2=703


Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-05 09:04:43 PST
Message On Sunday 04 March 2007 19:46 Benjamin M. wrote:
> - fsvs diff /path/... returns the same date for remote and local revisions.
> --- ./path/... Rev. 42 (Sun Feb 25 19:52:55 2007)
> +++ ./path/... Local version (Sun Feb 25 19:52:55 2007)
Well, it doesn't for me:
  $ fsvs diff -r4 update-file.upd
  --- ./update-file.upd Rev. 4 (Mon Mar 5 18:00:43 2007)
  +++ ./update-file.upd Local version (Mon Mar 5 18:01:23 2007)
  @@ -1,2 +1 @@
  -A testline #1
  -A testline #2
  +Another line

  $ fsvs diff update-file.upd
  --- ./update-file.upd Rev. 5 (Mon Mar 5 18:00:43 2007)
  +++ ./update-file.upd Local version (Mon Mar 5 18:01:23 2007)
  @@ -1,3 +1 @@
  -A testline #1
  -A testline #2
  -A further line
  +Another line

  $ fsvs diff -r4 update-file.upd
  --- ./update-file.upd Rev. 4 (Mon Mar 5 18:00:43 2007)
  +++ ./update-file.upd Local version (Mon Mar 5 18:01:23 2007)
  @@ -1,2 +1 @@
  -A testline #1
  -A testline #2
  +Another line

What's the matter with your system? Just making trouble, try using a real
OS ;-)

How about a debug log? For the volunteer looking into that?


Phil

--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-05 08:57:04 PST
Message Hello Ben,

thank you for your logfiles.
I'm looking at the problem ... But I don't know 1) why fsvs stops for you,
but not for me, although 2) I get mtime-changes and don't know from where.

On Sunday 04 March 2007 19:46 Benjamin M. wrote:
...
> Here more observations (1.0.17):
>
> - ... An option to prevent empty revision would be nice ...
> - fsvs diff /path/... returns the same date for remote and local revisions...
...
> - Enhancement: "fsvs diff" à la svn (recursive)
Do you know C? I believe that these few could be done very easy -
or at least with only a single hint.

Anybody else?


Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author benjaminm
Full name Benjamin M.
Date 2007-03-04 10:46:00 PST
Message Philipp Marek wrote, On 04/03/07 13:32:
> On Sunday 04 March 2007 18:38 Philipp Marek wrote:
>
>> I'll take a look.
>>
> Sorry to bother you again - I put some more logging into the test.
>
>
You don't bother me at all!
> It's no hurry, I think I've found some cause - I just have to locate the exact
> spot and fix there.
> But if it's not too much work please update, test + mail - so I can verify my
> local diagnosis with the problems you see
>
Attached!

Here more observations (1.0.17):

- I don't know if it is by design or a bug but if I commit when no
modification has happened (no file / property change transmitted) fsvs
creates empty revisions (the repository revision number is increased).
An option to prevent empty revision would be nice (or if the default
becomes "no revision if no change"... an option to force an empty
revision... which makes sense if you want to keep a log for each commit
(log for automated backup...).

- fsvs diff /path/... returns the same date for remote and local revisions.
     --- ./path/... Rev. 42 (Sun Feb 25 19:52:55 2007)
    +++ ./path/... Local version (Sun Feb 25 19:52:55 2007)

- I think "fsvs [arg]" should behave as "fsvs [arg] ." - the default
directory should be the current directory (.) not the working copy root.

- Enhancement: "fsvs diff" à la svn (recursive)


Ben.
Attachments

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-04 10:32:16 PST
Message On Sunday 04 March 2007 18:38 Philipp Marek wrote:
> I'll take a look.
Sorry to bother you again - I put some more logging into the test.

It's no hurry, I think I've found some cause - I just have to locate the exact
spot and fix there.
But if it's not too much work please update, test + mail - so I can verify my
local diagnosis with the problems you see.

Thank you!


Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-04 09:38:30 PST
Message On Sunday 04 March 2007 18:27 Benjamin M. wrote:
> svn up
> At revision 716.
>
> > remove your /tmp/fsvs-test-0 directory, test,
>
> Done.
>
> > and send me all the 023.round_*.log files.
>
> Attached.
>
> > Is that still on MacOS 10.4?
>
> CentOS 4.4. I haven't had the time to retry under MacOS X...
Thank you. This time it ran up to round 9 ...
I'll take a look.

> Otherwise, any idea why the last line returned by "fsvs st" (1.0.17)
> always displays the status of one of the paths already reported?
>
> fsvs st
> <snip>
> N.... 322233 ./var/galleries/repo​sitory/13351.jpg
> <snip>
> .tpC. 4096 ./var/galleries/repo​sitory/13351.jpg
> <end>
Thank you very much - see r717.


Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Re: Using fsvs as UID 0

Author benjaminm
Full name Benjamin M.
Date 2007-03-04 09:27:15 PST
Message Philipp Marek wrote, On 04/03/07 10:06:
> On Saturday 03 March 2007 22:35 Benjamin M. wrote:
> ...
>
>> cat /tmp/fsvs-test-0/log​/023.round_9.log
>> 9 1 1014 5005 remove /tmp/fsvs-test-0/wc-1/1014
>> 9 1 1015 5005 append /tmp/fsvs-test-0/wc-1/1015
>> 9 2 1020 5005 append /tmp/fsvs-test-0/wc-2/1020
>> 9 3 1025 5005 append /tmp/fsvs-test-0/wc-3/1025
>> 9 4 1005 5005 append /tmp/fsvs-test-0/wc-4/1005
>> 9 5 1010 5005 append /tmp/fsvs-test-0/wc-5/1010
>>
>
> But: my logfiles look completely different. Although the things should be
> calculated reproducably - it's more or less trivial.
>
> Please update to revision 716,
svn up
At revision 716.
> remove your /tmp/fsvs-test-0 directory, test,
Done.
>
> and send me all the 023.round_*.log files.
>
Attached.
> Is that still on MacOS 10.4?
>
CentOS 4.4. I haven't had the time to retry under MacOS X...

--

Otherwise, any idea why the last line returned by "fsvs st" (1.0.17)
always displays the status of one of the paths already reported?

fsvs st
<snip>
N.... 322233 ./var/galleries/repo​sitory/13351.jpg
<snip>
.tpC. 4096 ./var/galleries/repo​sitory/13351.jpg
<end>

Ben.
Attachments

Re: Using fsvs as UID 0

Author pmarek
Full name P.Marek
Date 2007-03-04 07:06:02 PST
Message On Saturday 03 March 2007 22:35 Benjamin M. wrote:
...
> cat /tmp/fsvs-test-0/log​/023.round_9.log
> 9 1 1014 5005 remove /tmp/fsvs-test-0/wc-1/1014
> 9 1 1015 5005 append /tmp/fsvs-test-0/wc-1/1015
> 9 2 1020 5005 append /tmp/fsvs-test-0/wc-2/1020
> 9 3 1025 5005 append /tmp/fsvs-test-0/wc-3/1025
> 9 4 1005 5005 append /tmp/fsvs-test-0/wc-4/1005
> 9 5 1010 5005 append /tmp/fsvs-test-0/wc-5/1010
Thank you.

But: my logfiles look completely different. Although the things should be
calculated reproducably - it's more or less trivial.

Please update to revision 716, remove your /tmp/fsvs-test-0 directory, test,
and send me all the 023.round_*.log files.
Is that still on MacOS 10.4?


Thank you very much!


Regards,

Phil


--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!
Page: of 2 « Previous | Next »
Messages per page: