[Gllug] Requesting a graceful halt for a sleeping package

Philip Hands phil at hands.com
Fri Oct 15 10:28:12 UTC 2010


On Fri, 15 Oct 2010 07:36:04 +0000 (GMT), Chris Bell <chrisbell at chrisbell.org.uk> wrote:
...
>    I normally run ftpsync from crontab, and it usually completes OK. When it
> does hang, the log file usually shows that the rsync has been run but the
> sequence stops at the check "receiving file list". If I then try to run
> ftpsync manually it will report that it is already running and shows a PID.
> If I kill that PID the ftpsync appears to stop dead without cleaning up, and
> will not re-start even if I attempt to clean up manually.
>    Any suggestions please?

It sounds like it's actually rsync that's locking up, in which case you
should be killing that, rather than the script.

Running pstree (possibly with the -p option) should show you the process
that ftpsync has spawned.  You could then have a look at what it's doing
with:  strace -p <PID_of_rsync>

chances are, it's waiting uselessly.

The problem would seem likely to be that you have no keepalive/timeout
on the underlying TCP connection, which is odd, because the default
version of ftpsync I have sets --timeout 3600 by default.

Cheers, Phil.
-- 
|)|  Philip Hands [+44 (0)20 8530 9560]    http://www.hands.com/
|-|  HANDS.COM Ltd.                    http://www.uk.debian.org/
|(|  10 Onslow Gardens, South Woodford, London  E18 1NE  ENGLAND
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20101015/3aa841df/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list