Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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 CC: Lapo Luchini 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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, 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/