Re: PG signal handler and non-reentrant malloc/free calls - Mailing list pgsql-hackers

From Nikhil Sontakke
Subject Re: PG signal handler and non-reentrant malloc/free calls
Date
Msg-id AANLkTi=CVrgOD8JKBo6=xKyOW7OTLvUW67rckS2o-_AH@mail.gmail.com
Whole thread Raw
In response to Re: PG signal handler and non-reentrant malloc/free calls  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>
> No, the question is why is the ImmediateInterruptOK flag set.  Whether
> the interrupt actually happens isn't that relevant.  You could try
> setting a watchpoint on the flag variable.
>
>> But adding hold/resume interrrupts in mcxt.c (not aset.c, since we
>> want to be agnostic to the underlying layer) should be good enough to
>> handle this non-re-entrant issue, no?
>
> We are not doing that, because that would be only a band-aid patch for
> approximately 0.1% of the problems that can arise from running random
> code with ImmediateInterruptOK set.  We need to find out what's leaving
> that set and fix it.
>

Got it. Thanks Tom and Heikki. Will investigate this further.

@Andres Apologies all. I should have mentioned upfront that this is
occurring on 8.3.13, with some custom modifications done, but probably
not in this area..

Regards,
Nikhils


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: wrapping up this CommitFest (was Re: knngist - 0.8)
Next
From: Greg Stark
Date:
Subject: Re: PG signal handler and non-reentrant malloc/free calls