From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dmta1004.nifty.com (mta-snd01014.nifty.com [106.153.227.46]) by sourceware.org (Postfix) with ESMTPS id CC19A385735A for ; Wed, 23 Aug 2023 21:05:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC19A385735A Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from HP-Z230 by dmta1004.nifty.com with ESMTP id <20230823210502635.SIWD.19103.HP-Z230@nifty.com> for ; Thu, 24 Aug 2023 06:05:02 +0900 Date: Thu, 24 Aug 2023 06:05:02 +0900 From: Takashi Yano To: cygwin@cygwin.com Subject: scp stalls on uploading in cygwin 3.5 current master. Message-Id: <20230824060502.c4798062cb19d4d35a5633ae@nifty.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Corinna, After the commit dedbbd74d0a8, "scp file server:." stalls. I confirmed this when the "server" is a Linux machine. The problem does not occur if it is reverted. Could you please have a look? commit dedbbd74d0a8f3b7dfae6188321703a47bb8a2b3 Author: Corinna Vinschen Date: Tue Aug 1 14:22:55 2023 +0200 Cygwin: select: workaround FD_WRITE network event handling The FD_WRITE event is a false friend. It indicates ready to write even if the next send fails with WSAEWOULDBLOCK. *After* the fact, FD_WRITE will be cleared until sending is again possible, but that is too late for a select/write loop. Workaround that by using the WinSock select function when peeking at a socket and FD_WRITE gets indicated. WinSock select fortunately indicates writability correctly. Fixes: 70e476d27be8 ("(peek_socket): Use event handling for peeking socket.") Signed-off-by: Corinna Vinschen -- Takashi Yano