From unknown Tue Jun 17 20:18:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#49449 <49449@debbugs.gnu.org> To: bug#49449 <49449@debbugs.gnu.org> Subject: Status: 28: TLS connection never gets to "open" stage Reply-To: bug#49449 <49449@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:18:24 +0000 retitle 49449 28: TLS connection never gets to "open" stage reassign 49449 emacs submitter 49449 Mattias Engdeg=C3=A5rd severity 49449 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 06 15:41:53 2021 Received: (at submit) by debbugs.gnu.org; 6 Jul 2021 19:41:53 +0000 Received: from localhost ([127.0.0.1]:50257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0qx7-0004zT-4k for submit@debbugs.gnu.org; Tue, 06 Jul 2021 15:41:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:56182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0qx5-0004zL-Bt for submit@debbugs.gnu.org; Tue, 06 Jul 2021 15:41:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0qx5-0005PV-1x for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 15:41:51 -0400 Received: from mail1448c50.megamailservers.eu ([91.136.14.48]:34278 helo=mail265c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0qx2-00060S-KU for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 15:41:50 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1625598762; bh=1dfDzG/Qu+DmDXdK1tYf/tvz4zW3M5X11apYX/t+cYU=; h=From:Subject:Date:Cc:To:From; b=e4MRCvFpC60CGgu+DRnbny7pCi3Q63kIsIdWjeWqNWYu2ruB3gJtDLk/wyHmz+ilm 6VsHbq4yVV2/I9wl9Ze+bNcjEgzOE37ecA6WB3lCrIIqpQqHHJ60WHH9Y2PQYGwJKw 2ofxfa/B51sNRrtpvB6Y39lxCdPrcNFx8XUNzjN4= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 166JCdQG003392; Tue, 6 Jul 2021 19:12:41 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: 28: TLS connection never gets to "open" stage Message-Id: Date: Tue, 6 Jul 2021 21:12:39 +0200 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1B.60E4AB29.007B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=K5pc4BeI c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=nbEulcdb89IEHmXGLgUA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.14.48; envelope-from=mattiase@acm.org; helo=mail265c50.megamailservers.eu X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Lars Ingebrigtsen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) It seems that the process/TLS apparatus can get into a state where it is = unable to ever call the process sentinel "open\n" event; specifically, = an async `url-https` does not make forward progress until the connection = times out. This has been observed on macOS in Emacs 28 now and then, and it looks = like there is an invariant violation somewhere. To recap: The "open\n" event is sent to the sentinel in either of two places: (A) In finish_after_tls_connection, after having successfully called = nsm-verify-connection and the condition (fd_callback_info[p->outfd].flags & NON_BLOCKING_CONNECT_FD) =3D=3D 0 being satisfied (process.c:3277). (B) In wait_reading_process_output, after the descriptor being found = writable 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. 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)) From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 07 15:57:38 2021 Received: (at 49449) by debbugs.gnu.org; 7 Jul 2021 19:57:38 +0000 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 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=; 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 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: X-Now-Playing: Bogdan Raczynski's _Rave 'Till You Cry_: "355 44ir" Date: Wed, 07 Jul 2021 21:57:23 +0200 In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Tue, 6 Jul 2021 21:12:39 +0200") Message-ID: <87lf6h3nj0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias Engdegård writes: > (B) In wait_reading_process_output, after the descriptor being found writable by `select` and the condition > > NILP (p->gnutls_boot_parameters) && !p->gnutls_p > > being satisfied (process.c:5900). [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 08 03:59:41 2021 Received: (at 49449) by debbugs.gnu.org; 8 Jul 2021 07:59:41 +0000 Received: from localhost ([127.0.0.1]:54203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1Owf-0004iq-Cn for submit@debbugs.gnu.org; Thu, 08 Jul 2021 03:59:41 -0400 Received: from mail1460c50.megamailservers.eu ([91.136.14.60]:48570 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1Owa-0004iY-AB for 49449@debbugs.gnu.org; Thu, 08 Jul 2021 03:59:40 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1625731169; bh=lgCqrLrFMvOONMF82AO5DVhNVjtyHjfLBL8d1XpzybE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=PcNIcVS28D3iViwzGefA1I2DRr+XWGTWuKOpW07PAtOT3lOClBqhXKAEyce4JLeOj lDNTaC/0Q/jpgNhLVoeJiynxn/8SV7AfLwEE54cxvnTJNKPl/aMwYE+1OqYbgqzb// vfUI9hpdZjYOBqZIdEyggKX4y3qBOwlFXQpnp//0= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 1687xQPT024522; Thu, 8 Jul 2021 07:59:28 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87lf6h3nj0.fsf@gnus.org> Date: Thu, 8 Jul 2021 09:59:26 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> References: <87lf6h3nj0.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1B.60E6B061.000A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=S9SnP7kP c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=XkBEf6APia05Qm7OjcEA:9 a=CjuIK1q_8ugA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 7 juli 2021 kl. 21.57 skrev Lars Ingebrigtsen : > Yes, it's grown somewhat organically. :-/ Let me first say that the state of the code is not your fault! It's a product, as you say, from organic growth, and it does need a rewrite. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 7 juli 2021 kl. 21.57 skrev Lars Ingebrigtsen : > Yes, it's grown somewhat organically. :-/ Let me first say that the state of the code is not your fault! It's a = product, as you say, from organic growth, and it does need a rewrite. > I'm not able to reproduce this on Debian/bullseye, but on Macos I get >=20 > callback: status =3D (:error (error connection-failed "connect" :host = "elpa.gnu.o\ > rg" :service 443)) Yes, that is my observation too. Obviously the busy-wait part is = essential: removing it makes the problem go away. Essentially, the busy-wait postpones the call to = wait_reading_process_output so that when it is eventually called, = gnutls_handshake succeeds on the first try instead of first returning = GNUTLS_E_AGAIN, which brings us onto a different code path. > 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? No, I've been harassed by this bug for quite some time but only now = decided to dig deeper. Most likely it's just a matter of different = timing that the process/TLS system doesn't cope with. First, when the `url-http` call returns we have a Lisp_Process with gnutls_p =3D true gnutls_boot_parameters =3D non-nil gnutls_initstage =3D GNUTLS_STAGE_HANDSHAKE_TRIED (8) and its file descriptor has a corresponding fd_callback_data with flags =3D FOR_WRITE | NON_BLOCKING_CONNECT_FD because the asynchronous connect call has not yet been completed. In the GOOD case (without busy-wait), `wait_reading_process_output` gets = called right away (because Emacs has nothing else to do) and = gnutls_try_handshake initially fails with E_AGAIN but p->outfd becomes = writable so `delete_write_fd` is called to zero the fd_callback_data = flags, and when the handshake eventually succeeds, the sentinel is = called with the "open\n" event. In the BAD case (with busy-wait), the TLS handshake succeeds right away = while the descriptor flags still has NON_BLOCKING_CONNECT_FD set, so the = sentinel isn't called. Does this jog any memories? From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 08 08:54:57 2021 Received: (at 49449) by debbugs.gnu.org; 8 Jul 2021 12:54:57 +0000 Received: from localhost ([127.0.0.1]:54636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1TYO-0008Gm-Ro for submit@debbugs.gnu.org; Thu, 08 Jul 2021 08:54:57 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1TYM-0008GT-4L for 49449@debbugs.gnu.org; Thu, 08 Jul 2021 08:54:55 -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=/3e+nmAwhP8CDW/VZTerrn23WpJPvKAhJorU87YGdm4=; b=PS1Q7kS2RLvWAropDwBM6EKWQa hQbnyqUSWSB5K0lMvwzRxLO2T9gg+gFC7jpBMOjyEryOptpEZBhrIlnNQVouEVePDOlWEtgFHA0Y3 YxfPXFaBdx/INo4eKvusOsQVchq7I/4uCP5KAJiSqDE4x2FZqB/8fAycp7wR1ZX+zm4Q=; 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 1m1TYD-0002hV-BQ; Thu, 08 Jul 2021 14:54:47 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> Date: Thu, 08 Jul 2021 14:54:39 +0200 In-Reply-To: <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Thu, 8 Jul 2021 09:59:26 +0200") Message-ID: <87o8bdt180.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias Engdegård writes: > In the BAD case (with busy-wait), the TLS handshake succeeds right > away while the descriptor flags still has NON_BLOCKING_CONNECT_FD set, > so the sentinel isn't called. > > Does this jog any memo [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Mattias Engdeg=C3=A5rd writes: > In the BAD case (with busy-wait), the TLS handshake succeeds right > away while the descriptor flags still has NON_BLOCKING_CONNECT_FD set, > so the sentinel isn't called. > > Does this jog any memories? Sorry, nope. :-/ --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 08 12:47:29 2021 Received: (at 49449) by debbugs.gnu.org; 8 Jul 2021 16:47:29 +0000 Received: from localhost ([127.0.0.1]:57351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1XBQ-0006w7-V9 for submit@debbugs.gnu.org; Thu, 08 Jul 2021 12:47:29 -0400 Received: from mail209c50.megamailservers.eu ([91.136.10.219]:44808 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1XBO-0006sM-7B for 49449@debbugs.gnu.org; Thu, 08 Jul 2021 12:47:27 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1625762843; bh=5VBCwwIpOREJqo3XIBhXa0MgEDFckENnd8rlMjrktgg=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=dYh/xtTkXsn87l5512GFk1Z7hxWTKrY1IJLmzzvpcJbsiVbeI+6hn8Fb4gIELRihB W8k6Sl5qhDySW5o6tWTyxh4Hw/iJKdhHWcR2hDLK/V6kZuMIEgdZYi/w8cVsEpbY6y 5TdE8Xr9V3iykg9cm3C+WSBNVhp0QrA1ZMZm1eIc= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 168GlC9l002138; Thu, 8 Jul 2021 16:47:22 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_9DD7E76C-A5CF-4F30-AD24-9D288F419D8B" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage Date: Thu, 8 Jul 2021 18:47:11 +0200 In-Reply-To: <87o8bdt180.fsf@gnus.org> To: Lars Ingebrigtsen References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F15.60E72C1B.0037, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=QJQWuTDL c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=-TBZMzmWlwGd9XIhbeUA:9 a=CjuIK1q_8ugA:10 a=g5awHVhrGdkdB9G6Aq0A:9 a=De_Ol2h6w80A:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --Apple-Mail=_9DD7E76C-A5CF-4F30-AD24-9D288F419D8B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 8 juli 2021 kl. 14.54 skrev Lars Ingebrigtsen : > Sorry, nope. :-/ I was thinking about 9c74f2fea6bf which introduced the condition of the = wait mask, and maybe ac6e085cf6b2 where async TLS negotiation was added. A hack like the one below would "solve" the problem by pretending that = the first handshake attempt always fails with E_AGAIN, but it would be = better to do it in a slightly more principled way. --Apple-Mail=_9DD7E76C-A5CF-4F30-AD24-9D288F419D8B Content-Disposition: attachment; filename=tls-handshake-hack.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="tls-handshake-hack.diff" Content-Transfer-Encoding: 7bit diff --git a/src/gnutls.c b/src/gnutls.c index 22e7f2cbc1..47ac679c5c 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -623,13 +623,23 @@ gnutls_try_handshake (struct Lisp_Process *proc) if (non_blocking) proc->gnutls_p = true; - while ((ret = gnutls_handshake (state)) < 0) + if (non_blocking && proc->gnutls_handshakes_tried < 1) { - if (emacs_gnutls_handle_error (state, ret) == 0) /* fatal */ - break; + /* HACK: don't succeed the first time for nonblocking connections, + because the logic doesn't allow it (bug#49449). */ + ret = GNUTLS_E_AGAIN; maybe_quit (); - if (non_blocking && ret != GNUTLS_E_INTERRUPTED) - break; + } + else + { + while ((ret = gnutls_handshake (state)) < 0) + { + if (emacs_gnutls_handle_error (state, ret) == 0) /* fatal */ + break; + maybe_quit (); + if (non_blocking && ret != GNUTLS_E_INTERRUPTED) + break; + } } proc->gnutls_initstage = GNUTLS_STAGE_HANDSHAKE_TRIED; --Apple-Mail=_9DD7E76C-A5CF-4F30-AD24-9D288F419D8B-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 12:27:37 2021 Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 16:27:37 +0000 Received: from localhost ([127.0.0.1]:33294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2FpI-0007Wn-Vi for submit@debbugs.gnu.org; Sat, 10 Jul 2021 12:27:37 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2FpG-0007WY-NW for 49449@debbugs.gnu.org; Sat, 10 Jul 2021 12:27:35 -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=SXS5yBnqrhKJJofBNpcvWRSJhBye6E8N2reTAszZ740=; b=e71OXMfIJuxq95dFHe/LufVw2C C+W2IZVhRpe8Cn9z+nZ9kaf53jghVe9pO5ImiNgWEVyzhc45lOUbx32Wv31CVeJTv2q5oyVjAM9H6 +vKw8VXSivRBsXw+hIL77FMc2R6XEnHFy2m9G14D5QZJ3iJiMC2YbGeSSxnLGsNYZk4Q=; 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 1m2Fp8-0005eU-0K; Sat, 10 Jul 2021 18:27:28 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEXq7e6npqGIgXNf VkkYFBH///+w5t/OAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UHChAYK2VB3owAAAGgSURBVDjLdZTt gcMgCIYx7QBqOkDVDtCoA1wD+890gB9Nrzn+pPIIvKAW4GDG+VS6wYc553P0W4yxDEf7WuOCXwJz ARdEIrKaij25pJgklakkhrYBTuMiE4AHNUMF7EpZIxYatimYqq4T0P0DvP307IDwD3gJqKqlDrA5 Xu8muNQ3NSBSb/x1YfgbED+sAlwdAEF1Sv/8I3s6Agw6WVndTgDceGJjCplrVE1lAK7bLEDbA6Xz YH0GWO5vsF94cpVy8OXOh9IB8s6FAYe8Fh26AkSUcFSdL9D6DXBbKayone0qa22CEoKza0uFCrrW rdrbZvYOjD2AJ6/2Nr072J5q53mxQoht38+swfIU+HYe2VkwrXiA+uLw1ADKVBrYoaeawLXi6BK8 gV6dfvFiCh/A+T6q54NLLANgDOu4XfEICEcAZTnpywRU5qFKiRKPF27eYQb5BCC/orWcAIk5BdLt 5QzoseX/wLcqrKLKMOiNzf7SaBD7xjEbHyTgKxVG/jMw/HQ1VT0EFX3MAvBdtm3QR3sASBWp1IID DD2IBcXZwS99p9AznJ08HgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNy0xMFQxNjoyNDo0Mysw MDowMA/jcU0AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDctMTBUMTY6MjQ6NDMrMDA6MDB+vsnx AAAAAElFTkSuQmCC X-Now-Playing: Tears For Fears's _Songs From The Big Chair_: "Listen" Date: Sat, 10 Jul 2021 18:27:22 +0200 In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Thu, 8 Jul 2021 18:47:11 +0200") Message-ID: <875yxip21h.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias Engdegård writes: > A hack like the one below would "solve" the problem by pretending that > the first handshake attempt always fails with E_AGAIN, but it would be > better to do it in a slightly more principled way. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Mattias Engdeg=C3=A5rd writes: > A hack like the one below would "solve" the problem by pretending that > the first handshake attempt always fails with E_AGAIN, but it would be > better to do it in a slightly more principled way. Hm... does reverting 234bf1b6363a3d5db8e73c422d87a0bf1aa4b2e3 help any here? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 12:51:21 2021 Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 16:51:21 +0000 Received: from localhost ([127.0.0.1]:33325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2GCH-0001rJ-IT for submit@debbugs.gnu.org; Sat, 10 Jul 2021 12:51:21 -0400 Received: from mail1479c50.megamailservers.eu ([91.136.14.79]:44152 helo=mail118c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2GCE-0001r3-9e for 49449@debbugs.gnu.org; Sat, 10 Jul 2021 12:51:19 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1625935871; bh=X/JBfts056JSS6pau+5O+WSLQaC5NUTGHne/FPfTnd8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=oafi6QHSKc3b9m4rrvb8ozPNNIO1MEEU0w5L9m+SydXiF3vil2+md9vR76csVwZyb k/JbFOXxQVz21gW6nG4qwZkhLbmLu7STai59lcjTvpn9ea/V6QTbXLB1AC8Y1NkPga IE/8K0/Qcr/gtpjZZiHRL/kFY/jY8gJPBYANoIVo= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16AGp8Pn013440; Sat, 10 Jul 2021 16:51:10 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <875yxip21h.fsf@gnus.org> Date: Sat, 10 Jul 2021 18:51:08 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F19.60E9CFFF.0015, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Ro+70xuK c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=ryJkmoQ6HVnHtuExjyAA:9 a=CjuIK1q_8ugA:10 a=3fbLLLLNgwQA:10 a=QYH75iMubAgA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 10 juli 2021 kl. 18.27 skrev Lars Ingebrigtsen : > Hm... does reverting 234bf1b6363a3d5db8e73c422d87a0bf1aa4b2e3 help any > here? No, sorry. (Was worth a shot, though!) Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 10 juli 2021 kl. 18.27 skrev Lars Ingebrigtsen : > Hm... does reverting 234bf1b6363a3d5db8e73c422d87a0bf1aa4b2e3 help any > here? No, sorry. (Was worth a shot, though!) From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 12:57:56 2021 Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 16:57:56 +0000 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 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=; 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 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> X-Now-Playing: Suzanne Vega's _Suzanne Vega_: "Undertow" Date: Sat, 10 Jul 2021 18:57:45 +0200 In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sat, 10 Jul 2021 18:51:08 +0200") Message-ID: <875yxinm2e.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias Engdegård writes: > 10 juli 2021 kl. 18.27 skrev Lars Ingebrigtsen : > >> Hm... does reverting 234bf1b6363a3d5db8e73c422d87a0bf1aa4b2e3 help any >> here? > > No, sorry. (Was worth a shot, though!) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 13:07:25 2021 Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 17:07:25 +0000 Received: from localhost ([127.0.0.1]:33365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2GRp-0004Sf-KR for submit@debbugs.gnu.org; Sat, 10 Jul 2021 13:07:25 -0400 Received: from mail235c50.megamailservers.eu ([91.136.10.245]:51086 helo=mail56c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2GRn-0004SV-El for 49449@debbugs.gnu.org; Sat, 10 Jul 2021 13:07:24 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1625936841; bh=o8kFjwhy6ff8jQNUlCmgzG/l8p40jtCxDxC7zLAoQOw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=gTAs1e10+81JNaB0v/NOMV17MVe9zQkLTgDQal/lNUpIaUGFKvn71CtKUgyRm5t6m PntqkPHNERd7/rM+WgaCG8jJrNcmsAvfpOq+nOe07IfJ8+sy2mwvs2fSa48TqWpuTu GtLpOLa64o8ASMRp0Nnx4drll5RdT6a1aVcie/JA= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16AH7JtE014687; Sat, 10 Jul 2021 17:07:20 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <875yxinm2e.fsf@gnus.org> Date: Sat, 10 Jul 2021 19:07:18 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F25.60E9D3C9.001D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=F5gpiZpN c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=5PuW8nbkl23ZxERXOB0A:9 a=CjuIK1q_8ugA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 10 juli 2021 kl. 18.57 skrev Lars Ingebrigtsen : > 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.. [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 10 juli 2021 kl. 18.57 skrev Lars Ingebrigtsen : > 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... I'm not fond about it either; it's just a hack. I'm not sure if it makes = connections slower or not (if so, it's 100 ms). We really should seek a sound understanding of the bug so that a proper = solution can be found. However the patch is important in that it does = seem to work (and consistently so) and could assist us in developing a = theory. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 14:23:46 2021 Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 18:23:46 +0000 Received: from localhost ([127.0.0.1]:33438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Hdh-0002DY-RN for submit@debbugs.gnu.org; Sat, 10 Jul 2021 14:23:46 -0400 Received: from mail1458c50.megamailservers.eu ([91.136.14.58]:40420 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Hdf-0002DH-51 for 49449@debbugs.gnu.org; Sat, 10 Jul 2021 14:23:44 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1625941416; bh=Hkpg0LxX0k/qBy2J+kJPegJL/tNY1H8sdr5iTKPS1yQ=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=j5vFVY8oI6uQi40C60GVMUyejbhj2s+5f9By2pAHu0HQ0hasTErDZvQK+G9vApw+L +Y3JEj9Ey1aGplW7/vThVK/QRL9unhOxf/p2GK3eY9nj0sFMCJaswoFpelsHOXTrlQ Vq4MsSG6Ppi6UGmGHdSWy5/nS3b4VBXF1sGc5FV8= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16AINXCj019295; Sat, 10 Jul 2021 18:23:35 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <875yxinm2e.fsf@gnus.org> Date: Sat, 10 Jul 2021 20:23:33 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1C.60E9E5A7.0026, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=S9SnP7kP c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=tWE_jrXhHicYtpUubOQA:9 a=CjuIK1q_8ugA:10 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > The problem only seems to occur on Macos, so > it'd be interesting to find out why it doesn't happen on Linux... Now I've had access to a Linux machine, and it seems that it works because it has getaddrinfo_a (async DNS lookup) so the path taken is different. If HAVE_GETADDRINFO_A is #undef'ed, it seems to behav [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > The problem only seems to occur on Macos, so > it'd be interesting to find out why it doesn't happen on Linux... Now I've had access to a Linux machine, and it seems that it works = because it has getaddrinfo_a (async DNS lookup) so the path taken is = different. If HAVE_GETADDRINFO_A is #undef'ed, it seems to behave like = macOS and fail in the same way if busy-waiting for one second after the = url-http call. Can you confirm? From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 14:55:03 2021 Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 18:55:04 +0000 Received: from localhost ([127.0.0.1]:33469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2I7z-0002x3-Nm for submit@debbugs.gnu.org; Sat, 10 Jul 2021 14:55:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2I7y-0002wX-CU for 49449@debbugs.gnu.org; Sat, 10 Jul 2021 14:55:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42722) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2I7s-0002XC-JU; Sat, 10 Jul 2021 14:54:56 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4800 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2I7r-0003fa-Iy; Sat, 10 Jul 2021 14:54:56 -0400 Date: Sat, 10 Jul 2021 21:54:43 +0300 Message-Id: <83sg0matjg.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 10 Jul 2021 20:23:33 +0200) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Sat, 10 Jul 2021 20:23:33 +0200 > Cc: 49449@debbugs.gnu.org > > > The problem only seems to occur on Macos, so > > it'd be interesting to find out why it doesn't happen on Linux... > > Now I've had access to a Linux machine, and it seems that it works because it has getaddrinfo_a (async DNS lookup) so the path taken is different. If HAVE_GETADDRINFO_A is #undef'ed, it seems to behave like macOS and fail in the same way if busy-waiting for one second after the url-http call. Can you confirm? The busy-wait loop can delay the sentinel call, but do you understand why the sentinel isn't called once the loop is over? From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 15:22:22 2021 Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 19:22:22 +0000 Received: from localhost ([127.0.0.1]:33490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2IYQ-0003Zk-FY for submit@debbugs.gnu.org; Sat, 10 Jul 2021 15:22:22 -0400 Received: from mail1462c50.megamailservers.eu ([91.136.14.62]:47096 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2IYN-0003ZV-Jz for 49449@debbugs.gnu.org; Sat, 10 Jul 2021 15:22:21 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1625944932; bh=3dmn5PUBhWXCMSJ79iqKaMm5Kho1RjjM9zyuF3fnB7E=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=ETAzWxL9akoClYVbymY54oqYvrJCt9jT6qlU8ZNaXLEklimKT+X7oKrcTm/XiZEdc mBtj3RezfsfZ6WfdnLoS1NsdHH8TDGgxqBk/KxT3EQYQZAsqFMkEucfHyrABcRx1gq 7x1EJsm0NuSWhis2QE6gicKcjnT/VldtBX1YFNaA= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16AJMA03017807; Sat, 10 Jul 2021 19:22:11 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83sg0matjg.fsf@gnu.org> Date: Sat, 10 Jul 2021 21:22:09 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1D.60E9F364.0021, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=S9SnP7kP c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=rwZmDnELqv9IBqsKSV4A:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 10 juli 2021 kl. 20.54 skrev Eli Zaretskii : > The busy-wait loop can delay the sentinel call, but do you understand > why the sentinel isn't called once the loop is over? Sort of; see previous discussion. In short: once the busy-wait loop is over, the TLS handshake succeeds immediately (because sufficient time has passed) but the logic isn't set up for this path and en [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 10 juli 2021 kl. 20.54 skrev Eli Zaretskii : > The busy-wait loop can delay the sentinel call, but do you understand > why the sentinel isn't called once the loop is over? Sort of; see previous discussion. In short: once the busy-wait loop is = over, the TLS handshake succeeds immediately (because sufficient time = has passed) but the logic isn't set up for this path and enters a state = where the sentinel cannot be called. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 15:31:43 2021 Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 19:31:43 +0000 Received: from localhost ([127.0.0.1]:33514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2IhT-0003p7-38 for submit@debbugs.gnu.org; Sat, 10 Jul 2021 15:31:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:32890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2IhR-0003ou-7d for 49449@debbugs.gnu.org; Sat, 10 Jul 2021 15:31:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43542) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2IhM-0002e5-07; Sat, 10 Jul 2021 15:31:36 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3076 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2IhL-0001OB-FA; Sat, 10 Jul 2021 15:31:35 -0400 Date: Sat, 10 Jul 2021 22:31:25 +0300 Message-Id: <83pmvqarua.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 10 Jul 2021 21:22:09 +0200) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Sat, 10 Jul 2021 21:22:09 +0200 > Cc: larsi@gnus.org, 49449@debbugs.gnu.org > > 10 juli 2021 kl. 20.54 skrev Eli Zaretskii : > > > The busy-wait loop can delay the sentinel call, but do you understand > > why the sentinel isn't called once the loop is over? > > Sort of; see previous discussion. In short: once the busy-wait loop is over, the TLS handshake succeeds immediately (because sufficient time has passed) but the logic isn't set up for this path and enters a state where the sentinel cannot be called. That's my question: why cannot the sentinel be called in this case? what prevents it from being called? Apologies if I missed the explanation, and could you please repeat it? From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 15:44:29 2021 Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 19:44:29 +0000 Received: from localhost ([127.0.0.1]:33536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Ito-00047m-Sa for submit@debbugs.gnu.org; Sat, 10 Jul 2021 15:44:29 -0400 Received: from mail214c50.megamailservers.eu ([91.136.10.224]:57006 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Itm-00047d-UY for 49449@debbugs.gnu.org; Sat, 10 Jul 2021 15:44:28 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1625946264; bh=8nCQag0dZ5/pKsRvYm6yeQQE3W9MdUMAfEKj3IwVOMo=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=OFDGIhaAY7GGCIosSLRJQLmru+HD9QPkCcmf12m8BaYKfTD6eXEqVi+ByivxBd1P+ /+j2I0+Nyi+Mwde1ritRWwHGYcu7ui9WB6gjSQ0h2GTJ+BArKCealck8qdLnsD95yI QJ9hZYDrgLj1EpTWlNUJw7h01RvM2nZHWYuLz9h4= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16AJiLAb021170; Sat, 10 Jul 2021 19:44:23 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83pmvqarua.fsf@gnu.org> Date: Sat, 10 Jul 2021 21:44:21 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> <83pmvqarua.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F19.60E9F898.0018, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=GJV27dFK c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=3GCg62y2ErdneZq37wYA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 10 juli 2021 kl. 21.31 skrev Eli Zaretskii : > That's my question: why cannot the sentinel be called in this case? > what prevents it from being called? In the failing case, wait_reading_process_output calls = gnutls_try_handshake early on, which succeeds and this leads to = finish_after_tls_connection being called. Here, we have the condition else if ((fd_callback_info[p->outfd].flags & NON_BLOCKING_CONNECT_FD) = =3D=3D 0) which gates further progress, but this condition is false because the = flags have NON_BLOCKING_CONNECT_FD set. In the successful case, the first call to gnutls_try_handshake from = wait_reading_process_output fails because things haven't had the time to = be set up yet. This leads to a select being called on the socket for = writing (since it's in a nonblocking connect), and when ready, the = NON_BLOCKING_CONNECT_FD bit is cleared from the flags. This is a simplified view. The state is clearly more complex and things = need to be done in the proper order. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 16:05:29 2021 Received: (at 49449) by debbugs.gnu.org; 10 Jul 2021 20:05:29 +0000 Received: from localhost ([127.0.0.1]:33544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2JE9-0004bd-35 for submit@debbugs.gnu.org; Sat, 10 Jul 2021 16:05:29 -0400 Received: from mail70c50.megamailservers.eu ([91.136.10.80]:54214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2JE6-0004bS-Dd for 49449@debbugs.gnu.org; Sat, 10 Jul 2021 16:05:27 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1625947524; bh=2NEaPiqtDynHBbs6XW3H3jCL6xgYX/aKvnX1xT0RESE=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=jsQSodZ6pEznJvCgWSmzbsxfwh02nTtd3qhfjYDUjjPFGHhNWexNnDbEQIMCA57Zr Q1/z49u3KcBTj6tHLgRnJVczivxpQ6zt0aRqgSrTIY4lq0QFpTDlaDuHkhAIcM7ydL W66exJxIkaOGMyDb/W22MfS1yr92UJUHvL6/aI7k= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16AK5IjK032367; Sat, 10 Jul 2021 20:05:20 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <3B256E70-EBA5-4981-BB84-AE7A4B9DD459@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_BC6BAC76-19BB-4B94-AFE5-57601F7B7290" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage Date: Sat, 10 Jul 2021 22:05:18 +0200 In-Reply-To: To: Lars Ingebrigtsen , Eli Zaretskii References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F24.60E9FD84.0011, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=G/ti7Os5 c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=M51BFTxLslgA:10 a=ilmZReWRCCEnkIGagecA:9 a=CjuIK1q_8ugA:10 a=ii1M7slELtsi5weDimkA:9 a=De_Ol2h6w80A:10 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_BC6BAC76-19BB-4B94-AFE5-57601F7B7290 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Here is a slightly more principled solution. It blocks attempts at TLS = handshaking until the nonblocking connect has actually been established, = since it's pointless to go on beforehand. --Apple-Mail=_BC6BAC76-19BB-4B94-AFE5-57601F7B7290 Content-Disposition: attachment; filename=tls-connect.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="tls-connect.diff" Content-Transfer-Encoding: 7bit diff --git a/src/process.c b/src/process.c index b8c3e4ecfb..c3186eed75 100644 --- a/src/process.c +++ b/src/process.c @@ -5232,7 +5232,10 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, #ifdef HAVE_GNUTLS /* Continue TLS negotiation. */ if (p->gnutls_initstage == GNUTLS_STAGE_HANDSHAKE_TRIED - && p->is_non_blocking_client) + && p->is_non_blocking_client + /* Don't proceed until we have established a connection. */ + && !(fd_callback_info[p->outfd].flags + & NON_BLOCKING_CONNECT_FD)) { gnutls_try_handshake (p); p->gnutls_handshakes_tried++; --Apple-Mail=_BC6BAC76-19BB-4B94-AFE5-57601F7B7290-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 02:49:22 2021 Received: (at 49449) by debbugs.gnu.org; 11 Jul 2021 06:49:22 +0000 Received: from localhost ([127.0.0.1]:33779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2THG-0005aR-Kl for submit@debbugs.gnu.org; Sun, 11 Jul 2021 02:49:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2THE-0005aD-4V for 49449@debbugs.gnu.org; Sun, 11 Jul 2021 02:49:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36264) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2TH8-0001FQ-GS; Sun, 11 Jul 2021 02:49:14 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4620 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2TH8-00014v-4e; Sun, 11 Jul 2021 02:49:14 -0400 Date: Sun, 11 Jul 2021 09:49:03 +0300 Message-Id: <83fswlbb1c.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 10 Jul 2021 21:44:21 +0200) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> <83pmvqarua.fsf@gnu.org> <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Sat, 10 Jul 2021 21:44:21 +0200 > Cc: larsi@gnus.org, 49449@debbugs.gnu.org > > 10 juli 2021 kl. 21.31 skrev Eli Zaretskii : > > > That's my question: why cannot the sentinel be called in this case? > > what prevents it from being called? > > In the failing case, wait_reading_process_output calls gnutls_try_handshake early on, which succeeds and this leads to finish_after_tls_connection being called. Here, we have the condition > > else if ((fd_callback_info[p->outfd].flags & NON_BLOCKING_CONNECT_FD) == 0) > > which gates further progress, but this condition is false because the flags have NON_BLOCKING_CONNECT_FD set. Thanks. A potentially silly question: why not reset the NON_BLOCKING_CONNECT_FD bit before we call finish_after_tls_connection from that place? From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 03:42:49 2021 Received: (at 49449) by debbugs.gnu.org; 11 Jul 2021 07:42:49 +0000 Received: from localhost ([127.0.0.1]:33823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2U6z-00070x-Cu for submit@debbugs.gnu.org; Sun, 11 Jul 2021 03:42:49 -0400 Received: from mail1442c50.megamailservers.eu ([91.136.14.42]:51058 helo=mail264c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2U6w-00070d-EI for 49449@debbugs.gnu.org; Sun, 11 Jul 2021 03:42:47 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1625989358; bh=+GH6c4Xd611baBWkzdDnrdmNZN373xbZQ+085h9wfS4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=KSU2605aNmk0FAVwUE1fPomm1naM/C05GJoD3s1WZGYFzt52u2ftHCTOUcbpZtf/s h9ZSAs4nL8fQ22XmJ03V+InLTR0AvBxzzYzw8NPcfWftGAZZo0ZHCEJDx5l1GuoEc4 O4aNLjV/M+N4f2iCWkhrIVFYrhgf3nMKlGbBBe6w= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail264c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16B7gZDK031453; Sun, 11 Jul 2021 07:42:36 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83fswlbb1c.fsf@gnu.org> Date: Sun, 11 Jul 2021 09:42:34 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <23DD5CB6-5035-4C19-91B8-548F0B47E9FC@acm.org> References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> <83pmvqarua.fsf@gnu.org> <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> <83fswlbb1c.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1A.60EAA0ED.0026, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Xdb3M7x5 c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=ZNHgsUn9jA3rRWAhPy8A:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 11 juli 2021 kl. 08.49 skrev Eli Zaretskii : > why not reset the > NON_BLOCKING_CONNECT_FD bit before we call finish_after_tls_connection > from that place? That's tantamount to jamming a metal screwdriver into the condition on line 3277, which was indeed the first thing I tried. Unfortunately it doesn't work -- after the sentinel is called, no further pr [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 11 juli 2021 kl. 08.49 skrev Eli Zaretskii : > why not reset the > NON_BLOCKING_CONNECT_FD bit before we call finish_after_tls_connection > from that place? That's tantamount to jamming a metal screwdriver into the condition on = line 3277, which was indeed the first thing I tried. Unfortunately it = doesn't work -- after the sentinel is called, no further progress is = made, probably because we (by lying) haven't set up the connection = properly. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 06:14:34 2021 Received: (at 49449) by debbugs.gnu.org; 11 Jul 2021 10:14:34 +0000 Received: from localhost ([127.0.0.1]:33953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2WTq-0002QZ-Cl for submit@debbugs.gnu.org; Sun, 11 Jul 2021 06:14:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2WTp-0002QM-5a for 49449@debbugs.gnu.org; Sun, 11 Jul 2021 06:14:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41340) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2WTj-0004sl-N1; Sun, 11 Jul 2021 06:14:27 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1342 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2WTj-0004hz-AL; Sun, 11 Jul 2021 06:14:27 -0400 Date: Sun, 11 Jul 2021 13:14:16 +0300 Message-Id: <83eec5b1jb.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <23DD5CB6-5035-4C19-91B8-548F0B47E9FC@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sun, 11 Jul 2021 09:42:34 +0200) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> <83pmvqarua.fsf@gnu.org> <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> <83fswlbb1c.fsf@gnu.org> <23DD5CB6-5035-4C19-91B8-548F0B47E9FC@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Feedback-ID:mattiase@acm.or > From: Mattias Engdegård > Date: Sun, 11 Jul 2021 09:42:34 +0200 > Cc: larsi@gnus.org, 49449@debbugs.gnu.org > > 11 juli 2021 kl. 08.49 skrev Eli Zaretskii : > > > why not reset the > > NON_BLOCKING_CONNECT_FD bit before we call finish_after_tls_connection > > from that place? > > That's tantamount to jamming a metal screwdriver into the condition on line 3277, which was indeed the first thing I tried. Unfortunately it doesn't work -- after the sentinel is called, no further progress is made, probably because we (by lying) haven't set up the connection properly. Did you succeed in understanding what else has to happen before that flag could be safely reset? And anyway, if those conditions are not yet set, I wonder why are we calling finish_after_tls_connection at that place? From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:30:07 2021 Received: (at 49449) by debbugs.gnu.org; 11 Jul 2021 11:30:08 +0000 Received: from localhost ([127.0.0.1]:33988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Xex-0004TB-HD for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:30:07 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Xet-0004MT-R8 for 49449@debbugs.gnu.org; Sun, 11 Jul 2021 07:30:05 -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=gJEVo2E2de/zc0eNXJ/XSHM0fYWQpqYZkU5BHuUq6lk=; b=axkEha069eVw8KyvhsIREx3gCG VgJlvz3w6RRq4ZkMdAr8f9763U4a47/LgUjLjVKUHU+LrzgP2oDcqo5pkK80aAe2UrtFUz5lkUHLN K9jJGYrLoqRSw/ECUK5H93bkOfG4DhqSrQDVEh4y6+f5HUels1/nbidldVLUTeA7IGgM=; 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 1m2Xef-00029E-7l; Sun, 11 Jul 2021 13:29:51 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEUQDQwgHRxBPj0v LSyPjYxvbGshIB6hn51NTEvBv761s7L6+fnQ0M6Bf33////E5CGhAAAAAWJLR0QOb70wTwAAAAd0 SU1FB+UHCwsdDWL0hMAAAAEHSURBVDjLY2AYnIARRDAJYJdhZHbEIgFW7AqlMWTSHeBqUI3jmIzD dualCZgSYANCsbkLBISbcUikuDNil+CqMMAuw7E0DGIZczCaZ0LAPmFgXtWAKpGQtRiscXUAuvfZ jwAtYZ29hVEQ3ZJVBgwsp3cvQLc8dXF0W+vq3XvQ/dm+e6v1ntO7d6HZzNCze/f27t27jxigGR8R PWtKdM/uqRjm3GgWYOgOdUa3l22JmgADY/UEeBzAQGsgiLy9GV2DKFicIWcLugTURhYML8CcttsB uwTD6m04JGy24pBg2YNDgm12A4YYxFvdC3BoYd2MQ4JhOi4JLgMcEhwBuLSE4ZJIZhjkAAD1ITez DQxRlAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNy0xMVQxMToyOToxMyswMDowMGHmY1AAAAAl dEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDctMTFUMTE6Mjk6MTMrMDA6MDAQu9vsAAAAAElFTkSuQmCC X-Now-Playing: Burial's _Tunes 2011-2019 (1)_: "Night Market" Date: Sun, 11 Jul 2021 13:29:48 +0200 In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sat, 10 Jul 2021 20:23:33 +0200") Message-ID: <875yxhm6kz.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias Engdegård writes: > If HAVE_GETADDRINFO_A is #undef'ed, it seems to behave like > macOS and fail in the same way if busy-waiting for one second after > the url-http call. Can you confirm? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Mattias Engdeg=C3=A5rd writes: > If HAVE_GETADDRINFO_A is #undef'ed, it seems to behave like > macOS and fail in the same way if busy-waiting for one second after > the url-http call. Can you confirm? With the test case and HAVE_GETADDRINFO_A undeffed, I'm still not able to reproduce the problem on Debian/bullseye. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:31:29 2021 Received: (at 49449) by debbugs.gnu.org; 11 Jul 2021 11:31:29 +0000 Received: from localhost ([127.0.0.1]:33992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XgG-0005ih-V5 for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:31:29 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XgF-0005db-Sg for 49449@debbugs.gnu.org; Sun, 11 Jul 2021 07:31:28 -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=3VMjtXQW3ZHUedzCMRSZPWCZqDyYOxzczgsF3tNP2rI=; b=VQNPqj+2G+rWAbxzoHuSpLQdgw tw9lGrA+Qx7xm9fLGw70IZnwSkSeaUVAQey80mOx7wYatc/3y+ZwAyK8EemtRNA8LpHAtni2Qrgoy IKK0nK8M2CAfN8PJFMQJpGM9PU0lrHyIPfO8TBOacbLyXCFspyLEs1ovRh7ETB2AbBrU=; 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 1m2Xfz-00029m-0r; Sun, 11 Jul 2021 13:31:21 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <3B256E70-EBA5-4981-BB84-AE7A4B9DD459@acm.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEUQDQwgHRxBPj0v LSyPjYxvbGshIB6hn51NTEvBv761s7L6+fnQ0M6Bf33////E5CGhAAAAAWJLR0QOb70wTwAAAAd0 SU1FB+UHCwsdDWL0hMAAAAEHSURBVDjLY2AYnIARRDAJYJdhZHbEIgFW7AqlMWTSHeBqUI3jmIzD dualCZgSYANCsbkLBISbcUikuDNil+CqMMAuw7E0DGIZczCaZ0LAPmFgXtWAKpGQtRiscXUAuvfZ jwAtYZ29hVEQ3ZJVBgwsp3cvQLc8dXF0W+vq3XvQ/dm+e6v1ntO7d6HZzNCze/f27t27jxigGR8R PWtKdM/uqRjm3GgWYOgOdUa3l22JmgADY/UEeBzAQGsgiLy9GV2DKFicIWcLugTURhYML8CcttsB uwTD6m04JGy24pBg2YNDgm12A4YYxFvdC3BoYd2MQ4JhOi4JLgMcEhwBuLSE4ZJIZhjkAAD1ITez DQxRlAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNy0xMVQxMToyOToxMyswMDowMGHmY1AAAAAl dEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDctMTFUMTE6Mjk6MTMrMDA6MDAQu9vsAAAAAElFTkSuQmCC X-Now-Playing: Burial's _Tunes 2011-2019 (1)_: "Night Market" Date: Sun, 11 Jul 2021 13:31:10 +0200 In-Reply-To: <3B256E70-EBA5-4981-BB84-AE7A4B9DD459@acm.org> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sat, 10 Jul 2021 22:05:18 +0200") Message-ID: <871r85m6ip.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias Engdegård writes: > Here is a slightly more principled solution. It blocks attempts at TLS > handshaking until the nonblocking connect has actually been > established, since it's pointless to go on beforehand. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Mattias Engdeg=C3=A5rd writes: > Here is a slightly more principled solution. It blocks attempts at TLS > handshaking until the nonblocking connect has actually been > established, since it's pointless to go on beforehand. [...] > - && p->is_non_blocking_client) > + && p->is_non_blocking_client > + /* Don't proceed until we have established a connection. */ > + && !(fd_callback_info[p->outfd].flags > + & NON_BLOCKING_CONNECT_FD)) Yeah, I think that's a sensible change (but I haven't tried it). --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 10:27:01 2021 Received: (at 49449) by debbugs.gnu.org; 11 Jul 2021 14:27:01 +0000 Received: from localhost ([127.0.0.1]:35569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2aQ9-0002mu-4q for submit@debbugs.gnu.org; Sun, 11 Jul 2021 10:27:01 -0400 Received: from mail1454c50.megamailservers.eu ([91.136.14.54]:34776 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2aQ6-0002md-0n for 49449@debbugs.gnu.org; Sun, 11 Jul 2021 10:27:00 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1626013611; bh=VFK3YKhnY1tCrOTUaEIvYxvMchAc/E5IxtyBleRrsvM=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=omN5EP1Q/SZHE/aQEhD6QovQ0SWkPjeys0g6qKLQvBqzQA79ld2q9InZqp0dm8Am6 tySDquOUCJN4ceQ5HbC2q6fRGahF8/vbZBxfjn7Uy7VlJFJhTx/AM6NZgDCSeLkuqF cPIXeoBaYXPodShm3w4pJwXLvVSr+H5Hs2pUIOA4= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16BEQla6011136; Sun, 11 Jul 2021 14:26:49 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_293D64E2-B1D3-4EF2-A3A0-4BB6EF5FC322" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage Date: Sun, 11 Jul 2021 16:26:47 +0200 In-Reply-To: <83eec5b1jb.fsf@gnu.org> To: Eli Zaretskii References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> <83pmvqarua.fsf@gnu.org> <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> <83fswlbb1c.fsf@gnu.org> <23DD5CB6-5035-4C19-91B8-548F0B47E9FC@acm.org> <83eec5b1jb.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1F.60EAFFAA.003B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=UeYvt5aN c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=X3mAVjWym6pNYM5EMsoA:9 a=CjuIK1q_8ugA:10 a=uBNzgUUHY_ASnSHALLsA:9 a=De_Ol2h6w80A:10 a=4tezseTTOqZLjFF550sA:9 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 11 juli 2021 kl. 12.14 skrev Eli Zaretskii : > Did you succeed in understanding what else has to happen before that > flag could be safely reset? Yes. The TCP connection needs to be established, the socket descriptor removed from write monitoring (because it is now connected) and added to read monitoring (so that we can get incoming traffic). Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_293D64E2-B1D3-4EF2-A3A0-4BB6EF5FC322 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 11 juli 2021 kl. 12.14 skrev Eli Zaretskii : > Did you succeed in understanding what else has to happen before that > flag could be safely reset? Yes. The TCP connection needs to be established, the socket descriptor = removed from write monitoring (because it is now connected) and added to = read monitoring (so that we can get incoming traffic). This suggests a second solution: remove the condition on line 3277 on = the grounds that since the TLS handshake succeeded, we are evidently = connected; then remove the write monitoring and add the read monitoring = before calling the sentinel: --Apple-Mail=_293D64E2-B1D3-4EF2-A3A0-4BB6EF5FC322 Content-Disposition: attachment; filename=alt.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="alt.diff" Content-Transfer-Encoding: 7bit diff --git a/src/process.c b/src/process.c index b8c3e4ecfb..7d2a9e9a62 100644 --- a/src/process.c +++ b/src/process.c @@ -3274,8 +3274,13 @@ finish_after_tls_connection (Lisp_Object proc) pset_status (p, Qfailed); deactivate_process (proc); } - else if ((fd_callback_info[p->outfd].flags & NON_BLOCKING_CONNECT_FD) == 0) + else { + delete_write_fd (p->outfd); + + if (0 <= p->infd && !EQ (p->filter, Qt) && !EQ (p->command, Qt)) + add_process_read_fd (p->infd); + /* If we cleared the connection wait mask before we did the TLS setup, then we have to say that the process is finally "open" here. */ --Apple-Mail=_293D64E2-B1D3-4EF2-A3A0-4BB6EF5FC322 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > And anyway, if those conditions are not yet set, I wonder why are we > calling finish_after_tls_connection at that place? There's no harm in calling `gnutls_handshake`; it will just return = E_AGAIN if the connection hasn't been established. On the other hand = there's little point in doing so until we have a connection. Which suggests a third solution: do the handshake right away after = establishing the connection. That would go into the code somewhere = before line 5900, which right now is a condition that I don't quite = understand. I think Lars wrote it but apparently forgot all about it = (happens to everyone once in a while). I still favour the less intrusive patch posted previously (adding a = condition at line 5235) since it avoids duplication; there is already = far too much of that in the code (everything seems to be done in at = least two places). The code is obviously in the need of restructuring, = but we shouldn't conflate that effort with fixing this specific bug. --Apple-Mail=_293D64E2-B1D3-4EF2-A3A0-4BB6EF5FC322-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 10:28:12 2021 Received: (at 49449) by debbugs.gnu.org; 11 Jul 2021 14:28:12 +0000 Received: from localhost ([127.0.0.1]:35578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2aRH-0002pf-Oy for submit@debbugs.gnu.org; Sun, 11 Jul 2021 10:28:11 -0400 Received: from mail1442c50.megamailservers.eu ([91.136.14.42]:55710 helo=mail264c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2aRF-0002pP-8V for 49449@debbugs.gnu.org; Sun, 11 Jul 2021 10:28:10 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1626013682; bh=BmLm0YXDlucerovQc0Bl4mDUOBH7uQPgMK7FOQlPxNk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=BxkmCtnqSw+afrf86CX4SuwR8Nm/EogQIyccXghd1fTMv1M4MpUfdA/1SH0XUv4gk JgfiUQmbK7QQ1u9uAGb0+MM+HRL2G8+seaCDik2OW2NmAx1BRk5rN6JI7Q8NF5PCLY +9FT4HrpYziQUc4I6xCU8JihqYh4RmOTKG9NpcOA= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail264c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16BES0Pf024603; Sun, 11 Jul 2021 14:28:02 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <875yxhm6kz.fsf@gnus.org> Date: Sun, 11 Jul 2021 16:28:00 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <875yxhm6kz.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1F.60EAFFF2.0028, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Xdb3M7x5 c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=3W1L_HKCbMTt60JIMxIA:9 a=CjuIK1q_8ugA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 11 juli 2021 kl. 13.29 skrev Lars Ingebrigtsen : > With the test case and HAVE_GETADDRINFO_A undeffed, I'm still not able > to reproduce the problem on Debian/bullseye. Hard to say what's going on since the problem is somewhat timing-sensitive, but it's easy enough to sprinkle printfs for finding out what code paths are taken. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 11 juli 2021 kl. 13.29 skrev Lars Ingebrigtsen : > With the test case and HAVE_GETADDRINFO_A undeffed, I'm still not able > to reproduce the problem on Debian/bullseye. Hard to say what's going on since the problem is somewhat = timing-sensitive, but it's easy enough to sprinkle printfs for finding = out what code paths are taken. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 11:02:10 2021 Received: (at 49449) by debbugs.gnu.org; 11 Jul 2021 15:02:10 +0000 Received: from localhost ([127.0.0.1]:35703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2ayA-0003ou-Je for submit@debbugs.gnu.org; Sun, 11 Jul 2021 11:02:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2ay8-0003oP-OV for 49449@debbugs.gnu.org; Sun, 11 Jul 2021 11:02:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49354) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2ay3-0002SV-6V; Sun, 11 Jul 2021 11:02:03 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3757 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2ay0-000509-Jd; Sun, 11 Jul 2021 11:02:01 -0400 Date: Sun, 11 Jul 2021 18:01:52 +0300 Message-Id: <837dhwc2sf.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sun, 11 Jul 2021 16:26:47 +0200) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> <83pmvqarua.fsf@gnu.org> <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> <83fswlbb1c.fsf@gnu.org> <23DD5CB6-5035-4C19-91B8-548F0B47E9FC@acm.org> <83eec5b1jb.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Sun, 11 Jul 2021 16:26:47 +0200 > Cc: larsi@gnus.org, 49449@debbugs.gnu.org > > > [1:text/plain Hide] > > 11 juli 2021 kl. 12.14 skrev Eli Zaretskii : > > > Did you succeed in understanding what else has to happen before that > > flag could be safely reset? > > Yes. The TCP connection needs to be established, the socket descriptor removed from write monitoring (because it is now connected) and added to read monitoring (so that we can get incoming traffic). > > This suggests a second solution: remove the condition on line 3277 on the grounds that since the TLS handshake succeeded, we are evidently connected; then remove the write monitoring and add the read monitoring before calling the sentinel: > > > [2:application/octet-stream Show Save:alt.diff (649B)] > > > [3:text/plain Hide] > > > > And anyway, if those conditions are not yet set, I wonder why are we > > calling finish_after_tls_connection at that place? > > There's no harm in calling `gnutls_handshake`; it will just return E_AGAIN if the connection hasn't been established. On the other hand there's little point in doing so until we have a connection. > > Which suggests a third solution: do the handshake right away after establishing the connection. That would go into the code somewhere before line 5900, which right now is a condition that I don't quite understand. I think Lars wrote it but apparently forgot all about it (happens to everyone once in a while). Thanks for the explanations. > I still favour the less intrusive patch posted previously (adding a condition at line 5235) since it avoids duplication; there is already far too much of that in the code (everything seems to be done in at least two places). The code is obviously in the need of restructuring, but we shouldn't conflate that effort with fixing this specific bug. I tend to agree. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 12 10:58:34 2021 Received: (at 49449) by debbugs.gnu.org; 12 Jul 2021 14:58:34 +0000 Received: from localhost ([127.0.0.1]:38641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2xOE-0005S4-AH for submit@debbugs.gnu.org; Mon, 12 Jul 2021 10:58:34 -0400 Received: from mail70c50.megamailservers.eu ([91.136.10.80]:52436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2xOB-0005Ru-IV for 49449@debbugs.gnu.org; Mon, 12 Jul 2021 10:58:32 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1626101908; bh=xKg/8UYvlDDoRQRjO1sZ+Op8wtWoFjgxGSjmtkai8t0=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=dTDIJhGni6vh8A19t9L/KGnaPlB/ak3+c+9EjTA0z409Gk8CSOHy8U0cPEATlssG9 AGns8jYkjdc3Su5Z363V68uE18A2+LTvXYOb5nt/JU9IWauB5klV5TXkM0tHU5iMWq miIWNfwVWUgMPUuh9h1HU93Ecrsw82aA02SGz2qQ= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16CEwQlA011638; Mon, 12 Jul 2021 14:58:27 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <07ECB92A-D6FF-43FF-989D-5F34918F180F@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_93DD7399-6D1B-4332-9BC7-9937FCCD9906" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage Date: Mon, 12 Jul 2021 16:57:00 +0200 In-Reply-To: <837dhwc2sf.fsf@gnu.org> To: Eli Zaretskii References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> <83pmvqarua.fsf@gnu.org> <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> <83fswlbb1c.fsf@gnu.org> <23DD5CB6-5035-4C19-91B8-548F0B47E9FC@acm.org> <83eec5b1jb.fsf@gnu.org> <837dhwc2sf.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F27.60EC5894.008A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=G/ti7Os5 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=01x6aIaDnKLFDTL6cJMA:9 a=CjuIK1q_8ugA:10 a=l8CNaK9fnQMVcNqST9YA:9 a=B2y7HmGcmWMA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_93DD7399-6D1B-4332-9BC7-9937FCCD9906 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 11 juli 2021 kl. 17.01 skrev Eli Zaretskii : >> I still favour the less intrusive patch posted previously (adding a = condition at line 5235) since it avoids duplication; there is already = far too much of that in the code (everything seems to be done in at = least two places). The code is obviously in the need of restructuring, = but we shouldn't conflate that effort with fixing this specific bug. >=20 > I tend to agree. Attached is the patch that I intend to push if there are no objections. = The actual change is the same as before and I anticipate no trouble = arising from it but tests are usually more fragile. This issue could very well be the root cause of or at least connected to = other bugs: maybe bug#36017 or bug#34341? In any case it's good to see = it fixed; it annoyed me (with GNU ELPA in particular) for quite some = time and the various unsatisfactory workarounds suggested each time this = came up (such as using HTTP instead of HTTPS) are no longer required. --Apple-Mail=_93DD7399-6D1B-4332-9BC7-9937FCCD9906 Content-Disposition: attachment; filename=0001-Block-TLS-handshake-until-TCP-connection-established.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Block-TLS-handshake-until-TCP-connection-established.patch" Content-Transfer-Encoding: quoted-printable =46rom=2088b0b7e0dd0daec88eab7dde0c9bd3263d8b52de=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Mon,=2012=20Jul=202021=2013:58:28=20+0200=0A= Subject:=20[PATCH]=20Block=20TLS=20handshake=20until=20TCP=20connection=20= established=0A=0AIf=20a=20TLS=20handshake=20is=20attempted=20before=20= the=20completion=20of=20an=0Aasynchronous=20TCP=20connection=20has=20= been=20ascertained,=20our=20local=20state=20will=0Anot=20be=20set=20up=20= correctly=20for=20further=20progress=20and=20the=20sentinel=20"open"=0A= event=20will=20never=20be=20sent.=20=20This=20can=20occur=20if=20= sufficient=20time=20passes=0Aafter=20the=20initiation=20of=20an=20async=20= TCP=20connection=20so=20that=20by=20the=20time=0A= `wait_reading_process_output`=20is=20called,=20the=20connection=20has=20= already=0Abeen=20established=20on=20the=20TCP=20level.=0A=0AThis=20= somewhat=20timing-sensitive=20bug=20has=20plagued=20HTTPS=20connections=20= on=0Asome=20platforms,=20notably=20macOS,=20for=20a=20long=20time=20= (bug#49449).=0A=0A*=20src/process.c=20(wait_reading_process_output):=20= Gate=20the=20TLS=20handshake=0Aby=20the=20NON_BLOCKING_CONNECT_FD=20= flag.=20=20The=20flag=20will=20be=20cleared=20as=20soon=0Aas=20the=20TCP=20= socket=20is=20found=20to=20be=20writable.=0A*=20= test/src/process-tests.el=20(process-async-https-with-delay):=0ANew=20= test.=0A---=0A=20src/process.c=20=20=20=20=20=20=20=20=20=20=20=20=20|=20= =205=20++++-=0A=20test/src/process-tests.el=20|=2030=20= ++++++++++++++++++++++++++++++=0A=202=20files=20changed,=2034=20= insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20a/src/process.c=20= b/src/process.c=0Aindex=20b8c3e4ecfb..c3186eed75=20100644=0A---=20= a/src/process.c=0A+++=20b/src/process.c=0A@@=20-5232,7=20+5232,10=20@@=20= wait_reading_process_output=20(intmax_t=20time_limit,=20int=20nsecs,=20= int=20read_kbd,=0A=20#ifdef=20HAVE_GNUTLS=0A=20=09=09/*=20Continue=20TLS=20= negotiation.=20*/=0A=20=09=09if=20(p->gnutls_initstage=20=3D=3D=20= GNUTLS_STAGE_HANDSHAKE_TRIED=0A-=09=09=20=20=20=20&&=20= p->is_non_blocking_client)=0A+=09=09=20=20=20=20&&=20= p->is_non_blocking_client=0A+=09=09=20=20=20=20/*=20Don't=20proceed=20= until=20we=20have=20established=20a=20connection.=20*/=0A+=09=09=20=20=20= =20&&=20!(fd_callback_info[p->outfd].flags=0A+=09=09=09=20&=20= NON_BLOCKING_CONNECT_FD))=0A=20=09=09=20=20{=0A=20=09=09=20=20=20=20= gnutls_try_handshake=20(p);=0A=20=09=09=20=20=20=20= p->gnutls_handshakes_tried++;=0Adiff=20--git=20= a/test/src/process-tests.el=20b/test/src/process-tests.el=0Aindex=20= 1774f2fc74..9bab523708=20100644=0A---=20a/test/src/process-tests.el=0A= +++=20b/test/src/process-tests.el=0A@@=20-28,6=20+28,7=20@@=0A=20= (require=20'puny)=0A=20(require=20'subr-x)=0A=20(require=20'dns)=0A= +(require=20'url-http)=0A=20=0A=20;;=20Timeout=20in=20seconds;=20the=20= test=20fails=20if=20the=20timeout=20is=20reached.=0A=20(defvar=20= process-test-sentinel-wait-timeout=202.0)=0A@@=20-916,5=20+917,34=20@@=20= process-sentinel-interrupt-event=0A=20=20=20=20=20=20=20;;=20...and=20= the=20change=20description=20should=20be=20"interrupt".=0A=20=20=20=20=20= =20=20(should=20(equal=20'("interrupt\n")=20events)))))=0A=20=0A= +(ert-deftest=20process-async-https-with-delay=20()=0A+=20=20"Bug#49449:=20= asynchronous=20TLS=20connection=20with=20delayed=20completion."=0A+=20=20= (skip-unless=20(and=20internet-is-working=20(gnutls-available-p)))=0A+=20= =20(let*=20((status=20nil)=0A+=20=20=20=20=20=20=20=20=20(buf=20= (url-http=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20#s(url=20= "https"=20nil=20nil=20"elpa.gnu.org"=20nil=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "/packages/archive-contents"=20nil=20nil=20t=20silent=20t=20t)=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(lambda=20(s)=20(setq=20status=20= s))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'(nil)=20nil=20= 'tls)))=0A+=20=20=20=20(unwind-protect=0A+=20=20=20=20=20=20=20=20(progn=0A= +=20=20=20=20=20=20=20=20=20=20;;=20Busy-wait=20for=201=20s=20to=20allow=20= for=20the=20TCP=20connection=20to=20complete.=0A+=20=20=20=20=20=20=20=20= =20=20(let=20((delay=201.0)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(t0=20(float-time)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20(while=20= (<=20(float-time)=20(+=20t0=20delay))))=0A+=20=20=20=20=20=20=20=20=20=20= ;;=20Wait=20for=20the=20entire=20operation=20to=20finish.=0A+=20=20=20=20= =20=20=20=20=20=20(let=20((limit=204.0)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(t0=20(float-time)))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20(while=20(and=20(null=20status)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(<=20(float-time)=20(+=20t0=20= limit)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(sit-for=200.1)))=0A= +=20=20=20=20=20=20=20=20=20=20(should=20status)=0A+=20=20=20=20=20=20=20= =20=20=20(should-not=20(assq=20:error=20status))=0A+=20=20=20=20=20=20=20= =20=20=20(should=20buf)=0A+=20=20=20=20=20=20=20=20=20=20(should=20(>=20= (buffer-size=20buf)=200))=0A+=20=20=20=20=20=20=20=20=20=20)=0A+=20=20=20= =20=20=20(when=20buf=0A+=20=20=20=20=20=20=20=20(kill-buffer=20buf)))))=0A= +=0A=20(provide=20'process-tests)=0A=20;;;=20process-tests.el=20ends=20= here=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_93DD7399-6D1B-4332-9BC7-9937FCCD9906-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 12 11:03:03 2021 Received: (at 49449) by debbugs.gnu.org; 12 Jul 2021 15:03:03 +0000 Received: from localhost ([127.0.0.1]:38647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2xSY-0005av-Tz for submit@debbugs.gnu.org; Mon, 12 Jul 2021 11:03:03 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2xSW-0005aO-RX for 49449@debbugs.gnu.org; Mon, 12 Jul 2021 11:03:01 -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=CZ9S2jKEXqmWT4E1wwwPh3iSEKlUtbdl9ILl7Eh9HkM=; b=JCkg/+LiyLYDJPr+Rb9H7vkfRr j/5PfNLG4yMdblmoR1XCqkvWjvcSFjKHeMUYGD/C5RJR8hyEorJcJepbcE9lYpc9lUeEG65tk3NBJ R+oYcUV1YV5oS7sooVGQllE1Mm4/mKpvTnr829a0MvS1jPbr6XShtxKR5IKde1J+PlvA=; 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 1m2xSN-0007IF-CW; Mon, 12 Jul 2021 17:02:54 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> <83pmvqarua.fsf@gnu.org> <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> <83fswlbb1c.fsf@gnu.org> <23DD5CB6-5035-4C19-91B8-548F0B47E9FC@acm.org> <83eec5b1jb.fsf@gnu.org> <837dhwc2sf.fsf@gnu.org> <07ECB92A-D6FF-43FF-989D-5F34918F180F@acm.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAHlBMVEUhHh0sKik/Pj0P Dg5cXFyurq7Nzc2SkZH6+vr////yvlbbAAAAAWJLR0QJ8dml7AAAAAd0SU1FB+UHDA8BCG43vXcA AAGZSURBVDjLzZPNT8IwFMBnqgnXMYNcdcZw7PYG8ygMzI4kY3FXg45djUo4Ahmsf7Z9/Vi3Re++ S9v363t9X7WspthK+ne2BWD9LiDlT0CJXLqAEnqf5umM0A4g/o6hVC5tAy9jq9uL/oKdHEs5lCA+ P4n1sqiASCLOYxbJ2CBgSyqDEIrsVQcHV2ei7qDBCaAm2dqAXQJG1C0EgbJWUkREgcmRx7uS2oUD wz16RBBzT4F6JnMhrKgChcNBxTeDPGcuUKZceXhZgCEvistjiSQISw1IzBi3HiUSTA589StRGcam BB73EvTWTcBNxgcJhokB72lKIDwq8Ak63Bi3EJQSjPDkfaHqJmoCYdGUGiQdoN/orTtARyXyqIWX o7c3mT9ESu+/mcx9HulIW01KUyusbqh7lSWmuqIfahwGZ+660q1F8zH7wATZEkQHJfDRT8w28y0r Rc/NlPBM6DOv7MZpTYna9+dT8XxjrswkQnsSIWQ6wQCfN6Ce9qAooQXwf9iWjf+jDcDbyh+l9TUA uP7OX2amygZ05H+CHyfJ9XJ+hq8GAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA3LTEyVDE1OjAx OjA4KzAwOjAwDYEQZQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wNy0xMlQxNTowMTowOCswMDow MHzcqNkAAAAASUVORK5CYII= X-Now-Playing: Smagghe & Cross's _#savefabric (8)_: "Sam & Jen" Date: Mon, 12 Jul 2021 17:02:50 +0200 In-Reply-To: <07ECB92A-D6FF-43FF-989D-5F34918F180F@acm.org> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Mon, 12 Jul 2021 16:57:00 +0200") Message-ID: <87wnpvshgl.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias Engdegård writes: > Attached is the patch that I intend to push if there are no > objections. The actual change is the same as before and I anticipate > no trouble arising from it but tests are usually more fragile. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Mattias Engdeg=C3=A5rd writes: > Attached is the patch that I intend to push if there are no > objections. The actual change is the same as before and I anticipate > no trouble arising from it but tests are usually more fragile. Looks good to me. > This issue could very well be the root cause of or at least connected > to other bugs: maybe bug#36017 or bug#34341?=20 bug#36017 looks similar, at least, so it'd be good to poke that bug and ask whether this patch fixes that problem, too. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 13 13:09:06 2021 Received: (at 49449) by debbugs.gnu.org; 13 Jul 2021 17:09:06 +0000 Received: from localhost ([127.0.0.1]:41711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3Lu6-0000Lx-CC for submit@debbugs.gnu.org; Tue, 13 Jul 2021 13:09:06 -0400 Received: from mail70c50.megamailservers.eu ([91.136.10.80]:47772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3Lu3-0000Kb-3T for 49449@debbugs.gnu.org; Tue, 13 Jul 2021 13:09:05 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1626196140; bh=9nsQFgxJMUg/gCWx9XHNr68Uzowd53rVccExMwkkQTw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=DSSxBWyDQ1cs/jYLWWb41v5dqaspoRmt84ROZeScAmuEY6VzBFaCn1yLgyBJ5T3A1 2qOJj6PG/G3s7rK3qvLTlC/cpnSzBHUIi6bnohhsyByoQo4PRC6gQxoqMBlc5YKCkQ oImm269zmKj/MVLYHNA+Iwexyfml7nnwmU2y04rQ= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16DH8wNr014176; Tue, 13 Jul 2021 17:08:59 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#49449: 28: TLS connection never gets to "open" stage From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87wnpvshgl.fsf@gnus.org> Date: Tue, 13 Jul 2021 19:08:57 +0200 Content-Transfer-Encoding: 7bit Message-Id: <01A3EC5B-477D-4979-BB07-8992B60F3354@acm.org> References: <87lf6h3nj0.fsf@gnus.org> <22155A42-4A01-4EF1-80BC-B9CDE31ED0B1@acm.org> <87o8bdt180.fsf@gnus.org> <875yxip21h.fsf@gnus.org> <875yxinm2e.fsf@gnus.org> <83sg0matjg.fsf@gnu.org> <6FC06816-48AF-4853-92A9-B0E6BA424533@acm.org> <83pmvqarua.fsf@gnu.org> <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> <83fswlbb1c.fsf@gnu.org> <23DD5CB6-5035-4C19-91B8-548F0B47E9FC@acm.org> <83eec5b1jb.fsf@gnu.org> <837dhwc2sf.fsf@gnu.org> <07ECB92A-D6FF-43FF-989D-5F34918F180F@acm.org> <87wnpvshgl.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1F.60EDC8AC.00AB, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=G/ti7Os5 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=GQ7RYJgwUOgIF0UE4OMA:9 a=CjuIK1q_8ugA:10 a=3fbLLLLNgwQA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 49449 Cc: 49449@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 12 juli 2021 kl. 17.02 skrev Lars Ingebrigtsen : > Looks good to me. Thanks, pushed to master. > bug#36017 looks similar, at least, so it'd be good to poke that bug and > ask whether this patch fixes that problem, too. Done. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 13 13:11:33 2021 Received: (at control) by debbugs.gnu.org; 13 Jul 2021 17:11:33 +0000 Received: from localhost ([127.0.0.1]:41716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3LwS-0000Q4-Q7 for submit@debbugs.gnu.org; Tue, 13 Jul 2021 13:11:32 -0400 Received: from mail1463c50.megamailservers.eu ([91.136.14.63]:42866 helo=mail268c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3LwR-0000Pq-Ax for control@debbugs.gnu.org; Tue, 13 Jul 2021 13:11:31 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1626196284; bh=q0bEhsHdPWgP8HFsA1tIgmHy2MrEscmy9fRoyvnP+Zc=; h=From:Subject:Date:To:From; b=FbxI2IC/IYyOKqFzNY4FibkSORkF6+i+otckrQCm7Me9Noa5ecb9TlklM76YN8DgI wvp7kieKBf44EReLP9/7yghmYvWUg2GhqIP2Dt613TCb8a0Uv4/nnefU7l3UTvEbk2 vYz7ZZgFpSnJpZsjV8XXrNP9B3TFk3pnW2QWpTP0= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 16DHBLTH021075 for ; Tue, 13 Jul 2021 17:11:23 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Message-Id: Date: Tue, 13 Jul 2021 19:11:21 +0200 To: control@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F21.60EDC93C.000E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OogxNB3t c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=AoPuhqDEyBuVW6pR9-MA:9 a=CjuIK1q_8ugA:10 a=xo5jKAKm-U-Zyk2_beg_:22 X-Origin-Country: SE X-Spam-Score: 3.4 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 49449 Content analysis details: (3.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 TVD_SPACE_RATIO No description available. 2.0 BLANK_SUBJECT Subject is present but empty 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 49449 Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 TVD_SPACE_RATIO No description available. 2.0 BLANK_SUBJECT Subject is present but empty -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager close 49449 From unknown Tue Jun 17 20:18:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 11 Aug 2021 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator