From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by sourceware.org (Postfix) with ESMTPS id 7B2C93858D37 for ; Tue, 30 Jun 2020 16:54:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7B2C93858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=corinna-cygwin@cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mbj7g-1jFaaf05lO-00dFWM for ; Tue, 30 Jun 2020 18:53:59 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 355F2A8089D; Tue, 30 Jun 2020 18:53:58 +0200 (CEST) Date: Tue, 30 Jun 2020 18:53:58 +0200 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: TCP_KEEPINVTL and TCP_KEEPIDLE - Socket Keep Alives not working Message-ID: <20200630165358.GG3499@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20200630111215.GE3499@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Provags-ID: V03:K1:K/ZEo2ygknpX/9xZ+4aOIBqetnIQ3IK2SndDtNAUqCJYSez54Va xaOqOZ2ZAyV334ztuG39wLovD5wOWFz16kzls7IwTPddsdxNnDYnoveT4psok2aJfv2RAiq 2RomLuL4kfFUOMWnx71zpjwk1N4ccdH1DJDymuHaeyCU/jeJG/hLB6mAa8C5BGHNnGsRKN6 WS8GYUhnW8u6/bTa6Zqpw== X-UI-Out-Filterresults: notjunk:1;V03:K0:xU9tWATvPqg=:+Pc71rDMwOVgakDKqShVvS XXzHAtiIZzBpmn45c9uE9mQlzdtZ7YNFQaF0Wpb2RMPW3g1TjCPnJSYPU3WzOnqDWYuBcSGsU 8YN/LrQZCVaRtWAKTYPJUH8vIKMPdQxKbdpmvic28zVIZCCIx8duoUwPAFYT/to4gIOuzVH4q fvSYGUCsZwvbfpsx5i3h57V+5sVYeDwBRQ4dAKFP4sG+lR0UnSXlKbBAkCJYjPWZH2SXTEckF 5JIGLO+6SQqBB8kTepGBklBJtVw43jp61SDVtnyNwJm5a6p4py6FbehYbOmnbWwULkn87qEzF PmOqjsXjEvXZ3r+o4qAcpCSm4lXs+RI16tqWnM3aKEiqGQUt8CjxilNLzT9MJxFt1pNJ94uqR lYjMA9WK6bj6KO6uYPT/C8A9/ET4hQbDczWAfmx0+EhXw40QZa+XSuEr4d3XvZkiy8ZwayP8H zIzVO7f7xyK0EdGbXkEP5bODfjzoHh3g8/E0J2hbgaJYtESbaUyi0z3DVkd1nXY0C0LDZOXLw SxC0Ig68jeI+B2R98l0UjjMArU8O16qyBu0vB/pUqr83HG6cdQtjUidWihT1UEG+L0z3T0hc2 LVwkiqzDK0E2ItXV7BJkZauA4a5qDCKCYt3wzXxCezCP8sP3XhMofrVhFymQQpY3af9MNkd+H Jhq1I3ZMSfyEwgj38h4xi9TC1GKlq/0QOs185+eO3k+PeI+3lNf7BuCPyCB8mwU/prU2QOm5C HAl+x0YQ2CtQytl/Xv515GBsV3NtBiQQ5RBYej3/dv07iHvrk9WrYiRWCdGaOoWzXbVpY0rPF YNrWlCwb1CwnTG8pxwIoiWIR+xNeCWqFr0f+7ryzyVeqmlj5c4rE6j8HK+ZBF/g96zxAwr7ds PKePUtHscDeTWFMo8jYQ== X-Spam-Status: No, score=-99.3 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 16:54:01 -0000 On Jun 30 09:46, Cary Lewis via Cygwin wrote: > Thanks for the reply. The answer to your question is that the 2 hour keep > alive was not sufficient for a particular use case I encountered. > > I was trying to use curl under cygwin to access a very slow REST endpoint > that was taking up to 8 minutes to generate download before any data flowed > back to the client. This caused the server to abort the socket. > > Accessing the endpoint in chrome or firefox revealed that they set a > keepalive to 45 seconds, which kept the server happy. > > Attempting to set --keepalive-time=45 in cygwin's curl didn't work, and > wireshark revealed that no keepalives were being sent. > > I will attempt to patch cygwin, I got the build to work. Can you point me > in the right direction, in terms of where the socket calls get mapped to > the winsock calls? Actually, while I'm usually happy to take contributions, you don't have to dig into that yourself. I already have a few local patches in the loop changing some of the affected code. I have a good idea what's required to add the keep-alive socket options to that code, so just lay back and stay tuned for now. > On a separate note, what are your thoughts on the new windows WSL2 release? > Do you think this will have long term implications for cygwin? Same as WSL, I guess ¯\_(ツ)_/¯ Corinna -- Corinna Vinschen Cygwin Maintainer