Bug 1536 - rsync aborts transferring files larger than 2 GB
rsync aborts transferring files larger than 2 GB
Product: rsync
Classification: Unclassified
Component: core
: P3 major
: ---
Assigned To: Wayne Davison
Rsync QA Contact
Depends on:
  Show dependency treegraph
Reported: 2004-07-16 08:45 UTC by Christian Vieser
Modified: 2005-03-16 16:48 UTC (History)
1 user (show)

See Also:

Add checks for open64 and mkstemp64 to configure (2.15 KB, patch)
2004-07-30 13:30 UTC, Wayne Davison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Vieser 2004-07-16 08:45:24 UTC
the HP-UX port of rsync made by the HP-UX Porting Centre
(http://hpux.connect.org.uk/) seems not to be able to transfer files larger then
2 GB. We tested this on HP 9000 servers with HP-UX 11.0 and 11.11 . We always
get following output:

receiving file list...
1 file to consider
write failed on "/dir/filename.foo": File too large
rsync error: error in file IO (code 11) at receiver.c(227)
rsync: connection unexpectedly closed (113 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(342)

In all cases the filesystem was of type vxfs with largefiles enabled.

The rsync server and the rsync client are same version 2.6.2 :

# /usr/local/bin/rsync --version
rsync  version 2.6.2  protocol version 28
Copyright (C) 1996-2004 by Andrew Tridgell and others
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles,
              no IPv6, 32-bit system inums, 64-bit internal inums

I wasn't able to compile the rsync package by myself. So I can't say whether
it's a general problem on HP-UX or only with this compilation by the Porting Centre.
Comment 1 Wayne Davison 2004-07-30 13:22:01 UTC
Turns out that HP-UX does not have a proper large-file version of mkstemp().
Your best bet for now is to undefine HAVE_SECURE_MKSTEMP in config.h and recompile.

It would be good to add some logic into configure to do this automatically.  I
wonder if it would be sufficent to check for the functions open64() and
mkstemp64() and if the former exists but not the latter, avoid mkstemp()?
Comment 2 Wayne Davison 2004-07-30 13:30:56 UTC
Created attachment 589 [details]
Add checks for open64 and mkstemp64 to configure

If the user's system has open64() but not mkstemp64(), we avoid using
Comment 3 Steve Bonds 2004-08-02 14:48:14 UTC
I tested this patch on HPUX 11.0 and it seems to work properly.  The config.log
shows that it finds open64() but not mkstemp64(), and skips mkstemp().  My only
concern would be that some OS doesn't have mkstemp64() but has a working
mkstemp().  (AIX, perhaps?)

I also tested the patched rsync with the largefiles testsuite script I recently
sent to the rsync mailing list-- it passes.

  -- Steve
Comment 4 Wayne Davison 2004-08-03 10:57:57 UTC
I checked the patch into CVS.