From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32658: gnutls + non-blocking url-retrieve Date: Mon, 01 Oct 2018 09:03:04 +0300 Message-ID: <83efda431j.fsf@gnu.org> References: <861sa5zmpt.fsf@DESKTOP-DQBDJ0U.i-did-not-set--mail-host-address--so-tickle-me> <86tvm6smax.fsf@DESKTOP-DQBDJ0U.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1538373726 6928 195.159.176.226 (1 Oct 2018 06:02:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 Oct 2018 06:02:06 +0000 (UTC) Cc: 32658@debbugs.gnu.org To: thomas@m3y3r.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 01 08:02:01 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6rHM-0001gF-M2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Oct 2018 08:02:00 +0200 Original-Received: from localhost ([::1]:59531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rJT-0008Pu-6M for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Oct 2018 02:04:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rJN-0008Pn-RD for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2018 02:04:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rJK-0001aJ-Kx for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2018 02:04:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56288) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6rJK-0001aB-Gl for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2018 02:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g6rJK-00023g-Ap for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2018 02:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Oct 2018 06:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32658 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32658-submit@debbugs.gnu.org id=B32658.15383738057868 (code B ref 32658); Mon, 01 Oct 2018 06:04:02 +0000 Original-Received: (at 32658) by debbugs.gnu.org; 1 Oct 2018 06:03:25 +0000 Original-Received: from localhost ([127.0.0.1]:60546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6rIi-00022q-U4 for submit@debbugs.gnu.org; Mon, 01 Oct 2018 02:03:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6rIg-00022e-Tm for 32658@debbugs.gnu.org; Mon, 01 Oct 2018 02:03:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rIY-0000nF-Gr for 32658@debbugs.gnu.org; Mon, 01 Oct 2018 02:03:17 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rIY-0000n7-Cd; Mon, 01 Oct 2018 02:03:14 -0400 Original-Received: from [176.228.60.248] (port=3673 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g6rIW-0002sZ-J2; Mon, 01 Oct 2018 02:03:14 -0400 In-reply-to: <86tvm6smax.fsf@DESKTOP-DQBDJ0U.i-did-not-set--mail-host-address--so-tickle-me> (thomas@m3y3r.de) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:150849 Archived-At: > From: thomas@m3y3r.de > Date: Sun, 30 Sep 2018 23:33:10 +0200 > > 1.) I needed to revert to gnutls 3.5.19, the mingw64 build from the > gitlab ci build seems to have a working gnutls-cli tools on windows 10. > the gitlab builds for 3.6.3 and 3.6.4 seems to have another bug > (error code -53) in the gnutls-cli command. > > so only gnutls 3.5.19 have a working gnutls-cli. i installed this version in emacs 26.1 > > 2.) testing gnutls stream > using open-gnutls-stream directly gives me a correct tls connection but > eww still fails to load the site. > > when I change url-open-stream in url/url-gw.el to: > (open-network-stream > name buffer host service > :type gw-method > ;; Use non-blocking socket if we can. > :nowait nil)) > > I finally can open lwn.net in eww. > > so something seems to be wrong possible with blocking/non-blocking > network access. > > any ideas? Thanks for the info. First, I don't understand what does gnutls-cli have to do with this. Emacs on Windows doesn't support TLS connections that use gnutls-cli, because the way that works, it requires working support for signals, which cannot happen on Windows. Are you saying that these problems happen when you use gnutls-cli? If so, please move to the built-in GnuTLS support, because connections using gnutls-cli are deprecated, and I see no point in trying to support them on Windows. Second, I cannot reproduce the problem you are reporting. Using stock Emacs 26.1 I built myself, with GnuTLS 3.4.15, I have no problems connecting to lwn.net via eww. I see EAGAIN errors like you do, but they are non-fatal, so don't prevent the connection from continuing. It is strange that you are having these problems, but maybe these problems are specific to GnuTLS 3.6.x? 3.6.x is not a stable branch of GnuTLS, it could have bugs, in particular bugs specific to Windows. It is also possible that there are incompatibilities between GnuTLS 3.6.x and whatever version the Emacs binary you are using was built against. In this message you say that you downgraded to GnuTLS 3.5.19, but you didn't show the gnutls.c log for that version -- does it mean you see an identical problem with EAGAIN there? Is it possible for you to downgrade GnuTLS to some version of the 3.4.x branch, and see if the problem persists? Also, does this happen in "emacs -Q"? Or maybe this is specific to your network connection? Does any HTTPS connection cause these problems? Finally, what about other machines and/or Windows versions other than 10 -- do you have the same problem there with this Emacs version (assuming you can test that)? Bottom line: I'm surprised that you have these problems, because I see none of that on my machines -- TLS connections "just work" for me, without any need to tinker with url-gw.el or elsewhere. And judging by lack of similar bug reports, this also works for others. So I wonder what causes this in your case.