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: igc, macOS avoiding signals Date: Tue, 31 Dec 2024 16:05:09 +0100 Message-ID: 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> <874j2lmd37.fsf@gmail.com> <87msgdkt29.fsf@gmail.com> <86h66lnjrt.fsf@gnu.org> <868qrxnfrw.fsf@gnu.org> <87a5ccl2zx.fsf@gmail.com> <86msgcm1nm.fsf@gnu.org> <86a5cclyfy.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="36555"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eller.helmut@gmail.com, pipcet@protonmail.com, spd@toadstyle.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 31 16:05:58 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 1tSdok-0009L3-04 for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Dec 2024 16:05:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSdo6-0002Kk-LN; Tue, 31 Dec 2024 10:05:18 -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 1tSdo5-0002KL-AW for emacs-devel@gnu.org; Tue, 31 Dec 2024 10:05:17 -0500 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSdo3-00016c-GC; Tue, 31 Dec 2024 10:05:17 -0500 Original-Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-385e2880606so7429982f8f.3; Tue, 31 Dec 2024 07:05:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735657511; x=1736262311; 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=Kev6WTXQOcJJifR2eg5woSMChxKU14xLj7p16gUD0G4=; b=BjyEyB2YcOeqNceAOgRZkVD7kTv0n5X0HtAJ34Anb+/+AjkGyeRnwmuXegH3nZQZoT +ef4dL3Y/keMe36FEGNcJRP/+To5TswY1fFxK6MUgdx1FJhVP6la11xX4LekL40ehLmh QL3PVPXBDYCmKArgsx+cswbjPyHWTCeYarPRBHL0ZfktAyAxYGunmvmc7W9mQw+yiU8d lnXYkT9yCKHsebjR6osx7edOoJU6bY4Eezk2UVR2X8FS4HyRE0VP6YSUT4hNQvlWMn+J XBvcQM52P2dDVqqagvDK8ct0Bs+XUU7zgZWlBt6mUsvd1NsZ4zfmAPMRb+zlh4ZZbSOs eZYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735657511; x=1736262311; 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=Kev6WTXQOcJJifR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4ydSfA== X-Received: by 2002:a05:6000:156f:b0:385:fd31:ca23 with SMTP id ffacd0b85a97d-38a223f8302mr37608995f8f.40.1735657510952; Tue, 31 Dec 2024 07:05:10 -0800 (PST) Original-Received: from pro2 (p200300e0b7216c0021e5e367c6afc189.dip0.t-ipconnect.de. [2003:e0:b721:6c00:21e5:e367:c6af:c189]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e894f2esm1607903766b.69.2024.12.31.07.05.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 07:05:10 -0800 (PST) In-Reply-To: <86a5cclyfy.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 31 Dec 2024 16:27:45 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=gerd.moellmann@gmail.com; helo=mail-wr1-x430.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:327521 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: eller.helmut@gmail.com, pipcet@protonmail.com, spd@toadstyle.org, >> emacs-devel@gnu.org >> Date: Tue, 31 Dec 2024 15:15:04 +0100 >>=20 >> Eli Zaretskii writes: >>=20 >> > If the problem is other signals in [t1, t2], we could install the >> > signal handler in a way that masks all other signals while the handler >> > runs. >>=20 >> That would be necessary, but there's another thing Helmut pointed out. >> At t0, when we enter the SIGPROF handler, we may have interrupted >> pthread code in the Emacs thread, so pthread may currently be in an >> inconsistent state. > > If that really can happen, then pthreads is more fragile than I hoped. > I hoped they don't let signals interrupt them when they are in > critical sections like that. Are we sure this danger is real? I'm not a pthread expert. I don't know. >> I'd like to instead revive the idea of getting the backtrace in the >> signal handler and doing anything else elsewhere. > > If it works, sure. But I thought copying the data had the same > problems as accessing it from the handler? Copying Lisp_Object around is not a problem, AFAIK (only saying that because I'm getting cautious). >> Maybe, after reading igc.org, that is acceptable maintenance-wise? > > Can you show a patch? We haven't talked about what to do the sample after get_backtrace yet. And I'm not sure if you accept the approach now or not, TBH. If that's not the case, we can stop here and save time.