link-dest

Wayne Davison wayned at samba.org
Mon Jan 17 21:44:55 GMT 2005


On Sat, Jan 15, 2005 at 06:27:03PM +0100, Lars Heer wrote:
> I receive following error:
> var/run/samba/brlock.tdb
> Warning: unexpected read size of -7004 in map_ptr

That is weird.  I note that some variables in map_ptr() are declared to
be "int" instead of "int32", but that won't be the cause of the problem
unless the size of an "int" is less than the size of an "int32" on your
system -- is it?  If you're not sure, you can temporarily add this line
near the top of main() in main.c and run "./rsync --version" to see the
result:

    fprintf(stderr, "int=%u, int32=%u\n", sizeof (int), sizeof (int32));

Assuming that is not the problem, the only way I can see read_size going
negative in map_ptr() is for "map->def_window_size" to also be negative,
and that would mean that a hugmongous value for map_size had been passed
in to map_file(), which is probably only possible if the value for the
block-length associated with the checksums got mangled into a really
huge value.

Is the error you cited above reproducable?  If so, perhaps you could let
me have a copy of the file (via off-list email if it's not too large) so
that I could try some debugging.

I'm going to check-in some cleanup for the type problems I alluded to
above, and I'll add some bounds checking for the block-size too while
I'm at it.

> I only put the self compiled rsync on the executing machine...
> Could this be the error?

Rsync should be backward compatible with older versions, so it shouldn't
matter that the remote rsync is not the latest version as far as this
error is concerned.  (However, if you're using the new support for
multiple --link-dest options, you cannot push to an older rsync since
the receiving side needs to be upgraded to handle the extra --link-dest
options properly.)

..wayne..


More information about the rsync mailing list