Re: plperl crashes backend

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: John Hansen <john(at)geeknet(dot)com(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: plperl crashes backend
Date: 2004-11-17 06:24:20
Message-ID: 20041117062419.GA65519@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Nov 17, 2004 at 02:49:15PM +1100, John Hansen wrote:

> The following function:
[snip]
> creashes the backend, UNLESS it's executed in the same session where it was created.

I can reproduce this crash on the following platform:

Solaris 9
PostgreSQL 8.0.0beta4 (CVS)
Perl 5.8.5
gcc 3.4.2

I can NOT reproduce the crash on the following platform:

FreeBSD 4.10-STABLE
PostgreSQL 8.0.0beta4 (CVS - same copy of source as above)
Perl 5.8.6-RC1
gcc 2.95.4

The server log on the Solaris box shows this when it crashes
(signal 10 is SIGBUS):

Can't return outside a subroutine at (eval 4) line 13.
LOG: server process (PID 25681) was terminated by signal 10

Adding a few elog lines to the function shows that it's crashing
at the "return $res;" line. One of my gdb sessions showed the
following, although haven't been able to get this same output again:

Program received signal SIGSEGV, Segmentation fault.
0xfec8c1e4 in Perl_av_fetch () from /usr/local/lib/libperl.so
(gdb) bt
#0 0xfec8c1e4 in Perl_av_fetch () from /usr/local/lib/libperl.so
#1 0xfec689f4 in S_pad_findlex () from /usr/local/lib/libperl.so
#2 0xfec68968 in Perl_pad_findmy () from /usr/local/lib/libperl.so

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Fuhr 2004-11-17 08:44:51 Re: plperl crashes backend
Previous Message Tom Lane 2004-11-17 05:24:24 Re: libplperl.so and libperl.so