I'm trying to do a backup from a synology product (NAS diskstation) to a FreeBSD server, with a 3.0.8pre1 All works well since I get this messages (from log): 2011/03/10 09:15:30 [27378] receiving file list 2011/03/10 09:15:30 [27378] overflow: xflags=0xfa l1=255 l2=774 lastname=@dominis@/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7ysNgXs..gGt8G95MfnVXLBFU--/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7ysVjTftHWkNlQYxEKm0znW3---/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7ysFroUSTkNzwzY4Zko.kOIjE--/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7ysWlVjAVSxuMNMuthTMJ-0b---/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7ys9JlEYfGR20z-oLHK1Chcb---/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7ystyGzkVf3V7WywS-C1FjJTk--/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7ys4kWwlhAnCqKHZ.4sUaFCCU--/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7yslPyZmqmbCTNHY3Zs.lcRi---/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7ys9xLBBQqw3WdAE7YHrpMlnU--/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7ys.QFL27H5pIVa2lyaBsHLxE--/ECRYPTFS_FNEK_ENCRYPTED.FWZ0AjypU3Tk-kbJfmwSC9.1Zd.xFP0LS7ys13ARHC5.R4ZPEw-mpvL1A--- [generator] 2011/03/10 09:15:30 [27378] ERROR: buffer overflow in recv_file_entry [generator] 2011/03/10 09:15:30 [27378] rsync error: error allocating core memory buffers (code 22) at util.c(124) [generator=3.0.8pre1] The path seems to be too long. I tried to modify the MAXPATHLEN value to 10240, recompiled and installed but the problem persists :( Can you help me? Thanks in advanced
MAXPATHLEN is a system-defined value of the longest path a function such as open() can handle, so you can't just arbitrarily increase it. If your OS provides a MAXPATHLEN value that is smaller than what open() can handle, file a bug with the FreeBSD folks. If it doesn't provide any such define, rsync.h will set it to be a conservative 1024 bytes. If you find that FreeBSD has some other define for this maximal value I can either get rsync.h to make use of it, or you can get the FreeBSD folks to define MAXPATHLEN. As for increasing the value not helping -- you must either not have defined it right, or you must be doing a transfer where the other side doesn't have a larger buffer.
rsync should use pathconf() to find the maximum allowed path length and not expect to find a OS define like PATH_MAX because this can vary also from filesystem to filesystem. See https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html
Some additional info : https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=184340