Re: exit status 13 in version 3.1

2009-11-15 Thread Wayne Davison
On Thu, Nov 12, 2009 at 10:00 PM, Matt McCutchen m...@mattmccutchen.netwrote:

 My point is that it's a clunky way to achieve the goal, and it would be
 simpler for the sender to just keep reading after a write error.


Yeah, that's a good idiom, and the latest code wasn't doing a good enough
job of that when the socket closed.  One new issue turned out to be that the
client started getting a read error (where the old code would get a write
error) due to the buffer-filling code getting an EOF on the socket (even
though the perform_io() call was ostensibly there to try to write some
data).  There was also a bug where an EOF error did not try to empty out any
message data currenly in the buffer.

I've committed some improvements for this, so the error reporting should be
better when talking to older versions.  For instance, the input code now
just notes an input EOF unless it is there to read some data and the data is
not present.  It also does a better job of draining any pending error
messages from the input buffer (and reading any final messages) when a write
error occurs.

As for the arbitrary io_timeout that gets set, yes, it is debatable if it is
a good idea.  While not strictly necessary, I kind of like having it just as
a final sanity check for the error-exit code.  I did make the arbitrary
timeout larger, though, since it should not ever really be needed.  I'll
also review the error-handling a bit more, and possibly reconsider this
further.

..wayne..
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

DO NOT REPLY [Bug 6896] New: Copy to nfs mounted partitions fails - RHEL 5.4

2009-11-15 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=6896

   Summary: Copy to nfs mounted partitions fails - RHEL 5.4
   Product: rsync
   Version: 2.6.8
  Platform: x64
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P3
 Component: core
AssignedTo: way...@samba.org
ReportedBy: si...@darkmere.gen.nz
 QAContact: rsync...@samba.org


