delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/02/10:18:22

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3B6960FA.8099DD72@hplb.hpl.hp.com>
Date: Thu, 02 Aug 2001 15:17:30 +0100
From: Bill Petheram <bilpet AT hplb DOT hpl DOT hp DOT com>
Organization: TESL, HP Labs Bristol
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.3-20mdksmp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Corinna Vinschen <cygwin AT cygwin DOT com>
CC: Lapo Luchini <lapo AT lapo DOT it>
Subject: Re: rsync
References: <610A1F4808E9D411888F0001023F6361A2EC AT MUCX> <3B46E116 DOT 20508 DOT C8E5ACB AT localhost> <20010707095422 DOT C7298 AT redhat DOT com> <3B499BF7 DOT 6D8FCABC AT hplb DOT hpl DOT hp DOT com> <20010709222226 DOT A16128 AT cygbert DOT vinschen DOT de>

To recap:

I am using rsync to copt a file from a remote linux box to a W2K box.

The linux box outputs the followin error: unexpected EOF in read_timeout
This is caused by select returning and a read of 0 bytes in rsync. The
socket is then closed and the W2K end gets a read error: Connection
reset by peer. 

The interesting part from the strace is as follows:
 2253 6092532 [main] rsh 280 _read: res 1 0
  714 6093246 [main] rsh 280 fhandler_socket::read: fhandler_read:
socket 376 len 1024
 1338 6094584 [main] rsh 280 fhandler_socket::read: fhandler_read: res 0
 1462 6096046 [main] rsh 280 _read: res 0
 1425 6097471 [main] rsh 280 _read: 0 = read (3</dev/tcp>, 0x240FA14,
1024), bin 4096, errno 0
 1298 6098769 [main] rsh 280 _kill: kill (1340, 9)
 1112 6099881 [main] rsh 280 sig_send: invalid pid 1340(2), signal 9
  326 6100207 [main] rsh 280 sig_send: returning 1 from sending signal 9
 2034 6102241 [main] rsh 280 kill_worker: 1 = sig_send, Win32 error 0
 2058 6104299 [main] rsh 280 kill_worker: -1 = kill_worker (1340, 9)
 1320 6105619 [main] rsh 280 do_exit: do_exit (0)

The question for me is how can I get a _kill immediately after _read?

What I think happens is rsh exits closing the socket which seems to
cause the remote end to return from select. This then seems to cause the
failure I experience. Though the socket should remain open becuase the
local rsync will have it open.

Where should I look now for more information?

thanks

bill


Corinna Vinschen wrote:
> 
> On Mon, Jul 09, 2001 at 12:56:39PM +0100, Bill Petheram wrote:
> > I can't get rsync to work on W2K except in daemon mode. I tried to debug
> > it with gdb but rsync exits on the first write statement. This means
> > that I cannot step through the program.
> 
> Did you try an strace? It can be pretty helpful, at least to see
> at which point in Cygwin the error occurs. Did you call gdb in
> default GUI mode or in non-GUI? Mostly the non-GUI version (started
> by calling gdb -nw) is a bit easier to control, especially if you're
> working with more than one partition since the GUI version only
> works with native paths.
> 
> > If I build cygwin from source would I be able to see where the write was
> > failing?
> 
> Sure. You can build with CFLAGS=-g instead of using the default of
> CFLAGS=-O2. That results in a easier source code level debugging.
> When you're running that dll (which is approx. 4MB in size) you can
> start rsync again under gdb control. In gdb you can load the DLL's
> symbol table by calling `dll cygwin1.dll'. Set a breakpoint on rsync's
> main() function and after running up to that point you can set
> breakpoints to Cygwin's internal functions.
> 
> Lapo, are you already investigating into that problem as well? Since
> you did the base port you have a clue what's going on, perhaps.
> 
> Corinna
> 
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Developer                                mailto:cygwin AT cygwin DOT com
> Red Hat, Inc.

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019