Re: PL/R Median Busts Commit (Postgres 9.1.6 + plr 8.3.0.13 on Ubuntu 12.10 64 bit)

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org, Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: PL/R Median Busts Commit (Postgres 9.1.6 + plr 8.3.0.13 on Ubuntu 12.10 64 bit)
Date: 2013-01-28 21:29:04
Message-ID: 5106EDA0.4050307@catalyst.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 25/01/13 13:56, Mark Kirkwood wrote:
> On 25/01/13 13:49, Tom Lane wrote:
>> Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz> writes:
>>> On 25/01/13 13:06, Tom Lane wrote:
>>>> Unless libR can be coerced into not screwing up our signal handlers,
>>>> I'd say that PL/R is broken beyond repair. That would be unfortunate.
>>
>>> It looks like Joe has run into something similar with libR stealing
>>> SIGINT, he reinstalls it. A simple patch along the same lines for
>>> SIGUSR1 (attached) seems to fix the issue.
>>
>> This certainly is not good enough, for either signal. What happens if
>> the signal arrives while libR still has control? These things being
>> asynchronous with respect to the receiving backend, we certainly can't
>> assume that that won't happen.
>>
>> Why does libR think it should be messing with these handlers in the
>> first place?
>>
>>
>
> Agreed - I will see if I can work out why.
>

Looking at the R source (which reminds me of Postgres, nice, clear
code...), I saw quite a bit of code involving signal handlers - and
nothing along the lines of "don't set them up if you are in embedded
mode". So clearly more investigation is needed, and we really need to
take this up on the R mailing list I think. Joe - is this something you
would like to do? I am happy do it, but my knowledge of R is measured in
hours...

Cheers

Mark

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2013-01-28 22:37:24 Re: Re: BUG #7748: "drop owned by" fails with error message: "unrecognized object class: 1262"
Previous Message Tom Lane 2013-01-28 20:04:59 Re: Re: BUG #7748: "drop owned by" fails with error message: "unrecognized object class: 1262"