Displaying 19 results from an estimated 19 matches for "read_unbuff".
2001 Aug 22
1
@RSYNC EXIT / @RSYNC EOF
...loop(int fd, char *buf,
}
}
-/* read from the file descriptor handling multiplexing -
- return number of bytes read
- never return <= 0 */
+
+/**
+ * Read from the file descriptor handling multiplexing - return number
+ * of bytes read.
+ *
+ * Never returns <= 0.
+ */
static int read_unbuffered(int fd, char *buf, int len)
{
static int remaining;
int tag, ret=0;
char line[1024];
- if (!io_multiplexing_in || fd != multiplex_in_fd)
+ if (!io_multiplexing_in || fd != multiplex_in_fd)
return read_timeout(fd, buf, len);
while (ret == 0) {
@@ -230,7 +265,7 @@ static int read...
2002 Sep 19
0
Unexpected Tag Errors - Solution
Hi all.
After weeks of debugging etc. I found the problem.
It would seem like its a compiler error on SCO, because in line 286 of io.c
-
read_unbuffered() - it declares a 'static' variable (type size_t) called
'remaining',
and while the ANSI standard says that static vars are automatically
initialised
to zero, it would seem that this is not always the case. By explicitly
intialising the variable to zero yourself, it would seem t...
2003 Apr 27
1
Rsync read_int questions
...ctedly closed (28 bytes read so
far)
Looking at the code for recv_exclude_list, it seems real
simple. However, I do see a couple of issues. Using 2.5.6
source code, line 314 of exclude.c has an unsigned int, but
its value is set by read_int - which is signed. Next, I
follow
read_int->readfd->read_unbuffered->read_timeout->read.
Nowhere in this chain do a see a ntoh conversion. I traced
through write_int and I don't see any hton conversions in
the call chain either. How do you ensure an int is in the
proper byte order across a network?
Also, should read_int & write_int use a union to...
2001 Dec 18
3
rsync hang, more details [LONG]
..., argv=0x56f70)
at main.c:476
#10 0x1e08c in main (argc=2, argv=0x56f70) at main.c:838
Backtrace #1 on client (the parent):
#0 0xef5b7904 in _poll ()
#1 0xef5d3d40 in _select ()
#2 0x24644 in read_timeout (fd=6, buf=0xeffff348 "????", len=4) at io.c:191
#3 0x247dc in read_unbuffered (fd=6, buf=0xeffff348 "????", len=4) at io.c:263
#4 0x24950 in readfd (fd=6, buffer=0xeffff348 "????", N=4) at io.c:316
#5 0x24998 in read_int (f=6) at io.c:329
#6 0x184e8 in generate_files (f=5, flist=0x57520, local_name=0x0, f_recv=6)
at generator.c:471
#7...
2002 Dec 09
2
Rsync performance increase through buffering
...- if (!io_multiplexing_in || fd != multiplex_in_fd)
+ if (fd != multiplex_in_fd)
return read_timeout(fd, buf, len);
+ if (!io_multiplexing_in && remaining == 0) {
+ if (!buffer) {
+ bufferSz = 2 * IO_BUFFER_SIZE;
+ buffer = malloc(bufferSz);
+ if (!buffer) out_of_memory("read_unbuffered");
+ }
+ remaining = read_timeout(fd, buffer, bufferSz);
+ bufferIdx = 0;
+ }
+
while (ret == 0) {
if (remaining) {
len = MIN(len, remaining);
- read_loop(fd, buf, len);
+ memcpy(buf, buffer + bufferIdx, len);
+ bufferIdx += len;
remaining -= len;...
2003 Jan 03
0
[Fwd: Re: rsync windows -> unix still hanging :(]
...tiplex_in_fd)
---
> if (fd != multiplex_in_fd)
292a296,305
> if (!io_multiplexing_in && remaining == 0) {
> if (!buffer) {
> bufferSz = 2 * IO_BUFFER_SIZE;
> buffer = malloc(bufferSz);
> if (!buffer) out_of_memory("read_unbuffered");
> }
> remaining = read_timeout(fd, buffer, bufferSz);
> bufferIdx = 0;
> }
>
296c309,310
< read_loop(fd, buf, len);
---
> memcpy(buf, buffer + bufferIdx, len);
> bufferIdx += len;
299c313...
2002 Jan 13
0
rsynd-2.5.1 / io.c patches
...nt fd, char *buf, int len)
+static void read_loop (int fd, void *buf1, int len)
{
+ unsigned char * buf;
+ buf = (unsigned char *)buf1;
while (len) {
int n = read_timeout(fd, buf, len);
@@ -253,11 +258,11 @@
*
* Never returns <= 0.
*/
-static int read_unbuffered(int fd, char *buf, int len)
+static int read_unbuffered(int fd, void *buf, int len)
{
static int remaining;
int tag, ret=0;
- char line[1024];
+ unsigned char line[1024];
if (!io_multiplexing_in || fd != multiplex_in_fd)
return read_tim...
2002 Oct 09
1
ERROR: buffer overflow in receive_file_entry
has anyone seen this error:
ns1: /acct/peter> rsync ns1.pad.com::acct
overflow: flags=0xe8 l1=3 l2=20709376 lastname=.
ERROR: buffer overflow in receive_file_entry
rsync error: error allocating core memory buffers (code 22) at util.c(238)
ns1: /acct/peter>
--
Peter Dominguez
72 Belvedere Dr
Yonkers, NY 10705-2814
USA
Tel: 914-423-4000
Fax: 914-423-8640
Email: peter@pad.com
2002 Nov 25
1
unexpected tag 90
Hi,
i've been using rsync for about 3 years to keep common a set of shared
applications on 40 linux boxes. No problems with it on redhat 6.2, but
now I have about 4 redhat 7.3 boxes and the rest 7.2 and when I try to
rsync the common directory I am getting 'unexpected tag 90' errors.
the command I am running is:
strace /usr/bin/rsync -e ${SSH} -avx --delete --exclude
2002 Aug 16
1
unexpected tag errors
Hi All.
I've had this problem with rsync, the solution to which has been
really evasive to me. Any help would be appreciated.
I'm running rsync 2.5.5 between 2 SCO boxes and get random "unexpected tag"
errors. Sometimes the unexpected tag is positive, other times negetive,
and a retry of rsync usually manages to work the second or third time round.
The disks are identical in
2002 Sep 25
0
stack overflow
...=0xbfbff510 "rsync: connection unexpectedly
closed (232684 bytes read so far)\n", len=65) at
log.c:245
#212349 0x805668f in read_error_fd () at io.c:119
#212350 0x805688e in read_timeout (fd=3,
buf=0xbfbffb14 "????H????_\004\b\003", len=4) at
io.c:216
#212351 0x80569c2 in read_unbuffered (fd=3,
buf=0xbfbffb14 "????H????_\004\b\003", len=4) at
io.c:274
#212352 0x8056b3a in readfd (fd=3,
buffer=0xbfbffb14 "????H????_\004\b\003",
N=4) at io.c:329
#212353 0x8056b6f in read_int (f=3) at io.c:342
#212354 0x804b4ba in generate_files (f=1,
flist=0x807b110...
2002 Sep 25
0
Rsync Hangs 100% of the time when copying files from win2k machin es to linux
...cess number 2 (7284) on the linux box,
then single step until it emerges from select I get this back trace:
#0 read_timeout (fd=5, buf=0x8186b31 "", len=1251) at io.c:204
#1 0x8056b8b in read_loop (fd=5, buf=0x8186018 "\213E??@\030\002",
len=4092) at io.c:253
#2 0x8056c05 in read_unbuffered (fd=5, buf=0x8186018 "\213E??@\030\002",
len=4128) at io.c:279
#3 0x8056d4a in readfd (fd=5, buffer=0x817f038 "MZ\220", N=32768) at
io.c:329
#4 0x8056dfb in read_buf (f=5, buf=0x817f038 "MZ\220", len=32768) at
io.c:374
#5 0x8057d6f in simple_recv_token (f=5, dat...
2002 Oct 13
1
rsync 2.5.5 core dump
...buf=0xbfbff504 "rsync: connection unexpectedly closed (2525941 bytes read so far)\n", len=66) at log.c:245
#54 0x80565bf in read_error_fd () at io.c:119
#55 0x80567d4 in read_timeout (fd=3, buf=0xbfbffb18 "????L???\"?\004\b\003",
len=4) at io.c:216
#56 0x805690a in read_unbuffered (fd=3,
buf=0xbfbffb18 "????L???\"?\004\b\003", len=4) at io.c:274
#57 0x8056a6e in readfd (fd=3, buffer=0xbfbffb18 "????L???\"?\004\b\003", N=4)
at io.c:329
#58 0x8056aa3 in read_int (f=3) at io.c:342
#59 0x804b522 in generate_files (f=1, flist=0x807b120,...
2002 Mar 28
1
(no subject)
...mat, different type arg (arg 5)
match.c:184: warning: comparison between signed and unsigned
match.c:220: warning: comparison between signed and unsigned
match.c:250: warning: comparison between signed and unsigned
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c io.c -o io.o
io.c: In function `read_unbuffered':
io.c:303: warning: int format, different type arg (arg 3)
io.c: In function `writefd_unbuffered':
io.c:462: warning: int format, different type arg (arg 3)
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c tls.c -o tls.o
tls.c: In function `list_file':
tls.c:124: warn...
2004 Jan 17
1
--delete-sent-files (AKA --move-files)
...SG_SUCCESS:
+ if (len != 4) {
+ rprintf(FERROR, "invalid message %d:%d\n", tag, len);
+ exit_cleanup(RERR_STREAMIO);
+ }
+ read_loop(fd, buf, 4);
+ io_multiplex_write(MSG_SUCCESS, buf, 4);
+ break;
case MSG_INFO:
case MSG_ERROR:
case MSG_LOG:
@@ -637,6 +645,16 @@ static int read_unbuffered(int fd, char
}
read_loop(fd, buffer, remaining);
bufferIdx = 0;
+ break;
+ case MSG_SUCCESS:
+ if (remaining != 4) {
+ rprintf(FERROR, "invalid multi-message %d:%ld\n",
+ tag, (long)remaining);
+ exit_cleanup(RERR_STREAMIO);
+ }
+ read_loop(fd, line, 4)...
2002 Jul 28
0
Ex-Bug Report: -z option
...ocal_dest>
produces....
receiving file list ... done
Detected an attempt to write across stack boundary.
Terminating /usr/bin/rsync.
"libsafe violation for /usr/bin/rsync, pid=25201; overflow caused by memcpy()"
4 <= 1024? // my output, checking the len in io.c : read_unbuffered().
unexpected tag 101
rsync error: error in rsync protocol data stream (code 12) at io.c(299)
rsync: connection unexpectedly closed (324428 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)
Sync done!
This (no z)..
/usr/bin/rsync -av...
2003 Apr 29
6
Connection refused
I've added the:
/etc/services
/etc/inetd
entries as well as
/etc/rsync.conf
with the contents:
[io]
path = //Volumes/Mac_OS_X/Library/WebServer/iolanguage.com/Io
comment = iolanguage source code
But I get this error:
% rsync -rvR --progress localhost:/ .
localhost.dekorte.com: Connection refused
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error:
2002 Nov 06
4
Rsync-2.5.5 on Tru64 UNIX V51.A
...-c options.c -o
options.o
In file included from options.c:22:
popt/popt.h:117: warning: type qualifiers ignored on function return type
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c flist.c -o flist.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c io.c -o io.o
io.c: In function `read_unbuffered':
io.c:303: warning: int format, different type arg (arg 3)
io.c: In function `writefd_unbuffered':
io.c:462: warning: int format, different type arg (arg 3)
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c compat.c -o compat.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt...
2002 Nov 15
0
building rsync on MacOSX 10.2.2
...c options.c -o options.o
In file included from options.c:22:
./popt/popt.h:117: warning: type qualifiers ignored on function return type
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c flist.c -o flist.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c io.c -o io.o
io.c: In function `read_unbuffered':
io.c:303: warning: int format, size_t arg (arg 3)
io.c: In function `writefd_unbuffered':
io.c:462: warning: int format, size_t arg (arg 3)
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c compat.c -o compat.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c hlink.c -o h...