From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: igc, macOS avoiding signals Date: Mon, 30 Dec 2024 15:59:08 +0100 Message-ID: <874j2lmd37.fsf@gmail.com> References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <87h66loc17.fsf@gmail.com> <878qrxoayj.fsf@gmail.com> <8734i5o6wc.fsf@gmail.com> <87cyh9mpn5.fsf@gmail.com> <874j2l1hei.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40756"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Gerd =?utf-8?Q?M=C3=B6llmann?= , Eli Zaretskii , spd@toadstyle.org, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 30 15:59:51 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 1tSHFH-000AWC-5H for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Dec 2024 15:59:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSHEt-0000Pw-EH; Mon, 30 Dec 2024 09:59:27 -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 1tSHEg-0000OB-0j for emacs-devel@gnu.org; Mon, 30 Dec 2024 09:59:14 -0500 Original-Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSHEe-0006OH-0r; Mon, 30 Dec 2024 09:59:13 -0500 Original-Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5d0ac27b412so12234453a12.1; Mon, 30 Dec 2024 06:59:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735570750; x=1736175550; darn=gnu.org; h=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=GrMEPNDXadeuM7AFh5k1RnisWeoNQimYU7IWROHQbaw=; b=alMMiVkNqgCQ4lfAlNy1EDRJMNFL0+Wz6TPcg7t/5P19JnQa+Y2YGpqv6igFeCiKOK Jtf9WsWtuQf8/LA7c7xX7GM7hbNrUUoMcinT/iM3FpAsT8O+ghv8Ib5bPKY+COQP9J8B sR1lRHYJ7BZ83OU1Xlp+2kC0/2gWF64VdS8in8KAo+ka3sJB2XbEbedmfdSVoZILYpJX 3gg0J29NIC2DxQNkT/WcyVXIdhBg8U4HZ8zFqlCFChIVTARfmIZYMwllpNUEyfyhfBM3 FnTBLFPCW1qtVzrYC1ws8qWYsK53R1nuo/USEDZvLdICZiHedV23FOvXhvXcq1tYpvPO 8jDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735570750; x=1736175550; h=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=GrMEPNDXadeuM7AFh5k1RnisWeoNQimYU7IWROHQbaw=; b=Sef9WtlPPjIZMQGKU2SvYGjy2zsN7v85PyHnPu1O3PT+5YNLspGEuYLxKb2cmPTlFh k0AUQJRhiOPZSyJjb8jZgG/N6d1/I+7LIx2P7B0TPFtFBUuO08dVTo6eM4s/h+asB3F7 MeUOnK94dA17nSKZMPDsBvNm+rX/zvYJIfucIEURIx6W0e60y7Wawbd5HqsclEBHyOhx Tud/ve8PF/xM3SRBekZDKVtvmOl9rOwVBcFqC6+crzKgdQG7osodGAPad7BjXrUdT3d7 ylWDP79cLky4otanAdVjDi8fqjEs1yS4slrMvu8SApvcpKHIT079kvyKEX4vc0xDlOqx HJAA== X-Forwarded-Encrypted: i=1; AJvYcCU4ov9LwQNJIW9uNgFlsNWU1Sav5S9CEMWKwa+fj+nQDg9/uFHQCCTAFrWBU4dwTDWTbgwuDtJg373HXx4=@gnu.org, AJvYcCW9gzasSQASQcrfDjL1gbtiyLYHj+pBfMv6l8nFBjG0Fz4c+mCEChhMazrSgfD6KIcoeb1J@gnu.org X-Gm-Message-State: AOJu0Yz/GWTdx6thPh6Xzdp+FX6yuk1bSWuizr+UPLKLbC1FK0TZ1tZe 2UrfE5UAJ6EI8gsI9pBLQKjI9WVEUfytcBo4iZQJ+B1gvttxV0wE6U0lMhu1 X-Gm-Gg: ASbGnctsCP5D6wpFz1PUj2QKZ+p2MWjN8PSV1avo0ol9Wn4Bh4MhKsacXJ8iyc0+iXZ JGgeQFV9JfqsLiaryaLM0M8dHf0no4WdM4Iixc6YHrLPQ6lFj+3q4mogLVtqGs9MScR2HsuJilF deNwNdj80I8Mgx66wE1BCrNZCgNrd7wIn+17u3l6x3FVdE653WteZ+DW19RlSdPPvrlolv9l1M/ 5yCF6lTM0JyRdjOIPsRkSBaEcN2ScZZrTaf7hnrb7yiJVihDwXouJQ= X-Google-Smtp-Source: AGHT+IFgZc/dcvpz9r9aHhRnp0o9EVzow4P8+f+2Vjevwm7a9ofcGh54rE+2+ZWmoslOz6Dub6HZvw== X-Received: by 2002:a05:6402:430f:b0:5d1:2631:b88a with SMTP id 4fb4d7f45d1cf-5d81ddacf87mr25179090a12.17.1735570749643; Mon, 30 Dec 2024 06:59:09 -0800 (PST) Original-Received: from caladan ([31.177.115.143]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d806fedca8sm15178484a12.61.2024.12.30.06.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 06:59:09 -0800 (PST) In-Reply-To: <874j2l1hei.fsf@protonmail.com> (Pip Cet's message of "Mon, 30 Dec 2024 12:32:31 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=eller.helmut@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327434 Archived-At: On Mon, Dec 30 2024, Pip Cet wrote: > "Helmut Eller" writes: >> Very few of Emacs' signal handlers actually touch a barrier. I've also > > Indeed. These crashes are rare in typical usage, which doesn't mean we > should delay fixing them until Emacs is "unstable enough". It already > is, IMHO, because we take that approach too frequently. > >> not seen any reproducable receipes for the "signal issues" that the igc >> branch supposedly has. > > Removing the SIGPROF protection code should allow Ihor's recipe to crash > again. Talking about SIGPROF protection code. It appears to me now (again) that, for the SIGPROF handler, this pseudo code if (mps_arena_busy ()) plog->gc_count = saturated_add (plog->gc_count, count); else record_backtrace (plog, count); is safe. If we don't hold the lock, then mps_arena_busy returns false and we can access memory. We are safe even if another thread has claimed the lock by the time that we reach record_backtrace: the SIGPROF handler will just block until the lock is released. Does somebody disagree? Helmut