Bug 8001 - Is MAXPATHLEN set properly on FreeBSD?
Is MAXPATHLEN set properly on FreeBSD?
Product: rsync
Classification: Unclassified
Component: core
All FreeBSD
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
Depends on:
  Show dependency treegraph
Reported: 2011-03-10 08:20 UTC by Josep
Modified: 2011-03-10 22:14 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Josep 2011-03-10 08:20:27 UTC
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
Comment 1 Wayne Davison 2011-03-10 22:14:24 UTC
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.