Ex-Bug Report: -z option

szii at sziisoft.com szii at sziisoft.com
Sun Jul 28 17:56:01 EST 2002


Since writing this I've recompiled with zlib 1.1.4 and everything appears
smooth.  Since this is intermittant, I'll send it off anyways in the hops that
someone else may see it.  It also *might* apply to the "known issues"
entry about "unexpected close."  (Similar symptoms, but it may just be a shared
codepath on the messages.  Note that the dumped len in my output(4)
corresponds to the "dropped connection" size of 4 as well.)

Compiling still generates the same warnings as the "broken" version (listed
below.)

-Mike
szii at sziisoft.com

--Original message
------------------------------------------------------
Okay, to preface... this is intermittant.  It'll work for a bit, then start giving
errors.  Once it starts it'll usually continue until rebooting.  I've not done
a full test-case scenario on it, but have narrowed it down the the "-z"
option.  (system zlib is 1.1.3, if it matters.)  Since the TODO list mentions
migrating away from the built-in zlib, I don't know that my running 1.1.3
matters.

Note that I put in 1 line of debug code so the dumped offsets
from rprintf() will be 1 line off.

This...
     /usr/bin/rsync -avz --delete -e ssh <remote_source> <local_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 --delete -e ssh <remote_source> <local_dest>
works fine.

Upgraded to 2.5.5 to no avail.

While compiling, I receive a good number of

generator.c: In function `recv_generator':
generator.c:344: warning: comparison between signed and unsigned

type errors in various files, as well as

main.c: In function `start_client':
main.c:665: warning: unused variable `write_batch'
main.c:664: warning: unused variable `whole_file'

