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: Wed, 07 Jul 2021 21:57:23 +0200 Message-ID: <87lf6h3nj0.fsf@gnus.org> References: 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="35071"; 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 Wed Jul 07 21:58:09 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 1m1DgP-0008t5-60 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Jul 2021 21:58:09 +0200 Original-Received: from localhost ([::1]:50280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1DgO-0000pc-7M for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Jul 2021 15:58:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1DgI-0000pL-B6 for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2021 15:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1DgI-0002pl-49 for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2021 15:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1DgI-0002xT-11 for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2021 15: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: Wed, 07 Jul 2021 19:58:01 +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.162568785811341 (code B ref 49449); Wed, 07 Jul 2021 19:58:01 +0000 Original-Received: (at 49449) by debbugs.gnu.org; 7 Jul 2021 19:57:38 +0000 Original-Received: from localhost ([127.0.0.1]:53576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1Dfu-0002wq-7e for submit@debbugs.gnu.org; Wed, 07 Jul 2021 15:57:38 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:55044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1Dfq-0002wW-8o for 49449@debbugs.gnu.org; Wed, 07 Jul 2021 15:57:36 -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=Y9QBtqx+48GitTQQb8pNh9InIF0AMJ3N5lHFOv+OXHs=; b=LQgvopE+bZvHCFatIknFRoD6so kNbUQ5AMkEuZYeEyA5NyQmUvdDy5pVHgVTrpH2YT5XiJoslzebSCybDmXZbGiV2z7xVWRCXtMTZb6 lMeb2qCiPyk4bvXdvL8R+l76J1kQAq2m/O6ybqLyicdh7iLSWjmj06x9dYBANz2js6sY=; 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 1m1Dfg-0001PA-EJ; Wed, 07 Jul 2021 21:57:27 +0200 X-Now-Playing: Bogdan Raczynski's _Rave 'Till You Cry_: "355 44ir" In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Tue, 6 Jul 2021 21:12:39 +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:209625 Archived-At: Mattias Engdeg=C3=A5rd writes: > (B) In wait_reading_process_output, after the descriptor being found writ= able by `select` and the condition > > NILP (p->gnutls_boot_parameters) && !p->gnutls_p > > being satisfied (process.c:5900). > > There seems to be a gap in the logic, however: it is perfectly > possible for the condition in (A) to fail because the descriptor is > still marked nonblocking at that point, and for (B) to fail because > gnutls_p=3Dtrue was set already in gnutls_try_handshake. > > Lars, it looks like you wrote at least part of the original logic. Can > you see what is going on? It is somewhat complex. Yes, it's grown somewhat organically. :-/ > For reference, I'm using the reproduction recipe below; it may or may not= exhibit the problem in your particular setup. I'm using gnutls 3.6.15. > > (defun busy-wait (s) > (let ((t0 (current-time))) > (while (< (time-to-seconds (time-since t0)) s) nil))) > > (progn > (url-http > #s(url "https" nil nil "elpa.gnu.org" nil "/packages/archive-contents"= nil nil t silent t t) > (lambda (status) (message "callback: status =3D %S" status)) > '(nil) nil 'tls) > (busy-wait 1.0)) I'm not able to reproduce this on Debian/bullseye, but on Macos I get callback: status =3D (:error (error connection-failed "connect" :host "elpa= .gnu.o\ rg" :service 443)) after a while. There's been several reports in the last week of TLS not working on Macos. Has Apple pushed something new, or... did something else happen lately in this area on Macos? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no