From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Saulius Menkevicius Newsgroups: gmane.emacs.devel Subject: Re: master 2c79a8f 2/2: Use posix_spawn if possible. Date: Tue, 25 Jan 2022 10:58:51 +0200 Message-ID: References: <7CFD5E28-8266-4004-BF66-255146D72722@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31544"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cc: p.stephani2@gmail.com, alan@idiocy.org, mituharu@math.s.chiba-u.ac.jp To: Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 25 10:02:28 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nCHib-0007vB-U1 for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jan 2022 10:02:27 +0100 Original-Received: from localhost ([::1]:39258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCHia-0005pE-O6 for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jan 2022 04:02:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCHfH-0003UE-2U for emacs-devel@gnu.org; Tue, 25 Jan 2022 03:59:00 -0500 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:39359) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCHfF-0008Fd-2k; Tue, 25 Jan 2022 03:58:58 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 8B8E93202135; Tue, 25 Jan 2022 03:58:54 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 25 Jan 2022 03:58:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; bh=cOZvMHbaw1BN4d rUb+QfdUBnLX2M9vEvF8Q6sJaKiaA=; b=OpOaPNycoga+xe+w/Cd4/HFLOe5Ghz ImLJgem9CnZNsyWgrWiS3d3jGp9pOWf8C7lK+tVrQAjNe01Kb5JmJEovCYaWLpyx e5Qs6HFAuflCIRuOe92IU1Ebkaktb4tgQK6ayHY/Lc0ZHHkVuhsGDrrYflhRFAf2 aXvC+SHxX4/yqmk/xkySZplaBpBAyVv6jvtBMQM1YSO7PITVGAHBSZZoSOpwyP7G PgvCC7HOY8BxuVJPICd/Nbu85NJoPvANCBfTMZrmEvlZJan9hfHB2OhD/KcXeNEx 85nnYvsD8E9DkGlcvCMQtb5w1S60ceZXEmIquRC2agawBFf4PnZSteqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=cOZvMHbaw1BN4drUb+QfdUBnLX2M9vEvF8Q6sJaKi aA=; b=S5gGjZAtxkJCFGxleIpz3xYDVXSAcIeFMQndHOyphCSr2SEd6jAWTJcZg i5gl9JjIPYPir+9F9fRFfahAevVXJAKMj5hYoct7jE4R4wYQSA+qRwu8wkqfjlZK tvnpcrtT6+6Xcx5vf/uELmx0o/3RpZTssVuwz8NhTj3TuDE+/Va9PpFTxJi2qt7f upFu5CkWfURzlMUU1+WiaPOPG4J1sMtn4lJImt0p+q06M6OakrDl2PJ0C5hNEyXr UEUeSJInaML73/WBrgYY63zgGa6e2CN/gGPW+u3mxb//Dximzo9S/GGHSTLBVMsJ CNyBf1SokSFNHT4CGQuefntgo9JKA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdekgdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepufgruhhl ihhushcuofgvnhhkvghvihgtihhushcuoehsrghulhhiuhhsmhgvnhhkvghvihgtihhush esfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpeffhfdtudekgeethfeg kefgjeejgfetjefhveekvdffgfffhfffgeffleduteekudenucffohhmrghinhepghhith hhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepshgruhhlihhushhmvghnkhgvvhhitghiuhhssehfrghsthhmrghilhdrtghomh X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Jan 2022 03:58:52 -0500 (EST) Content-Language: en-US In-Reply-To: <7CFD5E28-8266-4004-BF66-255146D72722@gnu.org> Received-SPF: pass client-ip=64.147.123.25; envelope-from=sauliusmenkevicius@fastmail.com; helo=wout2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:285346 Archived-At: Sorry I did not mention the platform, this happens on Linux/x64 and has been reported by multiple persons: - https://github.com/razzmatazz/csharp-language-server/issues/12 The issue has been noticed when dotnet-based LSP servers are used with emacs/lsp-mode, -- in particular lsp-mode starts the server using `make-process` and then communicates over stdio. Link to the code that launches the server: - https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L6925 We have csharp-ls and fsac servers launched with the same mechanism as are for other languages -- which are working ok with posix_spawn enabled. It only breaks for those before-mentioned LSP servers that are implemented on top of dotnet and use dotnet runtime (same thing as JVM, but for C#/F#/CLR languages). Now it appears, that switch to posix_spawn broke communication over stdio to those dotnet-based LSP servers for some technical reason, -- I didn't investigate yet why, because it is a bit over my head. I *think* there is an interplay between posix_spawn-based process launch implementation in emacs and dotnet runtime stdio abstractions/platform layer -- because otherwise other language servers work with that commit that enables posix_spawn, like those based on JVM too. I know this is a bit of a corner case as posix_spawn brings performance benefits, but just FYI. BR, -Saulius Menkevicius Am 25.01.22 um 10:41 schrieb Eli Zaretskii: > On January 25, 2022 8:48:12 AM GMT+02:00, Saulius Menkevicius wrote: >> Hi, >> >> I know this has been merged a couple of months ago to `master` but I >> would like to report breakage that occurs due to that commit. >> >> We have csharp-ls (C#) and fsautocomplete (F#) LSP servers that stopped >> working with that commit (git-bisected to >> a60053f8368e058229721f1bf1567c2b1676b239). >> >> I did not delve too much into the details or prepare a minimal test case >> but this appears to be an interplay between dotnet runtime (v6) and >> posix_spawn. >> >> Not sure if that warrants a revert but just a heads-up. > Can you explain how dotnet runtime comes into play here? Does Emacs invoke a dotnet process or something? > > And on what OS does this happen?