search for: wait_process

Displaying 20 results from an estimated 20 matches for "wait_process".

Did you mean: mail_process
2002 Apr 12
0
Problem with child process exit status.
...s each time the test is run. Using HP C-ANSI-C B.11.11.02. configure line: CFLAGS="-O" ./configure --prefix=/opt/local In tracking this down, this is what I found: In main.c a sigchld_handler is setup that reaps any children processes ignoring any status from the child. There is also a wait_process function in main.c that is used to specifically wait for processes to terminate and return the status thereof. What is happening is the child terminates, the signal handler reaps the child and wait_process gets nothing (eventually) and returns without getting any status. The problem becomes evid...
2002 Sep 01
2
rsync error: unexplained error
...n I'm running 2.5.2 (obtained from the Free Software Foundation) the line number is 576. It appears the root cause is related to a race condition associated with the termination of child processes. If the signal handler for SIGCHILD is executed, as the result of a child termination, before the wait_process procedure is executed, the status of pid (as passed to wait_process) will not be available and the waitpid call in wait_process will fail with an ECHILD error. If however, wait_process executes first, it will successfully obtain the exit status of pid and the sigchld_handler can execute, to elimin...
2004 Feb 13
1
possible bug?
A google search on this problem did not show any matches, so I'll take the chance that someone on this list might consider it an rsync problem. In a nutshell, if rsync forks a child process to handle the transport (rsh in this case) it can hang in wait_process() forever waiting for that child process to die. Normally this would not be a problem. However, if the wrong packet is dropped (and all of its retries) it is a problem. In the particular case that I have been debugging, the TCP FIN packet from the rsh server is not getting received by the rsh...
2005 Sep 23
1
Unexplained error
Hello, I like to use rsync to transfer over mine and other peoples ever changing mail folder onto a remote server. My Server (FreeBSD 5.4) RSYNC Version is: 2.6.6 Protocol Version 29 My Client (OSX 10.4.2) RSYNC Version is: 2.6.3 Protocol Version 28 I use this command rsync -vvv --progress --stats --recursive --times \ --perms --links \ --delete /test/my?email?folder/*
2003 Jan 03
1
[Fwd: Re: rsync windows -> unix still hanging :(]
...r_fd(error_pipe[0]); --- 423,429 ---- close(error_pipe[1]); if (f_in != f_out) close(f_in); ! io_start_buffering_out(f_out); io_set_error_fd(error_pipe[0]); *************** *** 434,440 **** write_int(f_out, -1); } io_flush(); ! kill(pid, SIGUSR2); wait_process(pid, &status); return status; --- 436,442 ---- write_int(f_out, -1); } io_flush(); ! msleep(100); kill(pid, SIGUSR2); wait_process(pid, &status); return status; *************** *** 476,481 **** --- 478,484 ---- } } + io_start...
2007 Feb 01
1
pre-xfer exec fails in FreeBSD
...in rsync for permition checking. In my Linux boxes, it successed. But today, I tried to put them in my FreeBSD box, it failed. I've checked the log, but found the pre-xfer exec returns always be -1, which means waitpid failed to get the return status. After doing a little ugly patch for the wait_process function as follow, pre-xfer works again. --- main.c Thu Feb 1 22:42:23 2007 +++ main.c.orig Sat Oct 14 07:46:32 2006 @@ -103,10 +103,7 @@ * remember_children(), we succeed instead of returning an error. */ pid_t wait_process(pid_t pid, int *status_ptr, int flags) { - pid_t wa...
2002 May 12
1
"Unexplained error code xxx" in rsync-2.5.5
Hi. We sometimes/often get such errors. It occures in main.c/client_run(). I investigated further and found, that the waitpid() in main.c/wait_process() exits with -1, errno = ECHILD, which means "No children". *status can contain garbage in such cases - but not always. It happens under Solaris-2.5.1/SPARC. It (ECHILD) also happens on other Solaris versions - but there *status seems to be always set to/left at 0, so the error slips thro...
2002 Sep 03
2
[patch] for rsync
To Whom It May Concern: Below is a patch, that I have used to eliminate the unexplained errors in the rsync program. I was able to trace the problem to the order in which the sigchld_handler and wait_process routines were executed. If sigchld_handler executes first it retrieves the status that wait_process needs to indicate proper rsync termination. The code below allows the sigchld_handler to save the status of up to 10 child processes and make them available for use by wait_process. I hope I'v...
2002 May 29
3
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
2003 Jun 07
1
patch to rsync to add options for pre- and post-transfer commands
...%s script failed: %s\n", + name, strerror(errno)); + exit(RERR_SCRIPT); + break; + } + + case -1: + rprintf(FERROR,"ERROR: fork for %s script failed: %s\n", + name, strerror(errno)); + return(RERR_SCRIPT); + break; + + default: + status = -1; + wait_process(cmd, &status); + if ( (verbose > 1) || (status != 0) ) { + rprintf(FINFO,"%s script exited with %d status\n", + name, status); + } + } + + return(status); + } + + + static int run_prescript(const struct file_list *flist) + { + extern int module_id; + co...
2001 Sep 05
2
Feedback on 2.4.7pre1
FYI, We've been using the 2.4.7pre1 release for several days now, with nary a hang problem. We haven't seen the EOF bug at all, which was what we upgraded for. This is with transfers of as much as 50GB to set up an initial mirror. The only thing we did was set timeout=0 -- which I guess is unnecessary. The semantics of this flag are a bit unclear. We thought was 'time since
2003 Jan 24
5
Cygwin issues: modify-window and hangs
I had a friend run some Cygwin tests and we found that --modify-window=1 works just as well as --modify-window=2 on FAT filesystems to copy files from Unix and detect the difference in granularity. FAT filesystems always have timestamps that have an even number of seconds. On the other hand, NTFS filesystems can store the modification time down to the second, whereas previously people on this
2003 Jun 27
5
PATCH/RFC: Another stab at the Cygwin hang problem
...! _exit(RERR_PARTIAL); ! } ! _exit(0); } close(recv_pipe[1]); close(error_pipe[1]); + close(cleanup_pipe[0]); if (f_in != f_out) close(f_in); io_start_buffering(f_out); *************** *** 462,469 **** io_flush(); io_set_error_fd(-1); ! kill(pid, SIGUSR2); ! wait_process(pid, &status); return status; } --- 477,487 ---- io_flush(); io_set_error_fd(-1); ! write(cleanup_pipe[1], ".", 1); ! if (waitpid(pid, &status, 0) != pid) { ! rprintf(FERROR,"cleanup in do_recv failed\n"); ! exit_cleanup(RERR_SOCKETIO); ! } ret...
2002 May 24
1
Rsync hanging
Trying to figure out this problem. RSYNC maybe once a day or so will just hang and sit there... strace attached to the process produces the following... I wonder where the loop is. Anything I can do to help would be fabulous. Most of the time it works fine. Very strange. -- Mike gettimeofday({1022283618, 513186}, NULL) = 0 wait4(22167, 0xbffff9e8, WNOHANG, NULL) = 0 gettimeofday({1022283618,
2009 Jun 11
0
rsync occassionally issues the message "rsync error: unexplained error (code 255) at main.c(1506) [generator=3.0.4]"
...de = exit_code; /* If this is the exit at the end of the run, the server side * should not attempt to output a message (see log.c). */ if (am_server && code == 0) @@ -127,11 +127,11 @@ if (cleanup_child_pid != -1) { int status; int pid = wait_process(cleanup_child_pid, &status, WNOHANG); if (pid == cleanup_child_pid) { status = WEXITSTATUS(status); - if (status > code) + if (status > code && status != 255) code = exit_code = status; }...
2003 Nov 17
0
[PATCH] --source-filter && --dest-filter for rsync 2.5.6
...cleanup_disable(); @@ -448,16 +469,34 @@ log_transfer(file, fname); } + if (dest_filter) { + pid = run_filter(filter_argv, fd2, &fd2); + } + /* recv file data */ recv_ok = receive_data(f_in,buf,fd2,fname,file->length); + if (dest_filter) { + close(fd2); + wait_process(pid, &status); + if (status != 0) { + rprintf(FERROR,"filter %s exited code: %d\n", + dest_filter, status); + if (buf) unmap_file(buf); + if (fd1 != -1) close(fd1); + continue; + } + } + log_recv(file, &initial_stats); if (buf) unmap_file(buf); if...
2003 Jan 10
5
working on a 2.5.6pre1 release
I'm working on trying to get rsync 2.5.6pre1 available for people to test more widely. I'm out of time for today, and I'm stuck on a problem that some machines on build.samba.org are showing on the 'chgrp' test. I can reproduce this on my home redhat 7.3 system too. It appears to be a timing problem because when I do strace -F -f on it the problem goes away. Everything seems
2002 Apr 03
3
metadata in dryrun mode
As I reported a while back rsync doesn't handle metadata (permissions and ownership) in dryrun mode. I offered to make a patch and that offer still stands. I didn't have the time for it until now and want to pick it up again. I had some ugly hack back then but I want to redo it in a clean way. I would like some input on my thoughts. IMHO, it would be ideally if the check for dry_run
2002 Dec 09
2
Rsync performance increase through buffering
...rprintf(FINFO,"file list sent\n"); + io_flush(); + io_start_buffering_out(f_out); send_files(flist,f_out,f_in); + io_flush(); if (remote_version >= 24) { /* final goodbye message */ read_int(f_in); @@ -590,6 +597,7 @@ wait_process(pid, &status); } report(-1); + io_flush(); exit_cleanup(status); } diff -bur rsync/progress.c rsync-craig/progress.c --- rsync/progress.c Sun Apr 7 22:28:57 2002 +++ rsync-craig/progress.c Sat Dec 7 18:57:19 2002 @@ -97,6 +97,8 @@ extern int do_progress, am_server; st...
2002 Aug 05
5
[patch] read-devices
...n); +void map_ptr(struct map_struct *map,OFF_T offset,int len); //#ET# void unmap_file(struct map_struct *map); void show_flist_stats(void); int readlink_stat(const char *Path, STRUCT_STAT * Buffer, char *Linkbuf); int link_stat(const char *Path, STRUCT_STAT * Buffer); @@ -164,9 +164,9 @@ void wait_process(pid_t pid, int *status); void start_server(int f_in, int f_out, int argc, char *argv[]); int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]); int main(int argc,char *argv[]); -void match_sums(int f,struct sum_struct *s,struct map_struct *buf,OFF_T len); +void match_sums(int f,...