Re: [HACKERS] plperl sigfpe reset can crash the server

2012-09-05 Thread Tom Lane
Andres Freund writes: > On Wednesday, September 05, 2012 07:15:52 PM Tom Lane wrote: >> OK. Do we want to commit this now, or wait till after 9.2.0? >> My feeling is it's probably okay to include in 9.2.0, but I can see >> that somebody might want to argue not to. Any objections out there? > Pe

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-09-05 Thread Andres Freund
On Wednesday, September 05, 2012 07:15:52 PM Tom Lane wrote: > Andres Freund writes: > > On Sunday, August 26, 2012 06:10:02 PM Andres Freund wrote: > >> On Saturday, August 25, 2012 06:38:09 AM Tom Lane wrote: > >>> Surely that's breaking perl's expectations, to more or less the same > >>> degree

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-09-05 Thread Tom Lane
Andres Freund writes: > On Sunday, August 26, 2012 06:10:02 PM Andres Freund wrote: >> On Saturday, August 25, 2012 06:38:09 AM Tom Lane wrote: >>> Surely that's breaking perl's expectations, to more or less the same >>> degree they're breaking ours? >> In the referenced bug they agree that this

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-09-05 Thread Andres Freund
On Sunday, August 26, 2012 06:10:02 PM Andres Freund wrote: > On Saturday, August 25, 2012 06:38:09 AM Tom Lane wrote: > > Andres Freund writes: > > > Doing a pqsignal(SIGFPE, FloatExceptionHandler) after PERL_SYS_INIT3 > > > seems to work. Is that acceptable? > > > > Surely that's breaking perl'

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-26 Thread Andres Freund
On Saturday, August 25, 2012 06:38:09 AM Tom Lane wrote: > Andres Freund writes: > > Doing a pqsignal(SIGFPE, FloatExceptionHandler) after PERL_SYS_INIT3 > > seems to work. Is that acceptable? > > Surely that's breaking perl's expectations, to more or less the same > degree they're breaking ours?

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-24 Thread Andres Freund
On Saturday, August 25, 2012 06:38:09 AM Tom Lane wrote: > Andres Freund writes: > > Doing a pqsignal(SIGFPE, FloatExceptionHandler) after PERL_SYS_INIT3 > > seems to work. Is that acceptable? > > Surely that's breaking perl's expectations, to more or less the same > degree they're breaking ours?

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-24 Thread Tom Lane
Andres Freund writes: > Doing a pqsignal(SIGFPE, FloatExceptionHandler) after PERL_SYS_INIT3 seems to > work. Is that acceptable? Surely that's breaking perl's expectations, to more or less the same degree they're breaking ours? regards, tom lane -- Sent via pgsql-hack

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-24 Thread Andres Freund
On Saturday, August 25, 2012 12:15:00 AM Alex Hunsaker wrote: > On Fri, Aug 24, 2012 at 4:10 PM, Andres Freund wrote: > > We probably should workaround that bug anyway given that its a pretty > > trivial DOS using only a trusted language and it will take quite some > > time to push out newer perl

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-24 Thread Alex Hunsaker
On Fri, Aug 24, 2012 at 4:10 PM, Andres Freund wrote: > We probably should workaround that bug anyway given that its a pretty trivial > DOS using only a trusted language and it will take quite some time to push out > newer perl versions even if that bug gets fixed. > > Doing a pqsignal(SIGFPE, Fl

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-24 Thread Andres Freund
On Friday, August 24, 2012 04:53:36 PM Tom Lane wrote: > Andres Freund writes: > > ./pod/perl581delta.pod: > > At startup Perl blocks the SIGFPE signal away since there isn't much > > Perl can do about it. Previously this blocking was in effect also for > > programs executed from within Perl. No

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-24 Thread Andres Freund
On Friday, August 24, 2012 05:09:18 PM Andrew Dunstan wrote: > On 08/24/2012 10:58 AM, Andres Freund wrote: > > On Friday, August 24, 2012 04:53:36 PM Tom Lane wrote: > >> Andres Freund writes: > >>> ./pod/perl581delta.pod: > >>> At startup Perl blocks the SIGFPE signal away since there isn't much

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-24 Thread Andrew Dunstan
On 08/24/2012 10:58 AM, Andres Freund wrote: On Friday, August 24, 2012 04:53:36 PM Tom Lane wrote: Andres Freund writes: ./pod/perl581delta.pod: At startup Perl blocks the SIGFPE signal away since there isn't much Perl can do about it. Previously this blocking was in effect also for program

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-24 Thread Andres Freund
On Friday, August 24, 2012 04:53:36 PM Tom Lane wrote: > Andres Freund writes: > > ./pod/perl581delta.pod: > > At startup Perl blocks the SIGFPE signal away since there isn't much > > Perl can do about it. Previously this blocking was in effect also for > > programs executed from within Perl. No

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-24 Thread Tom Lane
Andres Freund writes: > ./pod/perl581delta.pod: > At startup Perl blocks the SIGFPE signal away since there isn't much > Perl can do about it. Previously this blocking was in effect also for > programs executed from within Perl. Now Perl restores the original > SIGFPE handling routine, whatever

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-23 Thread Andres Freund
On Friday, August 24, 2012 07:33:01 AM Tom Lane wrote: > Andres Freund writes: > >> Um ... how exactly can that happen, if the signal is now ignored? > > > > My man 2 signal tells me: > > "According to POSIX, the behavior of a process is undefined after it > > ignores a SIGFPE, SIGILL, or SIGSEG

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-23 Thread Tom Lane
Andres Freund writes: >> Um ... how exactly can that happen, if the signal is now ignored? > My man 2 signal tells me: > "According to POSIX, the behavior of a process is undefined after it ignores > a SIGFPE, SIGILL, or SIGSEGV signal that was not generated by kill(2) or > raise(3)." So I gue

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-23 Thread Andres Freund
On Friday, August 24, 2012 07:19:42 AM Andres Freund wrote: > On Friday, August 24, 2012 06:55:04 AM Tom Lane wrote: > > Andres Freund writes: > > > On Thursday, August 23, 2012 12:17:22 PM Andres Freund wrote: > > >> While debugging an instance of this bug I noticed that plperlu always > > > > >

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-23 Thread Andres Freund
On Friday, August 24, 2012 06:55:04 AM Tom Lane wrote: > Andres Freund writes: > > On Thursday, August 23, 2012 12:17:22 PM Andres Freund wrote: > >> While debugging an instance of this bug I noticed that plperlu always > > > >> removes the SIGFPE handler and sets it to ignore: > > In fact it can

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-23 Thread Andres Freund
On Friday, August 24, 2012 06:55:04 AM Tom Lane wrote: > Andres Freund writes: > > On Thursday, August 23, 2012 12:17:22 PM Andres Freund wrote: > >> While debugging an instance of this bug I noticed that plperlu always > > > >> removes the SIGFPE handler and sets it to ignore: > > In fact it can

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-23 Thread Tom Lane
Andres Freund writes: > On Thursday, August 23, 2012 12:17:22 PM Andres Freund wrote: >> While debugging an instance of this bug I noticed that plperlu always >> removes the SIGFPE handler and sets it to ignore: > In fact it can be used to crash the server: Um ... how exactly can that happen, if

Re: [HACKERS] plperl sigfpe reset can crash the server

2012-08-23 Thread Andres Freund
On Thursday, August 23, 2012 12:17:22 PM Andres Freund wrote: > Hi, > > While debugging an instance of this bug I noticed that plperlu always > removes the SIGFPE handler and sets it to ignore: > > > andres@awork2:~$ psql -p 5435 -U postgres -h /var/run/postgresql test > Timing is on. > psql (9.