I am running RHEL 5.4 as both client and server. The server is exporting
a partition to client. I am attempting to rsync local files on the client
to the NFS mounted partition. This appears to be failing with the RHEL 5.4
upgrade ( from RHEL 5.3, was working ok then). I strongly suspect this is might
be related to O_EXEL (see http://lwn.net/Articles/251012/ ) as we were getting
similar problems with another application.

$ rsync --version
rsync  version 2.6.8  protocol version 29

The local (source) directory

$ ls -l crontab 
-rw-rw-r-- 1 webmastr webmastr 2681 Nov 16 16:00 crontab


The destination:

$ mount
nfs_server:/wwwroot on /export/www/wwwroot type nfs4
(rw,noatime,bg,retrans=8,addr=172.22.0.12)

$ ls -la /export/www/wwwroot/live/data/test/
total 16
drwxr-xr-x 2 webmastr webmastr 4096 Nov 16 15:58 ./
drwxr-xr-x 6 webmastr webmastr 4096 Nov 16 15:44 ../


Works okay with normal copy.

$ cp -v crontab /export/www/wwwroot/live/data/test/
`crontab' - `/export/www/wwwroot/live/data/test/crontab'

$ ls -al /export/www/wwwroot/live/data/test/
total 24
drwxr-xr-x 2 webmastr webmastr 4096 Nov 16 16:01 ./
drwxr-xr-x 6 webmastr webmastr 4096 Nov 16 15:59 ../
-rw-rw-r-- 1 webmastr webmastr 2681 Nov 16 16:01 crontab

$ rm /export/www/wwwroot/live/data/test/crontab 

Doesn't when I use rsync.

$ rsync crontab /export/www/wwwroot/live/data/test/
rsync: mkstemp /export/www/wwwroot/live/data/test/.crontab.Tb0UDW failed:
Permission denied (13)
rsync error: some files could not be transferred (code 23) at main.c(892)
[sender=2.6.8]

$ ls -al /export/www/wwwroot/live/data/test/
total 20
drwxr-xr-x 2 webmastr webmastr 4096 Nov 16 16:02 ./
drwxr-xr-x 6 webmastr webmastr 4096 Nov 16 15:59 ../
-r-x--xr-T 1 webmastr webmastr0 Dec 26  1970 .crontab.Tb0UDW*

NOTE the actual data of the file seems to change but is almost always several
years into the past.

Running with more debugging:

$ rsync -v crontab /export/www/wwwroot/live/data/test/
cmd= machine= user= path=/export/www/wwwroot/live/data/test/
cmd[0]=. cmd[1]=/export/www/wwwroot/live/data/test/ 
(Client) Protocol versions: remote=29, negotiated=29
(Server) Protocol versions: remote=29, negotiated=29
note: iconv_open(UTF-8, UTF-8) succeeded.
[sender] make_file(crontab,*,2)
server_recv(2) starting pid=29535
[sender] i=0 NULL crontab mode=0100664 len=2681 flags=0
send_file_list done
file list sent
send_files starting
recv_file_name(crontab)
received 1 names
[receiver] i=0 1 crontab mode=0100664 len=2681 flags=0
recv_file_list done
get_local_name count=1 /export/www/wwwroot/live/data/test/
recv_files(1) starting
generator starting pid=29535 count=1
delta-transmission disabled for local transfer or --whole-file
recv_generator(crontab,0)
send_files(0, crontab)
count=0 n=0 rem=0
send_files mapped crontab of size 2681
calling match_sums crontab
crontab
sending file_sum
false_alarms=0 hash_hits=0 matches=0
sender finished crontab
generate_files phase=1
send_files phase=1
recv_files(crontab)
rsync: mkstemp /export/www/wwwroot/live/data/test/.crontab.LrB2Oc failed:
Permission denied (13)
data recv 2681 at 0
got file_sum
recv_files phase=1
generate_files phase=2
send_files phase=2
send files finished
total: matches=0  hash_hits=0  false_alarms=0 data=2681
recv_files phase=2
generate_files phase=3
recv_files finished
generate_files finished
client_run waiting on 29535

sent 2769 bytes  received 42 bytes  5622.00 bytes/sec
total size is 2681  speedup is 0.95
_exit_cleanup(code=0, file=main.c, line=892): entered
rsync error: some files could not be transferred (code 23) at main.c(892)
[sender=2.6.8]
_exit_cleanup(code=0, file=main.c, line=892): about to call exit(23)


$ ls -al /export/www/wwwroot/live/data/test/
total 24
drwxr-xr-x 2 webmastr webmastr 4096 Nov 16 16:03 ./
drwxr-xr-x 6 webmastr webmastr 4096 Nov 16 15:59 ../
-r-xrT 1 webmastr webmastr0 Dec 27  1970 .crontab.LrB2Oc*
-r-x--xr-T 1 webmastr webmastr0 Dec 26  1970 .crontab.Tb0UDW*


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug, or are watching the QA contact.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


DO NOT REPLY [Bug 6896] Copy to nfs mounted partitions fails - RHEL 5.4

2009-11-15 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=6896





--- Comment #1 from m...@mattmccutchen.net  2009-11-15 21:26 CST ---
IIUC, the upstream rsync project does not support 2.6.8 any more (i.e., the
3.0.0 daemon security fixes were officially backported only to 2.6.9), so
unless you can reproduce the problem with a newer rsync, you may be better
advised to bug Red Hat.

That aside, to understand the issue, we would need to see strace output showing
the mkstemp-related system calls leading up to the EACCES.  The temporary file
is somehow getting really weird permissions, and since NFS isn't so crisp about
checking permissions only at file-open time, that could certainly explain the
EACCES.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug, or are watching the QA contact.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[SCM] The rsync repository. branch, master, updated. v3.0.3-281-gae598f3

2009-11-15 Thread Rsync CVS commit messages
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project The rsync repository..

The branch, master has been updated
   via  ae598f3847bd83b81effb6cc38719e790ed4c1cf (commit)
  from  d85d029b923a747fdf9fbf39154f8424129f7023 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit ae598f3847bd83b81effb6cc38719e790ed4c1cf
Author: Wayne Davison way...@samba.org
Date:   Sun Nov 15 12:49:09 2009 -0800

Don't complain about a socket EOF unless it affects a read.
Make sure a write error drains any messages in the input buffer.

---

Summary of changes:
 cleanup.c |2 +-
 io.c  |   41 +++--
 2 files changed, 36 insertions(+), 7 deletions(-)


hooks/post-receive
--
The rsync repository.
___
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs