unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: Pip Cet <pipcet@protonmail.com>
Cc: Eval EXEC <execvy@gmail.com>,  emacs-devel@gnu.org
Subject: Re: 31.0.50; Emacs scratch/igc 6682d0e6c96 Crash on Linux, wayland
Date: Wed, 04 Sep 2024 17:15:26 +0200	[thread overview]
Message-ID: <871q1z4fht.fsf@gmail.com> (raw)
In-Reply-To: <87ed5z7d1v.fsf@protonmail.com> (Pip Cet's message of "Wed, 04 Sep 2024 13:40:02 +0000")

On Wed, Sep 04 2024, Pip Cet wrote:
>> #0  0x00000000006dfe09 in record_backtrace.lto_priv ()
>> #1  0x00000000006e03df in deliver_profiler_signal ()
>> #2  <signal handler called>
>> #3  0x00000000007dea30 in sigHandle ()
>> #4  <signal handler called>
>
> That looks like the SIGPROF hit at a very bad time, after sigHandle was
> called but before it had time to lock the arena, which would have
> stopped the profiler handler from accessing memory.

If sigHandle hasn't acquired the lock, then accessing memory by the
profiler should trigger another SIGSEGV and a nested call to sigHandle
should then be able to acquire the lock.

Looking at the code of ArenaAccess, it seems that there are two locks
involved: a global lock and an arena lock.  And igc_busy_p only checks
the arena lock.  Hmm.

> Helmut, do you have any ideas?

I think it would work, if we could check the global lock instead for the
arena lock.  Unfortunately, MPS offers no public function for that.

> Maybe we'll have to add SIGPROF to the
> SIGSEGV sa_mask after all and explicitly unblock it in the handler after
> setting a "just count this" flag?

That would probably also work. 



      parent reply	other threads:[~2024-09-04 15:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 19:13 31.0.50; Emacs scratch/igc 6682d0e6c96 Crash on Linux, wayland Eval EXEC
2024-09-04 11:52 ` Eli Zaretskii
2024-09-04 12:21   ` Eval EXEC
2024-09-04 13:40 ` Pip Cet
2024-09-04 14:25   ` Eli Zaretskii
2024-09-04 15:15   ` Helmut Eller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q1z4fht.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=execvy@gmail.com \
    --cc=pipcet@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).