From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#49449: 28: TLS connection never gets to "open" stage Date: Sat, 10 Jul 2021 18:57:45 +0200 Message-ID: <875yxinm2e.fsf@gnus.org> References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21832"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 49449@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 10 18:58:25 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2GJ6-0005Rz-0F for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Jul 2021 18:58:24 +0200 Original-Received: from localhost ([::1]:53766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2GJ5-0005Kj-2i for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Jul 2021 12:58:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2GIk-0005Ka-NL for bug-gnu-emacs@gnu.org; Sat, 10 Jul 2021 12:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50034) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2GIk-0008MY-G9 for bug-gnu-emacs@gnu.org; Sat, 10 Jul 2021 12:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2GIk-00021g-ER for bug-gnu-emacs@gnu.org; Sat, 10 Jul 2021 12:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Jul 2021 16:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49449 X-GNU-PR-Package: emacs Original-Received: via spool by 49449-submit@debbugs.gnu.org id=B49449.16259362767776 (code B ref 49449); Sat, 10 Jul 2021 16:58:02 +0000 Original-Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 16:57:56 +0000 Original-Received: from localhost ([127.0.0.1]:33347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2GId-00021M-QF for submit@debbugs.gnu.org; Sat, 10 Jul 2021 12:57:55 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:57250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2GIc-000219-1V for 49449@debbugs.gnu.org; Sat, 10 Jul 2021 12:57:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ofHHVdz6HnisScbprdUxjdJpRij8CchabpoY6BqsUjI=; b=NixUmfF9SCp2qy5nd6GduVv5X1 ETULpFIKgkgi650Z8177MBfPMHPcNVpLGOMAE4HgD6jixF/9cNVq+tZib/GZEzp2wvyrGRa+mZ175 zWFnrgxnrhlD24a8fv1bpTgTYVcdk+1fAt/83ESdtbhvdTnMND1sjzoKuBUE4IU2r2Zs=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2GIT-0005uh-Iz; Sat, 10 Jul 2021 18:57:48 +0200 X-Now-Playing: Suzanne Vega's _Suzanne Vega_: "Undertow" In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Sat, 10 Jul 2021 18:51:08 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209756 Archived-At: Mattias Engdeg=C3=A5rd writes: > 10 juli 2021 kl. 18.27 skrev Lars Ingebrigtsen : > >> Hm... does reverting 234bf1b6363a3d5db8e73c422d87a0bf1aa4b2e3 help any >> here? > > No, sorry. (Was worth a shot, though!) Darn! Well, back to your patch: - while ((ret =3D gnutls_handshake (state)) < 0) + if (non_blocking && proc->gnutls_handshakes_tried < 1) { - if (emacs_gnutls_handle_error (state, ret) =3D=3D 0) /* fatal */ - break; + /* HACK: don't succeed the first time for nonblocking connections, + because the logic doesn't allow it (bug#49449). */ + ret =3D GNUTLS_E_AGAIN; I'm not super enthusiastic about this -- it'll artificially make connections slower? The problem only seems to occur on Macos, so it'd be interesting to find out why it doesn't happen on Linux... --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no