Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Hannu Krosing <hannu(at)krosing(dot)net>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https
Date: 2011-08-06 18:37:28
Message-ID: CAFaPBrRUU9MSqwfeseKL5fzQjsT-FPDPc64mJfcCvLMaoBHHMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 5, 2011 at 08:53, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 08/04/2011 11:23 PM, Alex Hunsaker wrote:
>>
>> [ ... don't let people set signal handlers postgres sets ]
>
> This whole thing is a massive over-reaction to a problem we almost certainly
> know how to fix fairly simply and relatively painlessly, and attempts
> (unsuccessfully, at least insofar as comprehensiveness is concerned) to fix
> a problem nobody's actually reported having AFAIK.

*shrug* OK.

Find attached a version that does the equivalent of local %SIG for
each pl/perl(u) call. I was only able to test on 5.14.1, but I looked
at 5.8.9 to make sure it looks like it works.

Its a tad slower (something like 0.00037ms per call), but uhh thats
quite acceptable IMHO (best of 5 runs):

=> create or replace function simple() returns void as $$ $$ language plperl;
CREATE FUNCTION

-- pre patch
=> select count(simple()) from generate_series(1, 10000000);
Time: 10219.149 ms

-- patched
=> select count(simple()) from generate_series(1, 10000000);
Time: 13924.025 ms

Thoughts?

Attachment Content-Type Size
plperl_local_sig.patch text/x-patch 2.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-08-06 18:58:07 Re: Further news on Clang - spurious warnings
Previous Message Dimitri Fontaine 2011-08-06 18:29:56 Re: Transient plans versus the SPI API