including...
zlib/inftrees.c: In function `huft_build':
zlib/inftrees.c:216: warning: signed and unsigned type in conditional expression
zlib/inftrees.c: In function `inflate_trees_fixed':
zlib/inftrees.c:403: warning: unused parameter `z'

Note again that running without -z works 100% of the time and currently
using -z will fail 100% of the time.   Thus, the "connection aborted" message
may be bogus.

Thanks.

-Mike

./configure --prefix=/usr
configure: Configuring rsync 2.5.5
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc option to accept ANSI C... none needed
checking whether to include debugging symbols... yes
checking for remsh... 0
checking for broken largefile support... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking ipv6 stack type... linux-glibc
checking for library containing getaddrinfo... none required
checking whether byte ordering is bigendian... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/fcntl.h usability... yes
checking sys/fcntl.h presence... yes
checking for sys/fcntl.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/unistd.h usability... yes
checking sys/unistd.h presence... yes
checking for sys/unistd.h... yes
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking compat.h usability... no
checking compat.h presence... no
checking for compat.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking for sys/wait.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/filio.h usability... no
checking sys/filio.h presence... no
checking for sys/filio.h... no
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/mode.h usability... no
checking sys/mode.h presence... no
checking for sys/mode.h... no
checking glob.h usability... yes
checking glob.h presence... yes
checking for glob.h... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking mcheck.h usability... yes
checking mcheck.h presence... yes
checking for mcheck.h... yes
checking sys/sysctl.h usability... yes
checking sys/sysctl.h presence... yes
checking for sys/sysctl.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking arpa/nameser.h usability... yes
checking arpa/nameser.h presence... yes
checking for arpa/nameser.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for short... yes
checking size of short... 2
checking for inline... inline
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking for mode_t... yes
checking for off_t... yes
checking for size_t... yes
checking for pid_t... yes
checking type of array argument to getgroups... gid_t
checking for struct stat.st_rdev... yes
checking for ino_t... yes
checking for socklen_t... yes
checking for errno in errno.h... yes
checking for connect... yes
checking for inet_ntop in -lresolv... yes
checking for inet_ntop... yes
checking for inet_pton... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for struct sockaddr.sa_len... no
checking struct sockaddr_storage... yes
checking for strcasecmp... yes
checking whether utime accepts a null argument... yes
checking for waitpid... yes
checking for wait4... yes
checking for getcwd... yes
checking for strdup... yes
checking for strerror... yes
checking for chown... yes
checking for chmod... yes
checking for mknod... yes
checking for fchmod... yes
checking for fstat... yes
checking for strchr... yes
checking for readlink... yes
checking for link... yes
checking for utime... yes
checking for utimes... yes
checking for strftime... yes
checking for memmove... yes
checking for lchown... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for asprintf... yes
checking for setsid... yes
checking for glob... yes
checking for strpbrk... yes
checking for strlcat... no
checking for strlcpy... no
checking for mtrace... yes
checking for mallinfo... yes
checking for setgroups... yes
checking for working socketpair... yes
checking for working fnmatch... yes
checking for poptGetContext in -lpopt... yes
checking whether to use included libpopt... no
checking for long long... yes
checking for off64_t... no
checking for short ino_t... no
checking for unsigned char... no
checking for broken readdir... no
checking for utimbuf... yes
checking if gettimeofday takes tz argument... yes
checking for C99 vsnprintf... yes
checking for secure mkstemp... yes
checking for broken inet_ntoa... no
checking for broken inet_aton... no
checking whether -c -o works... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/dummy
config.status: creating zlib/dummy
config.status: creating popt/dummy
config.status: creating shconfig
config.status: creating config.h

    rsync 2.5.5 configuration successful

[root at dev rsync-2.5.5]# make
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c rsync.c -o rsync.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c generator.c -o generator.o
generator.c: In function `recv_generator':
generator.c:344: warning: comparison between signed and unsigned
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c receiver.c -o receiver.o
receiver.c: In function `delete_already_done':
receiver.c:58: warning: comparison between signed and unsigned
receiver.c:59: warning: comparison between signed and unsigned
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c cleanup.c -o cleanup.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c sender.c -o sender.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c exclude.c -o exclude.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c util.c -o util.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c main.c -o main.o
main.c: In function `start_client':
main.c:665: warning: unused variable `write_batch'
main.c:664: warning: unused variable `whole_file'
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c checksum.c -o checksum.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c match.c -o match.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c syscall.c -o syscall.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c log.c -o log.o
log.c: In function `log_transfer':
log.c:574: warning: unused parameter `file'
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c backup.c -o backup.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c options.c -o options.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c flist.c -o flist.o
flist.c: In function `receive_file_entry':
flist.c:525: warning: signed and unsigned type in conditional expression
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c io.c -o io.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c compat.c -o compat.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c hlink.c -o hlink.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c token.c -o token.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c uidlist.c -o uidlist.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c socket.c -o socket.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c fileio.c -o fileio.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c batch.c -o batch.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c clientname.c -o clientname.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c params.c -o params.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c loadparm.c -o loadparm.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c clientserver.c -o clientserver.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c access.c -o access.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c connection.c -o connection.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c authenticate.c -o authenticate.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c lib/fnmatch.c -o lib/fnmatch.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c lib/compat.c -o lib/compat.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c lib/snprintf.c -o lib/snprintf.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c lib/mdfour.c -o lib/mdfour.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c lib/permstring.c -o lib/permstring.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c zlib/deflate.c -o zlib/deflate.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c zlib/infblock.c -o zlib/infblock.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c zlib/infcodes.c -o zlib/infcodes.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c zlib/inffast.c -o zlib/inffast.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c zlib/inflate.c -o zlib/inflate.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c zlib/inftrees.c -o zlib/inftrees.o
zlib/inftrees.c: In function `huft_build':
zlib/inftrees.c:216: warning: signed and unsigned type in conditional expression
zlib/inftrees.c: In function `inflate_trees_fixed':
zlib/inftrees.c:403: warning: unused parameter `z'
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c zlib/infutil.c -o zlib/infutil.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c zlib/trees.c -o zlib/trees.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c zlib/zutil.c -o zlib/zutil.o
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c zlib/adler32.c -o zlib/adler32.o
Please ignore warnings below about mktemp -- it is used in a safe way
gcc -g -O2 -DHAVE_CONFIG_H -Wall -W  -o rsync rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o main.o checksum.o
match.o syscall.o log.o backup.o options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o fileio.o batch.o clientname.o
params.o loadparm.o clientserver.o access.o connection.o authenticate.o lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o
lib/permstring.o  zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/infutil.o
zlib/trees.o zlib/zutil.o zlib/adler32.o   -lpopt -lresolv











More information about the rsync mailing list