On Thu, 2023-12-14 at 14:09 -0500, Kevin Korb wrote:
> Unfortunately, exit 23 litterally just means something else went wrong
> and might have scrolled off of the screen if you have rsync listing
> files (--verbose or --itemize_changes).  Essentially, it is anything
> that doesn't have its own exit code.  I just ignore it.  The most common
> reaosn is file vanished.

THX for sharing your experiences and knowledge :-)

I have just tried to "reverse engineer" the possible reasons from the source 
code
and have found 21 reasons that I hope will never happen ;-)

So ignoring (or treating as a warning only) sound as best option so far.

-----

Looking into the rsync source code I can see only one location where exit code 
23 is set:

https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/errcode.h#L42
    #define RERR_PARTIAL    23      /* partial transfer */

https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/log.c#L97
    { RERR_PARTIAL    , "some files/attrs were not transferred (see previous 
errors)" },


https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/cleanup.c#L217-L218
    if (io_error & IOERR_GENERAL || got_xfer_error)
        exit_code = RERR_PARTIAL;
        
        
        
So the question is which reasons cause
- IOERR_GENERAL
- got_xfer_error
to be true?



IOERR_GENERAL is set for different reasons (first line is the log output format 
string):

1. receive_sums failed [what is that at all?]:
   
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/sender.c#L345-L348

2. send_files failed to open %s
   
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/sender.c#L358-L362

3. fstat failed
   
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/sender.c#L373C33-L373C45

4. read errors mapping %s
   
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/sender.c#L433-L436

5. change_dir %s failed
   
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L366-L369
     
6. skipping overly long name: %s
   
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1245-L1247

7. symlink has no referent: %s
   See the source code comments there when symlinks are checked:
   
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1271C1-L1282C28
   
8. readlink_stat(%s) failed
   
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1293-L1295

9. skipping file with bogus (zero) st_mode: %s
   
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1298-L1302

10. skipping symlink with 0-length value: %s
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1565-L1566

11. [%s] cannot convert filename: %s (%s)
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1595-L1601
    
12. [%s] cannot convert symlink data for: %s (%s)
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1609-L1614
           

13. get_acl(fname, &sx) < 0   // with no explicit error message!
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1628-L1632
   
14. get_xattr(fname, &sx) < 0  // with no explicit error message!
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1637-L1642

15. link_stat %s failed
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1809-L1811

16. opendir %s failed
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1841-L1843

17. filename overflows max-path len by %u: %s/%s
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1863-L1871

18. cannot send file with empty name in %s
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1873-L1877
   
19. readdir(%s)
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L1886-L1889
   
20. link_stat %s failed
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/flist.c#L2396-L2399

21. cannot add local filter rules in long-named directory: %s
    
https://github.com/WayneD/rsync/blob/2f9b963abaa52e44891180fe6c0d1c2219f6686d/exclude.c#L815-L818



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