delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/13/07:29:58

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,WEIRD_PORT
X-Spam-Check-By: sourceware.org
Message-ID: <4AFD5133.8090606@cs.umass.edu>
Date: Fri, 13 Nov 2009 07:29:39 -0500
From: Eliot Moss <moss AT cs DOT umass DOT edu>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com, cygwin AT cygwin DOT com
Subject: Re: Problem with rsync 3.0.6-1 [and 3.0.5] under 1.7.0-62 and 63 [and 64]
References: <4AF58831 DOT 3080306 AT cs DOT umass DOT edu> <4AFC2A57 DOT 60909 AT cs DOT umass DOT edu> <20091112154701 DOT GA21323 AT calimero DOT vinschen DOT de> <4AFC3204 DOT 8080505 AT cs DOT umass DOT edu> <4AFC8AF3 DOT 2040009 AT cs DOT umass DOT edu> <20091113115137 DOT GP26238 AT calimero DOT vinschen DOT de>
In-Reply-To: <20091113115137.GP26238@calimero.vinschen.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Corinna Vinschen wrote:
> On Nov 12 17:23, Eliot Moss wrote:
>>    41  320784 [main] a_test 5244 fhandler_socket::dup: here
>>    57  320841 [main] a_test 5244 fhandler_base::dup: in fhandler_base dup
>>    39  320880 [main] a_test 5244 fhandler_base::dup: dup() failed, handle 35C, Win32 error 6
>>    37  320917 [main] a_test 5244 seterrno_from_win_error: /ext/build/netrel/src/cygwin-1.7.0-64/winsup/cygwin/fhandler.cc:1151 windows error 6
>>    41  320958 [main] a_test 5244 geterrno_from_win_error: windows error 6 == errno 9
> 
> Duh!  Of course this is the actual error you see.  DuplicateHandle fails
> with ERROR_INVALID_HANDLE.  The same problem occurs in close(), but on
> the Winsock level where closesocket() returns with error 10038.
> Ultimately this means that every socket handle is not recognized as a
> handle at all in the child process for some unknown reason.
> 
> And why does that happen on some machines only, but not on others?  Is
> that a BLODA problem?  Did you seriously check all possible BLODAs?
> http://cygwin.com/acronyms/#BLODA
> http://cygwin.com/1.7/faq/faq.using.html#faq.using.bloda
> 
> I just searched for this problem via google and it turns out that Cygwin
> isn't the only software having this problem.  The second hit was already
> quite interesting:
> 
> http://www.vadvbbs.com/products/vadv32/support/index.php#What_does_Invalid_Socket_Handle_mean
> 
> Anyway, it would be nice if we could avoid this problem even if a BLODA
> is running.  There are three possible solutions which come to mind and
> which we can test.
> 
> May I send you an URL to an experimental Cygwin DLL via PM?

Sure.

I can also report that the first time I run a_test, a Windows popup happens
asking if I want to allow this program to access the network. I click
"Allow", but it seems not to be allowing.

I wrote a variant of a_test that, before it tries the dups, tries to have
the parent send something to the child, have the child read it, write
it back on the other pipe, and have the parent read it. Since it's
nonlocking I/O, I had to put in retry loops and used sleep(1) in them,
but on garden-flavor Unix it works. On cygwin on my box the parent
writes but the child never gets the data. It's as if Windows has
quarantined it, even though I said "Allow"!

Regards -- Eliot

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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