From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Some experience with the igc branch Date: Wed, 25 Dec 2024 13:54:58 +0100 Message-ID: References: <87o713wwsi.fsf@telefonica.net> <864j2u442i.fsf@gnu.org> <87ldw6as5f.fsf@protonmail.com> <86o7112rnq.fsf@gnu.org> <867c7p2nz4.fsf@gnu.org> <87y104aih6.fsf@protonmail.com> <86ikr80wrm.fsf@gnu.org> 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="2043"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: pipcet@protonmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 25 13:55:22 2024 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 1tQQv3-0000H5-Vs for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Dec 2024 13:55:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQQup-0000Fc-IO; Wed, 25 Dec 2024 07:55: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 1tQQun-0000ED-Vj for emacs-devel@gnu.org; Wed, 25 Dec 2024 07:55:05 -0500 Original-Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQQul-0005ew-2N; Wed, 25 Dec 2024 07:55:05 -0500 Original-Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-aa684b6d9c7so1036341866b.2; Wed, 25 Dec 2024 04:55:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735131300; x=1735736100; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=m7GNtDq0maqvZr8K0eGRlwByW67DDefFG9GQ/h2mpIY=; b=RbZghidSXZ3xGc8QnB+fMAN1AJLoTdza2ye3UL9zkYAlo2r2A2AJQupKOo34jUTPpw 1YdCqZyRxVjtIcfZHjpygLvAe2BCk+J0fid8inI8Ru6v4LLQJMUQQLtiDXrlxc7JQ//z TNfF9a/oCxqhG4yFd4YcsPbqP9gaXRoxQeLZa61nu1K6Jl7svSyymbvFxst95OMr4M/P 2m8AWldZVkTumsGwoJDRA7utp3Fb3r3fFPivNIHdtUmVBJ3gbbnQ9tcbXNP3V1Xqxesz 0gGy7zPrEK8ASN5A77Yky8uigfEPb7UdIJsI9V2yDeAP8mE3ayDMbfZ8QpXmUGnFz7Tc MEUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735131300; x=1735736100; h=content-transfer-encoding:mime-version:user-agent: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=m7GNtDq0maqvZr8K0eGRlwByW67DDefFG9GQ/h2mpIY=; b=MbRErdxDXb8cvPIdyZlrXiGw9C6COWe9WZmiGmyiprdqxe1HLMf8XC/jKww4lBv/wa rFNNYuivYNqDNqeRpltapSxjg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0:aa6:93c4:c685 with SMTP id a640c23a62f3a-aac2b946474mr1720640566b.23.1735131299728; Wed, 25 Dec 2024 04:54:59 -0800 (PST) Original-Received: from pro2 (p200300e0b73d6f00401d1c7c2fc22e2d.dip0.t-ipconnect.de. [2003:e0:b73d:6f00:401d:1c7c:2fc2:2e2d]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e894781sm785819066b.44.2024.12.25.04.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Dec 2024 04:54:59 -0800 (PST) In-Reply-To: <86ikr80wrm.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Dec 2024 14:31:25 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x62f.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327085 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: Eli Zaretskii , ofv@wanadoo.es, emacs-devel@gnu.org, >> eller.helmut@gmail.com, acorallo@gnu.org >> Date: Wed, 25 Dec 2024 06:23:49 +0100 >>=20 >> > If they don't have separate stacks, and we interrupt MPS, the signal >> > handler cannot look at any MPS-modifiable memory (including roots, whi= ch >> > may be in an inconsistent state mid-GC), ever. This includes the >> > specpdl. We can't write to MPS-known memory, ever. This includes any >> > area we might want to copy the backtrace or specpdl to. >>=20 >> And I don't think that's right :-). It's completely right that in the >> SIGPROF handler everything can be inconsistent. That's true both for MPS >> and Emacs. For example, the bindings stack (specpdl) may be inconsistent >> when SIGPROF arrives. > > Theoretically, maybe. But in practice, you'd need to identify the > code which manipulates specpdl that could have specpdl in inconsistent > state if interrupted at some opportune point. Can you identify such > places in the code? Which is basically what I answered to Helmut in another sub-thread. ... >> For me, it's not about a theoretical or even practical solution that >> somehow ensures a consistent state in MPS, or some future changes in MPS >> or something. It's about getting away with what we do in the profiler >> _now_, as we do with the old GC. which is already seeing potentially >> inconsistent state in Emacs' memory. > > See above: there's a difference. So I would really like to hear why > you think accessing specpdl from a SIGPROF handler in an igc build is > safe. I tried to answer your questions in a different reply sent a few minutes ago.