Re: PG signal handler and non-reentrant malloc/free calls

From: Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG signal handler and non-reentrant malloc/free calls
Date: 2011-03-01 23:30:07
Message-ID: AANLkTi=CVrgOD8JKBo6=xKyOW7OTLvUW67rckS2o-_AH@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2011-03-01 23:42:34 Re: PG signal handler and non-reentrant malloc/free calls
Previous Message Simon Riggs 2011-03-01 22:56:39 Re: wrapping up this CommitFest (was Re: knngist - 0.8)