From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45821: Emacs UDP support on Windows Date: Mon, 02 Jan 2023 15:38:24 +0200 Message-ID: <83pmbx12gf.fsf@gnu.org> References: <87turmhvub.fsf@gnus.org> <87ee1992d5.fsf@gmail.com> <87a6bx8olp.fsf@gmail.com> <877cy5kzhw.fsf@gmail.com> <83wn651543.fsf@gnu.org> <87y1qljc8h.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7175"; mail-complaints-to="usenet@ciao.gmane.io" Cc: matei.alexandru@live.com, 45821@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 02 14:39:24 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pCL2C-0001gP-6J for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Jan 2023 14:39:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCL1r-00036n-0n; Mon, 02 Jan 2023 08:39:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCL1q-00036f-DK for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 08:39:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pCL1q-0006Ie-5H for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 08:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCL1p-0003bl-NF for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 08:39:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Jan 2023 13:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45821 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 45821-submit@debbugs.gnu.org id=B45821.167266670813814 (code B ref 45821); Mon, 02 Jan 2023 13:39:01 +0000 Original-Received: (at 45821) by debbugs.gnu.org; 2 Jan 2023 13:38:28 +0000 Original-Received: from localhost ([127.0.0.1]:42760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCL1H-0003aj-L2 for submit@debbugs.gnu.org; Mon, 02 Jan 2023 08:38:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCL1D-0003aR-DY for 45821@debbugs.gnu.org; Mon, 02 Jan 2023 08:38:26 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCL17-0006E5-Ri; Mon, 02 Jan 2023 08:38:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=PC8QUCE3OzzIXVSUyBACFntDGTh3DqMjZZrH6yVxbCo=; b=r/EpX51yPtgAmAt24JWg KXA6dW1IBpP/I8Bqs3KheCpWZ63QFA6TjEDFs47p/YhoXteVquOP9VsGdhrioVPgKBK/94Rj8lZ2J 23VRcSk27Bd7CnXsu7L87UrsP5Yu6OUv8gkboklOps3aDzrCoGu3z97bl9ZSV6ymdNWgSWo+GKcDB /QMhFazeTs1HsiQzEJZuNyr+F3l2+0bQB3pwFeJInmHxDTxluT1+J/N3IaGNhiyz2sN/itf8dea37 kIA985SW/YTS94FiiOk+k5UQVK5SiRKdLH/iJyrzDsu55kThh40fSXO/n8X4d/rzqcuifRPMXbI7j aRAIFXwDEykVuQ==; Original-Received: from [87.69.77.57] (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 1pCL17-0001NU-CM; Mon, 02 Jan 2023 08:38:17 -0500 In-Reply-To: <87y1qljc8h.fsf@gmail.com> (message from Robert Pluim on Mon, 02 Jan 2023 14:29:50 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252339 Archived-At: > From: Robert Pluim > Cc: matei.alexandru@live.com, 45821@debbugs.gnu.org > Date: Mon, 02 Jan 2023 14:29:50 +0100 > > >>>>> On Mon, 02 Jan 2023 14:41:00 +0200, Eli Zaretskii said: > > >> Cc: "45821@debbugs.gnu.org" <45821@debbugs.gnu.org> > >> From: Robert Pluim > >> Date: Mon, 02 Jan 2023 11:22:03 +0100 > >> > Alex> ❌ Indeed, TLS is broken -> Eww to > >> https://www.gnu.org fails to load the page ( > >> see attached image – Emacs instance on the left, compiled with UDP > >> patch, didn’t load gnu.org while on the right side- default Emacs > >> build for 28.1 opens it without any issues) > >> > >> Yep. Last time I looked at this, the TLS handshaking fails to complete > >> (see src/process.c around line 5329 and the checking against > >> GNUTLS_EMACS_HANDSHAKES_LIMIT) which means weʼre continually retrying > >> the handshake without giving the remote end a chance to send us > >> anything. Which I think means that our state machine for TLS > >> negotiation is subtly incorrect, but only on MS-Windows. > > Eli> On MS-Windows, there's another state machine involved, the one > Eli> vis-a-vis the reader thread we start to read the stuff from the > Eli> network connection. See reader_thread and sys_select in w32proc.c and > Eli> sys_write, sys_read, _sys_read_ahead, _sys_wait_accept, and > Eli> _sys_wait_connect in w32.c. > > Hmm, in that case I then suspect that `sys_select' is indicating that > the socket it connected even when it isnʼt. If that is the case, maybe we lack some flag(s) in the filedesc structure.