From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: a random backtrace while toying with gdb Date: Sun, 30 Jun 2024 10:16:42 +0000 Message-ID: References: <87bk3jh8bt.fsf@localhost> <86ikxqhhd7.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="37145"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, yantar92@posteo.net, emacs-devel@gnu.org, eller.helmut@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 30 12:35:39 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 1sNruF-0009RF-1H for ged-emacs-devel@m.gmane-mx.org; Sun, 30 Jun 2024 12:35:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNrtt-0003Dm-KX; Sun, 30 Jun 2024 06:35:17 -0400 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 1sNrc5-0007KZ-Uj for emacs-devel@gnu.org; Sun, 30 Jun 2024 06:16:54 -0400 Original-Received: from mail-40134.protonmail.ch ([185.70.40.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNrc1-0004fP-RI; Sun, 30 Jun 2024 06:16:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1719742606; x=1720001806; bh=x0uXw2vn+GV/zAauk1zCkN5FCq9ahFbzCiK05aTtNds=; 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; b=DlLxuaoyDJ/togvlERFwMwuFqwnHq2fkPqHJ3P+dYsaZUKm1DaM5YXM0zegGVVeCs tuh6uYNJhfw1Q6ltpUTZOg4TRAZ+DQDRun+ue1FgA+j7QBw8JZiS6j24qb2oVArrNY 5l9RGbpX9pcq5H0w5soCxYSYSTWsPVnLCcbUTBXJ+brzlZi31B0uKoei6Mdr8tL/8z h8RXQfr712MClYiC2LcZTx5naWjn+dmJEiaepeBy18VrswjxqOWYdi8I7Fr4OuBdAw DfTDYOOEec3lezrWWN54325HMmRj8pysjxI5wheWK2R919z5DO+LF9EvEv3qun/0bT dB0QPRjwW42TA== In-Reply-To: <86ikxqhhd7.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 7051f52e2dba48f89df22f15f032a94714bee7b5 Received-SPF: pass client-ip=185.70.40.134; envelope-from=pipcet@protonmail.com; helo=mail-40134.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_H4=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-Mailman-Approved-At: Sun, 30 Jun 2024 06:35:15 -0400 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:320940 Archived-At: On Sunday, June 30th, 2024 at 10:09, Eli Zaretskii wrote: >=20 >=20 > > Date: Sun, 30 Jun 2024 09:59:17 +0000 >=20 > > From: Pip Cet pipcet@protonmail.com > > Cc: Ihor Radchenko yantar92@posteo.net, emacs-devel@gnu.org, Eli Zarets= kii eliz@gnu.org, eller.helmut@gmail.com > >=20 > > On Saturday, June 29th, 2024 at 21:46, Gerd M=C3=B6llmann gerd.moellman= n@gmail.com wrote: > >=20 > > > Pip Cet pipcet@protonmail.com writes: > > >=20 > > > > On Saturday, June 29th, 2024 at 19:11, Ihor Radchenko yantar92@post= eo.net wrote: > > > >=20 > > > > > I just got this while starting up Emacs on the latest scratch/igc= (with > > > > > native-comp). > > > >=20 > > > > Looks like the same double-signal situation we saw with the profile= r, only this time it's SIGCHLD interrupting an MPS scan. > > > >=20 > > > > Pip > > >=20 > > > Indeed > > >=20 > > > #10 0x0000555555827385 in PSEUDOVECTORP (a=3DXIL(0x7fffeb90875d), cod= e=3D9) at /home/yantar92/Git/emacs/src/lisp.h:1105 > > > #11 PROCESSP (a=3DXIL(0x7fffeb90875d)) at /home/yantar92/Git/emacs/sr= c/process.h:212 > > > #12 XPROCESS (a=3DXIL(0x7fffeb90875d)) at /home/yantar92/Git/emacs/sr= c/process.h:224 > > > #13 handle_child_signal (sig=3Dsig@entry=3D17) at process.c:7660 > > >=20 > > > Someone has an idea what to do with that? And maybe how to reproduce? > >=20 > > We could always "steal" the SIGSEGV handler and reinstall it with a sig= mask (without modifying the MPS source). My guess is that's equivalent to w= hat the macOS code does, essentially, by using a different class of signal = that blocks POSIX signals... >=20 >=20 > And this is less "ugly" (let alone more safe) than using sigblock? > What am I missing? Mostly, I think, the race condition where the barrier is installed (by MPS)= some time before dflt_scan is even called (and, symmetrically, we'd unbloc= k it too early while the barrier is still in effect). IOW, sigblock wouldn'= t work. (I should point out that you've convinced me as far as SIGPROF goes. At lea= st for the initial stage, it makes more sense to count hits in GC (which we= do, with false positives, using the current scratch/igc code) than to dela= y signal processing until GC is over). Unfortunately, I can't reproduce the SIGCHLD problem with Helmut's code, wh= ich doesn't cause a single SIGSEGV here... Pip