From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#45821: Emacs UDP support on Windows Date: Mon, 02 Jan 2023 11:22:03 +0100 Message-ID: <877cy5kzhw.fsf@gmail.com> References: <87turmhvub.fsf@gnus.org> <87ee1992d5.fsf@gmail.com> <87a6bx8olp.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38067"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "45821@debbugs.gnu.org" <45821@debbugs.gnu.org> To: Alex Matei Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 02 11:23:25 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 1pCHyV-0009cG-78 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Jan 2023 11:23:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCHyF-0008WV-Di; Mon, 02 Jan 2023 05:23:07 -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 1pCHyB-0008VH-1m for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 05:23:03 -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 1pCHyA-0006Sj-Py for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 05:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCHyA-0001gr-DT for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 05:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Jan 2023 10:23:02 +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.16726549336420 (code B ref 45821); Mon, 02 Jan 2023 10:23:02 +0000 Original-Received: (at 45821) by debbugs.gnu.org; 2 Jan 2023 10:22:13 +0000 Original-Received: from localhost ([127.0.0.1]:42526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCHxM-0001fT-Ns for submit@debbugs.gnu.org; Mon, 02 Jan 2023 05:22:13 -0500 Original-Received: from mail-wm1-f54.google.com ([209.85.128.54]:37398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCHxL-0001fG-5x for 45821@debbugs.gnu.org; Mon, 02 Jan 2023 05:22:11 -0500 Original-Received: by mail-wm1-f54.google.com with SMTP id bg13-20020a05600c3c8d00b003d9712b29d2so17925411wmb.2 for <45821@debbugs.gnu.org>; Mon, 02 Jan 2023 02:22:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/G1T9vXMOIVbQczdt/dobsbeJsUZICQx9V9vmRa4y4U=; b=PcOkjqX1AAIJ0lUInlZcsupuVG9uNjpHL9inrBFh9b9h2dLiVwA8FOgj83fHBK0Bax cH+hK3VRnRe5xCHTEO1miSYMmH4CnTTINzhon6JxWgxbPtrAl99Jg9Yrqi5Gkizdmj98 1uCOvILfiyXaLbZo9JJ5ihyDcmO5KacrwqJZgYjqCQ2lpX+XoiYmrd17I0YtOgrn0m6d zmbg5/AAkbqzSEThZY0YCkxqNgZoaSvHJSu8Kyn73hZqF8+yunOBkxQJOtKdtJmloa2D PgrKKkxnmculo1C3HvSjwtMnP3PZjgifMU5u8S39VK6bgsMLnAcer+BYbXB9EzzUwdNY lHDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/G1T9vXMOIVbQczdt/dobsbeJsUZICQx9V9vmRa4y4U=; b=Vqlcxss+Z3Tpf+5/J2MC7d9JiAfI+z/Af3sKCHKlOKQnSP2v8TCo0oj5DoXBGuLHKU 7Fzyqu/NJdphqaxjOB8ryaqWyQq+YhWtTHIEVWsSskIpvFy6oWMcZ8Vxn+zcEb45KUY2 epAS3CpZmuwWf4Se4HPXh+aTeu9UQeFQYbsBDf5w0lKGTwIWGrj7TBcmqlht1QAWWG/f tmHWvsm57r1VqMIo/1Dsw1B6geutUu69eDDuRAUZANPLAnP0zxA4y24NvOok7FhTLlpT QxiHJ0Yk7FPKG08tPiBFmo/FozB59Cdj+6GVNub2v7y20RPK+RrjyUTjEcNzBgfLwgw/ Rqag== X-Gm-Message-State: AFqh2ko3dLe2X5tlCzkSnOta8uTaEOihzzKuRebQoNsFCtPgq//sc6DN tzmhEyif6DbXzv8jK6SFTgCdh226V2s= X-Google-Smtp-Source: AMrXdXsIfwxa4VuqLzFlP21t6wfXM9Ix72Rc8E+4HybymCCBu41FZTa3S93hsU0QpOd4a2vH1ckaGg== X-Received: by 2002:a05:600c:1e8c:b0:3d6:2952:679b with SMTP id be12-20020a05600c1e8c00b003d62952679bmr28477966wmb.34.1672654924794; Mon, 02 Jan 2023 02:22:04 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id az27-20020a05600c601b00b003c65c9a36dfsm37564126wmb.48.2023.01.02.02.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Jan 2023 02:22:04 -0800 (PST) In-Reply-To: (Alex Matei's message of "Mon, 2 Jan 2023 00:47:12 +0000") 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:252320 Archived-At: >>>>> On Mon, 2 Jan 2023 00:47:12 +0000, Alex Matei said: Alex> Updates on the UDP patch behavior: Alex> * I got confused during my validation by 2 things: Alex> * =E2=80=98dns-query=E2=80=99 works even without your patc= h changes Alex> =3D> it is not a good test =E2=9D=8C `dns-query' by default uses TCP on MS-Windows when there=CA=BCs no UDP support. You can use it, but you=CA=BCd have to either instrument it or check your network traffic using wireshark or similar. Alex> * One test that worked for me was using =E2=80=98(make-= network-process :name "udp-socket1" :remote '[127 0 0 1 1500] :type 'datagr= am)=E2=80=99 Alex> * If returns =E2=80=98(error "Unsupported connection= type")=E2=80=99 if UDP is disabled =E2=9D=8C , or the process if UDP is al= lowed=E2=9C=85 (featurep 'make-network-process '(:type datagram)) is the canonical way to check that. And it only proves you can create UDP sockets, not that they work =F0=9F=98=89 Alex> * The original patch doesn=E2=80=99t include the #define f= or =E2=80=98WORKING_SELECT_EMULATION=E2=80=99, and I had to manually add th= is define to my emacs build (via 'CFLAGS=3D -O0 -g3 -DWORKING_SELECT_EMULAT= ION' ) Alex> * That=E2=80=99s why I got confused about the patch wor= king initially , since my assumption was that if =E2=80=98dns-query=E2=80= =99 works =3D> UDP works as expected=F0=9F=98=89and I didn=E2=80=99t even c= onsider that I was required to set up some more flags.. Alex> =E2=9D=8C Indeed, TLS is broken -> Eww to https://www.gnu.org fails to load the page ( see attached image =E2=80=93 Em= acs instance on the left, compiled with UDP patch, didn=E2=80=99t 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=CA=BCre 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. Robert --=20