On 21 Apr 2002, Anders Nordby <anders@fix.no> wrote:> # rsync -azv \ > rsync://sunsite.dk/ftp//mirrors/mysql/Downloads/Contrib/MyAccess.mda .Works fine for me using rsync's upstream HEAD and 2.5.5 release. So it seems like it must be either something in BSD's patches, or something about your compiler, or possibly something else. Could you please try building from upstream source and let me know? -- Martin
Hello, On Sun, Apr 21, 2002 at 08:29:36AM -0700, Martin Pool wrote:>> # rsync -azv \ >> rsync://sunsite.dk/ftp//mirrors/mysql/Downloads/Contrib/MyAccess.mda . > Works fine for me using rsync's upstream HEAD and 2.5.5 release. So > it seems like it must be either something in BSD's patches, or > something about your compiler, or possibly something else. > > Could you please try building from upstream source and let me know?Did a checkout of HEAD, built with CFLAGS: -O -pipe on FreeBSD -STABLE from 15th of april. Still segfaults: # export CVSROOT=:pserver:cvs@pserver.samba.org:/cvsroot # cvs co rsync (..) # cd rsync # CFLAGS="-O -pipe" ./configure --disable-debug --enable-ipv6 (..) # make (..) # ./rsync --version rsync version 2.5.6cvs protocol version 26 Copyright (C) 1996-2002 by Andrew Tridgell and others <http://rsync.samba.org/> Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles, IPv6, 32-bit system inums, 64-bit internal inums rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details. # ./rsync -azv rsync://sunsite.dk/ftp//mirrors/mysql/Downloads/Contrib/MyAccess.mda . (non-interesting text snipped..) receiving file list ... done MyAccess.mda rsync: connection unexpectedly closed (930 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(165) Compiler is gcc 2.95.3. Cheers, -- Anders.
On Sun, Apr 21, 2002 at 08:29:36AM -0700, Martin Pool wrote:>> # rsync -azv \ >> rsync://sunsite.dk/ftp//mirrors/mysql/Downloads/Contrib/MyAccess.mda . > Works fine for me using rsync's upstream HEAD and 2.5.5 release. So > it seems like it must be either something in BSD's patches, or > something about your compiler, or possibly something else. > > Could you please try building from upstream source and let me know?The attached patch works around the bug so that it does not show up in -stable or -current. It's a workaround for GCC bugs in FreeBSD, made by bde@FreeBSD.org some weeks ago. Sorry I didn't see this before now. Rsync folks: For FreeBSD, I think this is the temporary fix for the port until GCC is fixed. I don't know if you want to include it in any way. BTW: http://rsync.samba.org/cvs.html (from the download page on rsync.samba.org) seems to be lost. Luckily, I had what I needed in ~/.cvspass. Oliver: may I commit this and revert your changes on the issue? Greg/Kris: MFC of this file in src/lib/libz/infcodes.c may save a lot of users for some trouble. The bug rsync suffers from in its home-rolled zlib 1.1.4 is also reproducable in -stable, I don't see why this isn't going to apply to other programs that uses zlib. Cheers, -- Anders. -------------- next part -------------- --- zlib/infcodes.c.orig Tue Mar 12 02:14:58 2002 +++ zlib/infcodes.c Sun Apr 21 18:14:34 2002 @@ -197,8 +197,15 @@ c->mode = COPY; case COPY: /* o: copying bytes in window, waiting for space */ f = q - c->sub.copy.dist; - while (f < s->window) /* modulo window size-"while" instead */ - f += s->end - s->window; /* of "if" handles invalid distances */ + { + /* Work-around for a FreeBSD gcc bug. */ +#ifdef __FreeBSD__ + volatile inflate_blocks_statef *s1 = s; +#endif + + while (f < s1->window) /* modulo window size-"while" instead */ + f += s1->end - s1->window; /* of "if" handles invalid distances */ + } while (c->len) { NEEDOUT
* Anders Nordby <anders@fix.no> [2002-04-21 18:36]:> Oliver: may I commit this and revert your changes on the issue?Of course & thanks. Regards, Olli -- Department of Computing Science Federal Armed Forces University Munich http://ist.unibw-muenchen.de/People/obraun/