Charles F. Fisher
2002-May-29 10:28 UTC
rsync 2.5.5, HPUX, getting unexplained error at main.c(578)
I compiled rsync-2.5.5 on HPUX 11.11, using the +DA2.0W and +O3 options. invoking a simple rsync to transfer a file works (I ran a diff on the file, no changes) e.g: sdx1 214: ./rsync --rsh='/usr/bin/ssh -x' --rsync-path=/usr/local/src/rsync-2.5.5/rsync /scratch/chuck/tmp.test sdx2:/scratch/chuck However, adding the -a option yields an unexplained error: (In all of the following cases the file is transferred successfully; the problem was originally noted transferring a directory, but the examples were simplified since a single file transfer will also show the problem.) sdx1 213: ./rsync --rsh='/usr/bin/ssh -x' --rsync-path=/usr/local/src/rsync-2.5.5/rsync -a /scratch/chuck/tmp.test sdx2:/scratch/chuck rsync error: unexplained error (code 48) at main.c(578) I removed the file from the target machine and tried again - it gives a different unexplained error at the same location: sdx1 215: !213 ./rsync --rsh='/usr/bin/ssh -x' --rsync-path=/usr/local/src/rsync-2.5.5/rsync -a /scratch/chuck/tmp.test sdx2:/scratch/chuck rsync error: unexplained error (code 151) at main.c(578) Transferring the file back by specifying the remote machine as the source works without getting an error: sdx1 216: ./rsync --rsh='/usr/bin/ssh -x' --rsync-path=/usr/local/src/rsync-2.5.5/rsync -a sdx2:/scratch/chuck/tmp.test /scratch/chuck/tmp.testa Any suggestions about what the problem could be and how to fix it?
Allen D. Winter
2002-May-29 14:51 UTC
rsync 2.5.5, HPUX, getting unexplained error at main.c(578)
Once upon a time I threw printfs all over the source looking to track down the cause of this problem. Seemingly a random error code is generated each time rsync is run *succesfully* on HPUX. I finally found that in the wait_process() function in main.c, the status value returned from WEXITSTATUS() was apparently returning the pid of the child instead of the exit status of the child... or something like that. I've learned to ignore the error codes and live with it. Love to see this fixed. On Wednesday 29 May 2002 01:24 pm, Charles F. Fisher wrote:> I compiled rsync-2.5.5 on HPUX 11.11, using the +DA2.0W and +O3 options. > > invoking a simple rsync to transfer a file works (I ran a diff on the file, > no changes) e.g: > > sdx1 214: ./rsync --rsh='/usr/bin/ssh -x' > --rsync-path=/usr/local/src/rsync-2.5.5/rsync /scratch/chuck/tmp.test > sdx2:/scratch/chuck > > However, adding the -a option yields an unexplained error: > (In all of the following cases the file is transferred successfully; the > problem was originally noted transferring a directory, but the examples > were simplified since a single file transfer will also show the problem.) > > sdx1 213: ./rsync --rsh='/usr/bin/ssh -x' > --rsync-path=/usr/local/src/rsync-2.5.5/rsync -a /scratch/chuck/tmp.test > sdx2:/scratch/chuck rsync error: unexplained error (code 48) at main.c(578) > > I removed the file from the target machine and tried again - it gives a > different unexplained error at the same location: > > sdx1 215: !213 > ./rsync --rsh='/usr/bin/ssh -x' > --rsync-path=/usr/local/src/rsync-2.5.5/rsync -a /scratch/chuck/tmp.test > sdx2:/scratch/chuck rsync error: unexplained error (code 151) at > main.c(578) > > Transferring the file back by specifying the remote machine as the source > works without getting an error: > > sdx1 216: ./rsync --rsh='/usr/bin/ssh -x' > --rsync-path=/usr/local/src/rsync-2.5.5/rsync -a > sdx2:/scratch/chuck/tmp.test /scratch/chuck/tmp.testa > > > Any suggestions about what the problem could be and how to fix it?
Steve Bonds
2002-Aug-21 15:38 UTC
rsync 2.5.5, HPUX, getting unexplained error at main.c(578)
I've seen this error on HP-UX systems as well. I spent a couple hours picking through the source trying to track it down, but so far no luck. What I have discovered: + It's still broken as of last night's CVS version + It only seems to happen when sending files from an HP-UX system (receiving files on HP-UX works OK) + The remote system can be either HP-UX or Linux (and probably others), which suggests that it's a sender-side issue + It only happens when using the "--owner" or "--group" options (both implied by "-a" or "--archive") + It does happen when using those options as a non-root user (when their action would normally be ignored). It also happens when sending the files to root on the destination. + The return status of the wait_process() call appears to be normal (i.e. not obviously mangled), but is nonzero. The actual value seems to be random. I plan to look at this more, but hopefully this info might help someone else track down this elusive HP-UX problem. -- Steve Bonds
Jim_Donovan@Playstation.sony.com
2002-Aug-27 07:40 UTC
rsync 2.5.5, HPUX, getting unexplained error at main.c(578)
I've determined what seems to be a work-around for this unexplained error. I'm not a programmer, so I don't know for sure why it works, but adding a call to msleep() for 200 ms in the following sections of main.c "fixes" things. Hopefully, someone with more knowledge of this program can tell me why, and perhaps come up with a more elegant fix. diff -c main.c.old main.c *** main.c.old Tue Aug 27 09:25:46 2002 --- main.c Tue Aug 27 09:30:29 2002 *************** *** 572,577 **** --- 572,578 ---- if (verbose > 3) rprintf(FINFO,"client_run waiting on %d\n", (int) pid); io_flush(); + msleep(200); wait_process(pid, &status); } report(-1); *************** *** 602,607 **** --- 603,609 ---- if (verbose > 3) rprintf(FINFO,"client_run2 waiting on %d\n", (int) pid); io_flush(); + msleep(200); wait_process(pid, &status); } Jim Donovan Systems Engineer Sony Computer Entertainment America 650-655-5979