Making rsync compile under Mac OS X 10.3.9 with extended attributes

Matt McCutchen matt at mattmccutchen.net
Fri Feb 15 16:45:22 GMT 2008


On Fri, 2008-02-15 at 16:10 +0100, Vitorio Machado wrote:
> Better news! It compiles and it works!
> I'm joining the .diff to apply on a 3.0.0pre9 with flags and crtimes 
> patches.

Congratulations on the progress!

> But as I said before, this is an alpha version, need testing before 
> saying it's functional. Be careful using it, it potentially still may 
> contains odd bugs!
> 
> I've successfully cloned the sources folder with it ( ./rsync -aXNv 
> --stats . ../rsync-copy ) but it crashes when I try a folder with a 
> resourcefork file:
> 
> Ordinateur-de-LaG:~/Desktop/rsync-test lag$ ./rsync -aXNvvvv --stats .. 
> ~/rsynctest
> cmd=<NULL> machine=<NULL> user=<NULL> path=/Users/lag/rsynctest
> cmd[0]=. cmd[1]=/Users/lag/rsynctest
> note: iconv_open("US-ASCII", "US-ASCII") succeeded.
> (Server) Protocol versions: remote=30, negotiated=30
> (Client) Protocol versions: remote=30, negotiated=30
> sending incremental file list
> [sender] make_file(.,*,2)
> [sender] expand rsync_xa to 100 bytes, did move
> [sender] expand item_list to 1200 bytes, did move
> [sender] expand rsync_xa to 20 bytes, did move
> [sender] make_file(.DS_Store,*,2)
> [sender] expand rsync_xa to 100 bytes, did move
> [sender] expand rsync_xa to 20 bytes, did move
> [sender] make_file(.localized,*,2)
> [sender] expand rsync_xa to 100 bytes, did move
> [sender] make_file(autoconf-2.61,*,2)
> [sender] expand rsync_xa to 100 bytes, did move
> [sender] make_file(autoconf-2.61.tar,*,2)
> [sender] expand rsync_xa to 100 bytes, did move
> [sender] make_file(configure.in,*,2)
> [sender] expand rsync_xa to 100 bytes, did move
> [sender] make_file(ons.o io.o compat.o hlink.o .textClipping,*,2)
> [sender] expand rsync_xa to 100 bytes, did move
> rsync: writefd_unbuffered failed to write 79 bytes [receiver]: Broken 
> pipe (32)
> _exit_cleanup(code=12, file=io.c, line=1500): entered
> rsync error: error in rsync protocol data stream (code 12) at 
> io.c(1500) [receiver=3.0.0pre9]
> _exit_cleanup(code=12, file=io.c, line=1500): about to call exit(12)
> Bus error
> 
> Ordinateur-de-LaG:~/Desktop/rsync-test lag$ ls -la ..
> total 9816
> drwx------   15 lag  lag      510 15 Feb 15:55 .
> drwxr-xr-x   16 lag  lag      544 15 Feb 16:03 ..
> -rw-------    1 lag  lag    15364 15 Feb 16:04 .DS_Store
> -rw-r--r--    1 lag  lag        0 13 Feb 10:17 .localized
> drwxr-xr-x   33 lag  lag     1122 13 Feb 18:38 autoconf-2.61
> -rw-r--r--    1 lag  lag  4904960 13 Feb 18:32 autoconf-2.61.tar
> -rw-r--r--    1 lag  lag    29270 11 Feb 17:22 configure.in
> -rw-r--r--    1 lag  lag        0 15 Feb 15:55 ons.o io.o compat.o 
> hlink.o .textClipping
> -rw-r--r--    1 lag  lag    11514 13 Feb 12:05 patch.diff
> drwxr-xr-x   96 lag  lag     3264 13 Feb 21:31 rsync-3.0.0pre9
> drwxr-xr-x  139 lag  lag     4726 15 Feb 16:00 rsync-test
> -r--r--r--    1 lag  lag     4534 13 Feb 10:54 
> rsync10.3xattr_support.matt20080212.diff
> -rw-r--r--    1 lag  lag    16941 13 Feb 21:43 
> rsync10.3xattr_support.vitorio20080213.diff
> -rw-r--r--    1 lag  lag     3652 15 Feb 15:39 
> rsync10.3xattr_support.vitorio20080215.diff
> -rw-r--r--    1 lag  lag    18130 15 Feb 15:40 
> rsync10.3xattr_supportv0.1.diff
> 
> It crashes without creating any single file on destination.
> 
> As always, if someone knows where this bus error comes from, feel free 
> to help...

Which file has the resource fork?  "ons.o io.o compat.o
hlink.o .textClipping"?

I think a bus error indicates an out-of-bounds memory access.  First we
need to establish which rsync process is incurring the bus error; since
only the receiver manages to print out an error message, I think the
sender is the one dying with the bus error.  Run rsync under gdb and see
if you can get a backtrace for where the bus error occurs.  If you can't
do that, then add some rprintf(FINFO, ...) calls to the code to see how
far rsync is getting before it crashes.

Matt



More information about the rsync mailing list