pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgmail@joh.to
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7516: PL/Perl crash
Date: Mon, 03 Sep 2012 12:06:36 -0400
Message-ID: <1194.1346688396@sss.pgh.pa.us> (raw)
In-Reply-To: <E1T8YUZ-0006gb-Oz@wrigleys.postgresql.org>
References: <E1T8YUZ-0006gb-Oz@wrigleys.postgresql.org>

pgmail@joh.to writes:
> We had a segmentation fault in PostgreSQL 9.1.5 with PL/PerlU.
> ...
> It seems to have happened when a PL/PerlU executed a prepared statement
> which calls another PL/PerlU function.

Hm.  Is it possible that the prepared statement recursively called the
*same* plperl function?  And that somebody did a CREATE OR REPLACE on
that function meanwhile?  It looks to me like validate_plperl_function()
for the inner invocation could pull the rug out from under the outer
invocation's prodesc pointer.  Although even granting all that, you'd
have to be quite unlucky to get a crash right there, because free'ing
the prodesc wouldn't ordinarily cause the memory to disappear.  This
might be the wrong theory.  You seem to have debug symbols for that
core dump --- can you tell which of the dereferences in line 3373
caused the crash?

			regards, tom lane




view thread (18+ messages)  latest in thread

Message-ID: <1194.1346688396@sss.pgh.pa.us>
Permalink:  ../1194.1346688396@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1194.1346688396@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgmail@joh.to
  Subject: Re: BUG #7516: PL/Perl crash
  In-Reply-To: <1194.1346688396@sss.pgh.pa.us>
  References: <E1T8YUZ-0006gb-Oz@wrigleys.postgresql.org> <1194.1346688396@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox