From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: SIGPROF + SIGCHLD and igc Date: Sat, 28 Dec 2024 20:43:18 +0000 Message-ID: <87bjwvedzn.fsf@protonmail.com> References: <87o713wwsi.fsf@telefonica.net> <87ed1t6r34.fsf@gmail.com> <875xn46s6z.fsf@gmail.com> <86bjwwulnc.fsf@gnu.org> <877c7jlxsu.fsf@gmail.com> <86frm7sx4d.fsf@gnu.org> <87a5cfoivh.fsf@gmail.com> <87r05reh9t.fsf@protonmail.com> <87msgfmvrp.fsf@gmail.com> Reply-To: Pip Cet 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="30917"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , gerd.moellmann@gmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, acorallo@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 29 06:39:13 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 1tRm1A-0007pj-9o for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Dec 2024 06:39:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRm0I-0004BY-1K; Sun, 29 Dec 2024 00:38: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 1tRdef-0007Vp-Ul for emacs-devel@gnu.org; Sat, 28 Dec 2024 15:43:25 -0500 Original-Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRdee-0004Bb-Du for emacs-devel@gnu.org; Sat, 28 Dec 2024 15:43:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735418602; x=1735677802; bh=I5/BPmJGZc8jJ0LpZkSxj1sDTiED0k/mDXYdfnuRh5c=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=rSfz5Bq1qlvkSwLTquS2NUbbxqGoGKCw8TpBg9Dx3sbLi9onB95wQxwuNr6wLBXWB RLHtCWKzqpnYKyYctx3TQN8BFDpnd+/Riu4Lv2XOAg27xZ2/kvDgAQP0Cmryt4Dfba YpGIu7jTKXDczqCjhxPkh5FqXEx9/8YwfG4ni1JzS/zesvNhXB6iTCewGKVXVQWlSG u9kISquZBf3cYOtbLboFdKH04y6Os6Nm7Qsuv9+f/k+klXxDAVKalKzrqXSlpi2jCt EzltXlNdRX9CGY0UalRi7+SBGs95tT6RqtLP5C+T2DKVnNbeX9RDVFEnhyRxm6V3Xj 0FogEwPcGnvLw== In-Reply-To: <87msgfmvrp.fsf@gmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: fb66ea2c4be86235a3b9db4c4b2ab9cbf462397a Received-SPF: pass client-ip=185.70.43.16; envelope-from=pipcet@protonmail.com; helo=mail-4316.protonmail.ch 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 29 Dec 2024 00:38:16 -0500 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:327307 Archived-At: "Helmut Eller" writes: > On Sat, Dec 28 2024, Pip Cet wrote: > >>> I think I see what you mean. I imagine the profiler thread to be a loo= p >>> like >>> >>> while (true) { >>> sleep () >>> ArenaEnter () >>> pthread_kill (SIGPROF, ) >>> wait () >>> ArenaLeave () >>> } >> >> I'm not really following. Did you mean to include a call to a "clear >> all memory barriers" function after the ArenaEnter call? If not, the >> SIGPROF handler (and all handlers interrupting the SIGPROF handler which >> aren't being delayed) would not be able to access MPS memory, which I >> thought was the goal. > > In my mind it works like this: when the SIGPROF handler tries to access > MPS memory, the SIGSEGV handler kicks in as it usually would in a > non-signal handler context. This should work because at the beginning > of the SIGPROF handler we guarantee that MPS doesn't hold the arena > lock. Sorry, still not following. The SIGPROF-sending thread holds the arena lock. So we can't take it in the SIGSEGV handler. It's still a deadlock, right? Pip