RE: Cygwin Rsync 2.5.6 over SSH hangs on Win2k-Win2k

2003-06-30 Thread Tillman, James
Last week, I sent this msg:

 The sleep(1) mod didn't work for me. I had a hung process within an hour 
 (processes run every 5 minutes). I'm going to try applying Anthony
Heading's 
 patch, which was posted earlier this morning (Subject: PATCH/RFC: Another 
 stab at the Cygwin hang problem) to see if it works for me. I've got
nothing 
 to lose at this point!

I just wanted to say that Anthony's patch worked perfectly for me (so far) 
and my current crisis is averted.  I'm closely watching the running system.
I 
want to thank everyone who provided assistance.  

This is yet another example I can use to point out the benefits of open
source 
software to any stalwarts in my organization.  I received real help with my 
problem in less than 6 hours after my original email, and I had rsync
recompiled 
and deployed less than an hour after I decided to use Anthony's patch.
Thanks 
so much.

jpt


James Tillman
Advanced Systems Design
FDLE Webmaster

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: Cygwin Rsync 2.5.6 over SSH hangs on Win2k-Win2k

2003-06-27 Thread Tillman, James


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 1:48 AM
 To: Tillman, James
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: Cygwin Rsync 2.5.6 over SSH hangs on Win2k-Win2k 
 
 

[...]

 While I haven't found the root cause (and I don't know any cygwin
 internals), the following workaround solves the problem for me.
 Replace msleep() wit sleep():
 
 while ( 1 ) {
 sleep(1);
 }
 
 There's something about signals and msleep() that cygwin 
 doesn't grok...
 
 Craig
 

The sleep(1) mod didn't work for me.  I had a hung process within an hour
(processes run every 5 minutes).  I'm going to try applying Anthony
Heading's patch, which was posted earlier this morning (Subject: PATCH/RFC:
Another stab at the Cygwin hang problem) to see if it works for me.  I've
got nothing to lose at this point!

I had been questioning the wisdom of the whole kill/signal usage, myself,
but I'm certainly not experienced enough at this point to have a worthy
opinion in such matters...  There's almost certainly a reason it was done
that way.

jpt
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: Cygwin Rsync 2.5.6 over SSH hangs on Win2k-Win2k

2003-06-26 Thread Tillman, James
 -Original Message-
 From: Tillman, James 
 Sent: Thursday, June 26, 2003 12:18 PM
 To: '[EMAIL PROTECTED]'
 Subject: Cygwin Rsync 2.5.6 over SSH hangs on Win2k-Win2k
 
 
 When using Cygwin Rsync 2.5.6/OpenSSH 3.6.1 for copying files from
 Win2k-Win2k, I get 2 or 3 hung processes on the 
 receiving-side out of about
 every 50 runs.  

I left out a few details that might help:

1. The hung processes come in 2's.  So it's either 2 or 4 or 6, etc.  I read
somewhere about rsync using one process for sending and a second process for
receiving, so perhaps that why the hangs come in pairs.

2. I tried attaching to the processes with strace, but received no output at
all.  It might be that I didn't know what I was doing.  I used this
invocation on each one:

strace -p 123  (where 123 is the process id)

jpt
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Cygwin Rsync 2.5.6 over SSH hangs on Win2k-Win2k

2003-06-26 Thread cbarratt
 When using Cygwin Rsync 2.5.6/OpenSSH 3.6.1 for copying files from
 Win2k-Win2k, I get 2 or 3 hung processes on the receiving-side out of about
 every 50 runs.  These hung processes cause the system to be unable to
 reboot(?!), requiring a hard reset.  Killing the processes allows a graceful
 reboot every time.  I'm currently running both ssh and rsync as services on
 the recieving side.  Originally, I ran them as the SYSTEM user, but that
 prevented easy killing of the processes, so I now run them under an
 administrative account.

This has been reported by a number of users.  Happily(?), it started to
happen to me a week ago so I have been able to poke around and see what
is happening.

At the end of the transfer, on the receiving machine the child goes
into an msleep loop waiting for the parent to kill it with a
USR2 signal.  See line 442 of main.c (rsync 2.5.6):

/* finally we go to sleep until our parent kills us
   with a USR2 signal. We sleep for a short time as on
   some OSes a signal won't interrupt a sleep! */
while (msleep(20))
;

On cygwin the child sometimes hangs at this point.  When this happens,
any cygwin signal fails to kill the child (including kill -9).

While I haven't found the root cause (and I don't know any cygwin
internals), the following workaround solves the problem for me.
Replace msleep() wit sleep():

while ( 1 ) {
sleep(1);
}

There's something about signals and msleep() that cygwin doesn't grok...

Craig
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html