--- Comment #1 from jolui...@gmail.com 2011-05-29 01:43:29 UTC ---
More information:
I did compile the rsync 3.0.8 version, statically, in centos 3.9 32 bits,
because this is the platform to build utilities for esxi 4.1.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
--- Comment #2 from jolui...@gmail.com 2011-05-29 03:18:22 UTC ---
I did download the git'ed version (3.1.0), and the problem continue.
--- Comment #3 from jolui...@gmail.com 2011-05-29 04:46:15 UTC ---
The size of file is 8gb (not 36gb).
Without parameters --inplace and --sparse, I did check, in the destination
disk, the temporary file (.cata-920-flat.vmdk.WKiDRx), increase up to 8gb, and,
then, I see the rsync error in screen, and the temporary file is deleted.
--- Comment #4 from jolui...@gmail.com 2011-05-30 19:12:21 UTC ---
Hi, forum!
Anyone out there?
Wayne Davison <way...@samba.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #5 from Wayne Davison <way...@samba.org> 2011-06-18 17:41:13 UTC ---
Any time there is a read error, rsync tweaks the checksum so that it doesn't
match, thus alerting the receiver that the file is bogus. You need to figure
out what is causing this error from your OS:
rsync: read errors mapping
"/vmfs/volumes/cata-021-lun0/cata-920/cata-920-flat.vmdk": Invalid argument
(22)
That error is reported at the end of all the reading, and indicates that one of
the read() calls for the sender's file returned that errno. If you strace the
sending side, you should be able to see what the parameters are to the read()
that trigger that OS error.
--- Comment #6 from jolui...@gmail.com 2011-07-07 15:38:30 UTC ---
Excuse me by the delay, and thanks for your reply.
The problem are:
* I need use the rsync (statically compiled) to rsync files between a esxi-free
4.1 (vmware) and a linux filesystem.
* Then, I did compile the rsync from sources, in a rhel platform (appropiate to
generate binaries for this version of vmware), and transfer it to esxi host.
* In esxi-free 4.1 (the sender side), we don't have tools to debug.
* I don't have experience with sparse files in other platforms, to test it.
Can you give me a little help to modify the source to add debug information in
the syscall?. I did try it, but, because the size of file is very large, and I
see a lot of debug information.
(In reply to comment #5)
--- Comment #17 from molniev <mol...@hotmail.com> 2012-10-19 12:49:07 UTC ---
Hi.
I'am using rsync 3.0.9 on ESXi 5.0 and detect this bug (thanks Remco Hosman).
I made ​​a patch that solves the problem. This code reads the files, aligned
with the 4096 border. The size of the blocks in (4096 * 4096 * 2) bytes (I
think it will be faster, but you sacrifice memory).
Replace the file "fileio.c" function "map_ptr" (line 180-264) with the
following code:
char *map_ptr(struct map_struct *map, OFF_T offset, int32 len)
{
OFF_T ret = 0;
int32 read_size = 0;
int32 n = 0;
if (0 == len) return NULL;
if (len < 0) { rprintf(FERROR, "invalid len passed to map_ptr: %ld\n",
(long)len); exit_cleanup(RERR_FILEIO); }
if ( (offset >= map->p_offset) && (offset + len <= map->p_offset +
map->p_len) )
return map->p + (offset - map->p_offset);
map->p_offset = (offset >> 12);
map->p_offset = (map->p_offset << 12);
while (map->p_len < (len + 4096) )
map->p_len += (4096 * 4096 * 2);
if (map->p_len > map->p_size) {
map->p_size = map->p_len;
map->p = realloc_array(map->p, char, map->p_size);
if (!map->p) out_of_memory("map_ptr");
}
if (map->p_fd_offset != map->p_offset) {
ret = do_lseek(map->fd, map->p_offset, SEEK_SET);
if (ret != map->p_offset) {
rsyserr(FERROR, errno, "lseek returned %.0f, not %.0f",
(double)ret, (double)map->p_offset);
exit_cleanup(RERR_FILEIO);
}
map->p_fd_offset = map->p_offset;
}
if (map->p_offset + map->p_len > map->file_size) {
if (map->p_offset > map->file_size) {
map->status = ENODATA;
printf("DBG path function map_ptr error: %i\n", (int)__LINE__);
memset(map->p + (offset - map->p_offset), 0, len);
return (map->p + (offset - map->p_offset) );
}
map->p_len = map->file_size - map->p_offset;
if (len > (map->p_len - (offset - map->p_offset) ) ) {
map->status = ENODATA;
printf("DBG path function map_ptr error: %i\n", (int)__LINE__);
memset(map->p + map->p_len, 0, map->p_len - len);
}
}
read_size = map->p_len;
while (read_size > 0) {
n = read(map->fd, map->p, read_size);
if (n <= 0) {
if (!map->status) map->status = n ? errno : ENODATA;
printf("DBG path function map_ptr error: %i\n", (int)__LINE__);
memset(map->p, 0, map->p_len);
break;
}
map->p_fd_offset += n;
read_size -= n;
}
return map->p + (map->p_offset - offset);
}
If you find a bug in my code - please let - I'll try to fix it.