Subject: re: Random Rsync 2.5.5-1 hang using Cron 3.0.1-7
From: Sean Brannon <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Thu, 15 Aug 2002 18:42:01 -0700

I'm having much the same problem. The major difference is that it doesn't 
matter if the job is executed from cron or the shell, both will result in 
hangs with a very high frequency.

 >Hi,
 >
 >I'm running Cygwin 1.3.12 (and a few previous) and I keep encountering an
 >Rsync hang. I have a small rsync script (see below) that does backups of my
 >HD to an external HD. On occasion, usually when I have an IDE open, rsync
 >will hang when run as a cron job.
 >
 >I did some searching through the mailing list archives and found there were
 >a few patches that went into the Rsync 2.4.x releases for this style of
 >issue, but nothing relating to cron, and no issues since the patch went into
 >rsync 2.5.x. Nothing in the documentation seems to indicate any issues or
 >requirements for what I'm doing (it doesn't look like I need an rsync server
 >to do a local copy).
 >
 >The problem seems to only occur when the job is run through Cron, running it
 >via the shell will work fine. Once hung there will be two Rsync processes
 >(see excerpt below) and the sh and tcsh spawned by Cron. All but one of
 >these will be kill -9'able. The other can be closed via the windows task
 >manager.
 >
 >The log that the process generates shows no errors (exceprt below) and shows
 >what seems to be a complete run of rsync just before output is given.
 >
 >I'm at a loss at what else this could be. I've tried the script in tcsh and
 >bash, both in the script and as specified in cron.
 >
 >Thanks in advance,
 >-Al
 >
 >---------------------------------excerpts
 >follow ----------------------------------
 >
 >// -------------------------- DLL Version
 >1.3.12-cygwin-1-3-12-1
 >
 >// -------------------------- Tools Versions
 >cron                3.0.1-7
 >rsync               2.5.5-1
 >
 >
 >//------------------------------- Log excerpt
 >$ tail logs/Thursday_AM_backup.log
 >Projects/carspecs/SQL Work/NSCYV_1-2.EXE
 >Projects/carspecs/SQL Work/SSCJ_CS2002_TextFiles_UTF8.exe
 >Projects/carspecs/SQL Work/SSCUSA_CS2002_TEXTFILES.EXE
 >Projects/carspecs/SQL Work/SSCUSA_CS2002_TextFiles_UTF8.exe
 >Projects/carspecs/SQL Work/SbF - SQLs.txt is uptodate
 >Projects/carspecs/Sources/MultiCountryTestApp/Form1.frm is uptodate
 >Projects/carspecs/Sources/MultiCountryTestApp/MSSCCPRJ.SCC is uptodate
 >Projects/carspecs/Sources/MultiCountryTestApp/Project1.vbp is uptodate
 >Projects/carspecs/Sources/MultiCountryTestApp/Project1.vbw is uptodate
 >total: matches=0  tag_hits=0  false_alarms=0 data=133019599
 >
 >//------------------------------ Script
 >#!/usr/bin/tcsh
 >
 ># Parameters
 >set backupdirs = "$HOME /d/Projects"
 >set logFile = "$HOME/logs/`date "+%A_%p_backup.log"`"
 >set excludes = "$HOME/backups/excludes.rsync"
 >
 ># Start time
 >date > $logFile
 >
 ># Do the backups
 >foreach dir ($backupdirs)
 >        rsync -av -v --delete --exclude-from=$excludes $dir
 >/g/backups/`date '+%
 >A'` >>& $logFile
 >end
 >
 ># End Time
 >date >> $logFile
 >
 >
 >// --------------------------------- Processes once hang has occured
 >$ ps
 >      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
 >      208       1     208        208  con 1004 07:30:05 /usr/bin/tcsh
 >     1640    2776    1640       3656    ? 1004 11:45:01 /usr/bin/sh
 >     3644    1640    1640       3644    ? 1004 11:45:01 /usr/bin/tcsh
 >     3964    3644    1640       3372    ? 1004 11:45:07 /usr/bin/rsync
 >     2668    3964    1640       2668    ? 1004 11:45:07 /usr/bin/rsync
 >     1164     208    1164       2368  con 1004 12:50:31 /usr/bin/ps
 >$
 >
 >
 >// ------------------------------ Crontab -l
 ># DO NOT EDIT THIS FILE - edit the master and reinstall.
 ># (/tmp/crontab.580 installed on Wed Aug  7 16:41:33 2002)
 ># (Cron version -- $Id: crontab.c,v 1.6 2001/09/19 17:09:55 corinna Exp $)
 ># Defaults
 >MAILTO=[email-masked]
 >
 >#Testing
 >#37 16 * * * $HOME/backups/nightlyBackups
 >
 ># Backups
 >45 11,15 * * * $HOME/backups/nightlyBackups

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/