From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#22789: 25.1.50; In last master build https connections stop working Date: Sun, 28 Feb 2016 14:01:19 +1030 Message-ID: <87bn71zf20.fsf@gnus.org> References: <864mcyo14y.fsf@Lenovo-PC.i-did-not-set--mail-host-address--so-tickle-me> <87d1rmxl65.fsf@gnus.org> <86povm6qeu.wl-j_l_domenech@yahoo.com> <83k2lugeym.fsf@gnu.org> <871t81wtyt.fsf@gnus.org> <87r3g1veqc.fsf@gnus.org> <86si0euizj.fsf@realize.ch> <871t7xhj7t.fsf@gnus.org> <86oab1vjm9.fsf@realize.ch> <86d1rhpvcq.fsf@realize.ch> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456630341 11781 80.91.229.3 (28 Feb 2016 03:32:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Feb 2016 03:32:21 +0000 (UTC) Cc: "=?UTF-8?Q?Jos=C3=A9?= L. =?UTF-8?Q?Dom=C3=A9nech?=" , 22789@debbugs.gnu.org To: Alain Schneble Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 28 04:32:10 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aZs5a-00060r-5W for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Feb 2016 04:32:10 +0100 Original-Received: from localhost ([::1]:57272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZs5Z-0000qi-7D for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Feb 2016 22:32:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZs5W-0000qb-0q for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 22:32:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZs5S-0006Nh-QN for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 22:32:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZs5S-0006NL-MG for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 22:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aZs5S-0000yc-FW for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 22:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Feb 2016 03:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22789-submit@debbugs.gnu.org id=B22789.14566303123736 (code B ref 22789); Sun, 28 Feb 2016 03:32:02 +0000 Original-Received: (at 22789) by debbugs.gnu.org; 28 Feb 2016 03:31:52 +0000 Original-Received: from localhost ([127.0.0.1]:49251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZs5H-0000yB-Nj for submit@debbugs.gnu.org; Sat, 27 Feb 2016 22:31:51 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:50895) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZs5F-0000y1-L2 for 22789@debbugs.gnu.org; Sat, 27 Feb 2016 22:31:50 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aZs4q-0006py-1N; Sun, 28 Feb 2016 04:31:24 +0100 In-Reply-To: <86d1rhpvcq.fsf@realize.ch> (Alain Schneble's message of "Sun, 28 Feb 2016 00:49:25 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aZs4q-0006py-1N MailScanner-NULL-Check: 1457235084.95896@LjnnPvxDffMMryexAjg7VA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113996 Archived-At: Alain Schneble writes: > Here we go. I think we are getting closer to the root cause of the > problem. In w32.c (sys_write), it runs into the following error: > > if (nchars == SOCKET_ERROR) > { > DebPrint (("sys_write.send failed with error %d on socket %ld\n", > pfn_WSAGetLastError (), SOCK_HANDLE (fd))); > set_errno (); > } > > Strange thing: set_errno returns with errno == 0. This because > pfn_WSAGetLastError returns 0 as well. > > Now, if I do... > > if (errno == 0) > errno = EAGAIN; > > ...just after the call to set_errno above, guess what: It seems to work! Aha! Good sleuthing. :-) > At least for me, it will be an exercise for tomorrow to find the reason > why pfn_WSAGetLastError returns 0 in this case. *snore* > > Do you agree it shouldn't return 0? Yes. That would make more sense. Both I don't think that code path (sys_write) has ever been called before on a nonblocking socket. (Because we've always opened the sockets before without O_NONBLOCK, since we've never called `make-network-process' with :nowait t before from `open-gnutls-stream'.) So ... is it possible that these functions that w32.c calls just don't... quite work with nonblocking sockets? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no