[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 31.0.50; Emacs scratch/igc 6682d0e6c96 Crash on Linux, wayland
From: |
Helmut Eller |
Subject: |
Re: 31.0.50; Emacs scratch/igc 6682d0e6c96 Crash on Linux, wayland |
Date: |
Wed, 04 Sep 2024 17:15:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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.