emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGPROF + SIGCHLD and igc


From: Pip Cet
Subject: Re: SIGPROF + SIGCHLD and igc
Date: Sat, 28 Dec 2024 20:43:18 +0000

"Helmut Eller" <eller.helmut@gmail.com> writes:

> On Sat, Dec 28 2024, Pip Cet wrote:
>
>>> I think I see what you mean.  I imagine the profiler thread to be a loop
>>> like
>>>
>>>   while (true) {
>>>      sleep (<x-seconds>)
>>>      ArenaEnter (<arena>)
>>>        pthread_kill (SIGPROF, <main-thread>)
>>>        wait (<pipe>)
>>>      ArenaLeave (<arena>)
>>>   }
>>
>> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]