https://bugzilla.samba.org/show_bug.cgi?id=6508

           Summary: Inconsistent exit code behavior between local, ssh
                    transport, and rsyncd transport
           Product: rsync
           Version: 3.0.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P3
         Component: core
        AssignedTo: way...@samba.org
        ReportedBy: alexanderper...@yahoo.com
         QAContact: rsync...@samba.org


Bug Summary
-----------
According to the man page, file vanish errors should get reported with exit
code 24. This happens correctly when rsync is copying locally. Also happens
correctly when rsync copies from a remote rsync invoked via ssh. But does *not*
happen when rsync copies from a remote rsyncd. In that case, the remote rsyncd
logs a code 24 in the remote syslog, but the local rsync exits with code 0.

I don't know whether this bug is specific to exit code 24, or also exists for
other types of exit codes. The current report is similar to one given on the
mailing list in 2002 (concerning exit code 23):

 http://lists.samba.org/archive/rsync/2002-October/003821.html

 http://lists.samba.org/archive/rsync/2002-October/003947.html


Affected Versions
-----------------
We discovered this bug in 2.6.9 and verified just now that it also exists in
3.0.4. (Unfortunately it is non-trivial at this moment for me to play around
with 3.0.6 or 3.1.0. Sorry.) The reports from 2002 (see links above) concerned
version 2.5.5.

Aside from the two links given above, I have found no other discussions (in
bugzilla or on the web) concerning inconsistent exit code behavior when
comparing the ssh transport to a direct rsyncd connection.


How to reproduce:
-----------------

(0) mkdir rsync_experiment ; cd rsync_experiment

(1) Prepare rsyncd. I put the following in /etc/rsyncd.conf
  [myroot]
  path = /root/rsync_experiment/
  uid = 0
  read only = false

(2) Launch rsyncd. On Ubuntu edit /etc/default/rsync to have
"RSYNC_ENABLE=true" and then do "invoke-rc.d rsync start"

(3) Create a loop script to create/delete files as rapidly as possible:
  #!/bin/sh
  mkdir -p src
  while true; do
    tempfile=`mktemp src/somefile.XXXXXXXX`
    rm -f $tempfile
  done

(4) Invoke about 10 copies of that script as background processes. I called my
script "create_delete_loop.sh", and then just did:
  ./create_delete_loop.sh &
     [repeat previous command 10 times]

(5) Now compare the output of the following commands:

  rsync -av src/ dst/ ; echo $?
     [Correctly exits with code 24]

  rsync -av r...@localhost:src/ dst/ ; echo $?
     [Correctly exits with code 24]

  rsync -av r...@localhost::myroot/src/ dst/ ; echo $?
     [INCORRECTLY EXITS WITH CODE 0]

  rsync -av src/ r...@localhost::myroot/dst/ ; echo $?
     [Correctly exits with code 24]

(6) Be sure to kill those rapidly looping file creation/deletion scripts from
step (4), or soon your machine may freeze up on you!
  killall create_delete_loop.sh
  killall create_delete_loop.sh
    [keep repeating until it says no more processes to be killed]

Thanks.
Alexander Perlis


-- 
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

Reply via email to