The Samba-Bugzilla – Bug 5541
"rsync -H" Fails on PPC AIX 5.3.0
Last modified: 2008-07-23 19:27:15 UTC
I have built rsync 3.0.2 and 3.0.3pre2 using both "gcc" and "cc", neither being able to handle the hard link option correctly. This was found while running the testsuite provided (initially in the "hands" test). Here is a snippette from the hands/test.log file:
Test hard links: Running: "/tmp/rsync/rsync-3.0.3pre2/rsync -avH "/tmp/rsync/rsync-3.0.3pre2/testtmp/hands/from/" "/tmp/rsync/rsync-3.0.3pre2/testtmp/hands/to""
sending incremental file list
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(635) [sender=3.0.3pre2]
The prior test (i.e., with only the "-av" options) ran as expected.
I have compiled version 2.6.2, and it tests fine. I do not know if there is a new option I must throw when running ./configure, or if this is a bug in rsync. Please advise. I'm not sure what else I can provide at this time, but please feel free to ask for whatever I can provide (within reason, of course). I have searched this Bugzilla and Google for help, also to no avail.
Yes, this is a known bug, but nobody responded to my requests to help me in debugging it (I can see the failures on the samba build farm, but have no access to AIX). If there is a way for me to login to an AIX system, I'd be glad to look into the issue. Otherwise, please check to see if rsync is crashing, and if so, where.
I wish I could give you access to one of our AIX boxes, but it is not possible (it would be grounds for my dismissal). If you could give me a hint as to where to begin to debug this, I may be able to help. I'm no programmer; I'm an electrical engineer with a specific task that needs to be handled. I do have extensive PERL experience and some very "OLD" C programming experience (i.e., 1980's - early 90's).
On a very LONG shot, I may be able to set up a Netmeeting with you, in which I can either have you watch, or give you limited access to an AIX box. However, I would have to clear it with my boss on Monday. As I am sure you have a real job during the day, if I get approval, I can do it either some evening, or over the weekend if that suits you better. I will keep you posted on this front.
You should be able to ask your OS to allow crash dumps to be created. This is typically done via "ulimit -c unlimted", and affects the current shell's processes. Then, if you run rsync and it crashes, you should get a core file. You can use that core file with a non-stripped version of the rsync executable you ran (one with the debug symbols in it, such as the rsync executable in the build dir) to get a backtrace of the crash point. e.g.:
gdb rsync core
If it doesn't crash, you can try running rsync under a syscall tracing utility (which is strace under linux -- I don't know what AIX uses). That can show you if a particular system call is failing, and if so, can help to reveal what is going wrong.
I managed to get the AIX system in the compile farm to point me at the problem, which is now fixed in the git repository. It was some code that was calling malloc with a 0 length, which works under Linux, but fails under AIX. The simple patch is here:
Thank you so very much. I do apologize for not getting back to you sooner, as I have been trying to find the right people to point you to within IBM to help. I have pulled the latest "nightly" tar file (rsync-HEAD-20080721-0732GMT.tar.gz), and have successfully compiled and tested it (make test -- 29 passed, 8 skipped, 0 failed!).