dbTalk Databases Forums  

Re: [BUGS] bug: core dump in pl/perl (cvs head).

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] bug: core dump in pl/perl (cvs head). in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] bug: core dump in pl/perl (cvs head). - 07-05-2005 , 03:20 PM






On Tue, Jul 05, 2005 at 09:54:52PM +0200, Hans-Jürgen Schönig wrote:
Quote:
we have found a bug in CVS head using PL/Perl:
How current is your checkout? Mine's from this morning and I don't
get a crash with the example you posted:

test=> SELECT func();
NOTICE: sql: SELECT 10, 10 FROM pg_locks WHERE transaction IS NOT NULL AND pid = pg_backend_pid()
func
------
0
(1 row)

Have you run "make distclean" and then done a fresh build?

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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] bug: core dump in pl/perl (cvs head). - 07-05-2005 , 03:38 PM






Michael Fuhr <mike (AT) fuhr (DOT) org> writes:
Quote:
On Tue, Jul 05, 2005 at 09:54:52PM +0200, Hans-Jürgen Schönig wrote:
we have found a bug in CVS head using PL/Perl:

How current is your checkout? Mine's from this morning and I don't
get a crash with the example you posted:
None for me either (trying on a Fedora Core 3 x86 box; don't currently
have plperl built on my other machine). Platform-specific issue maybe?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #3  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] bug: core dump in pl/perl (cvs head). - 07-05-2005 , 03:46 PM



On Tue, Jul 05, 2005 at 04:37:05PM -0400, Tom Lane wrote:
Quote:
Michael Fuhr <mike (AT) fuhr (DOT) org> writes:
On Tue, Jul 05, 2005 at 09:54:52PM +0200, Hans-Jürgen Schönig wrote:
we have found a bug in CVS head using PL/Perl:

How current is your checkout? Mine's from this morning and I don't
get a crash with the example you posted:

None for me either (trying on a Fedora Core 3 x86 box; don't currently
have plperl built on my other machine). Platform-specific issue maybe?
My platform that works is Solaris 9/sparc with Perl 5.8.7; compiler
is gcc 3.4.2.

Did you get a core dump? If so, can you do a stack trace on it?

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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
  #4  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] bug: core dump in pl/perl (cvs head). - 07-05-2005 , 04:01 PM



On Tue, Jul 05, 2005 at 10:49:54PM +0200, Hans-Jürgen Schönig wrote:
Quote:
I am running FC4 on x86. There is no core dump.
Just to be sure: where are you looking? I don't know if it's
configurable on your platform, but I usually find core dumps under
$PGDATA/base/<databaseoid>/. Do you have a resource limit or other
setting that would prevent core dumps from happening? Tom Lane can
probably help out on that platform.

Quote:
I have compiled it all over again cleanly.
The last elog is never reached so something seems to go wrong inside the
SQL call ...
Can you run the query in psql? What about in a PL/pgSQL function?

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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #5  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] bug: core dump in pl/perl (cvs head). - 07-05-2005 , 04:14 PM



Michael Fuhr <mike (AT) fuhr (DOT) org> writes:
Quote:
On Tue, Jul 05, 2005 at 10:49:54PM +0200, Hans-Jürgen Schönig wrote:
I am running FC4 on x86. There is no core dump.

Just to be sure: where are you looking? I don't know if it's
configurable on your platform, but I usually find core dumps under
$PGDATA/base/<databaseoid>/.
CVS tip of the last forty-eight hours or so would dump into $PGDATA
instead. It's a good bet though that "ulimit -c" is set to 0 (no dumps)
by default on that platform. I tend to put
ulimit -c unlimited
into the postmaster startup script on Linux machines, so that I can get
core dumps.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #6  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] bug: core dump in pl/perl (cvs head). - 07-29-2005 , 09:50 PM




Has this been fixed?

---------------------------------------------------------------------------

Hans-Jürgen Schönig wrote:
Quote:
we have found a bug in CVS head using PL/Perl:

[hs@hp hs]$ psql test < /tmp/core.sql
DROP FUNCTION
CREATE FUNCTION
NOTICE: sql: SELECT 10, 10 FROM pg_locks WHERE transaction IS NOT NULL
AND pid = pg_backend_pid()
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost



DROP FUNCTION func();
CREATE OR REPLACE FUNCTION func() RETURNS int4 AS '
$sql = "SELECT 10, 10 FROM pg_locks "
. "WHERE transaction IS NOT NULL AND pid =
pg_backend_pid() ";
elog(NOTICE, "sql: $sql");
my $rv = spi_exec_query($sql);
return 0;
' LANGUAGE 'plperlu';

SELECT func();


somehow Perl does not seem to like the SPI.
only the development code seems to be affected.

thanks a lot,

hans


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
  #7  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] bug: core dump in pl/perl (cvs head). - 07-30-2005 , 07:43 AM



On Fri, Jul 29, 2005 at 10:46:35PM -0400, Bruce Momjian wrote:
Quote:
Has this been fixed?

---------------------------------------------------------------------------

Hans-Jürgen Schönig wrote:
we have found a bug in CVS head using PL/Perl:

[hs@hp hs]$ psql test < /tmp/core.sql
DROP FUNCTION
CREATE FUNCTION
NOTICE: sql: SELECT 10, 10 FROM pg_locks WHERE transaction IS NOT NULL
AND pid = pg_backend_pid()
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost
I don't think anybody was able to reproduce the problem, and
Hans-Jürgen said that it started working after he rebooted
the box:

http://archives.postgresql.org/pgsql...7/msg00062.php

There was reportedly no core dump and apparently the reboot destroyed
whatever conditions were causing the problem, so it might be difficult
to find out what was happening :-(

Hans-Jürgen, did this problem ever reappear?

Somebody else recently reported a backend crash when calling PL/Perl
in 8.0.3, but again we've been given no core dump info and thus far
nobody has been able to duplicate the problem:

http://archives.postgresql.org/pgsql...7/msg00181.php

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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
  #8  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] bug: core dump in pl/perl (cvs head). - 07-30-2005 , 08:42 AM



On Sat, Jul 30, 2005 at 02:43:23PM +0200, Hans-Jürgen Schönig wrote:
Quote:
no, this one seems to be fine now.
i have no idea what went wrong.
the code cored at some very "unlikely" place.
Are you saying that it *did* dump core, or that it *didn't*? It's
possible that your coredumpsize resource limit prevented a core
dump from happening at all. If you're playing with the development
code than it would be a good idea to set that limit so that you do
get core dumps. Configuring with --enable-debug and --enable-cassert
would also be useful, if you aren't doing so already.

Quote:
somehow rebooting helped ... - this was very strange.
fortunately it works nicely now ...
....but unfortunate for finding out what was happening :-(

Had you stopped and restarted the postmaster before the reboot?
That is, was the reboot really necessary to "fix" the problem?
Had you run "make install" while the postmaster was still running?
I haven't tested whether that could cause a problem, but I wonder
if that's possible.

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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
  #9  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] bug: core dump in pl/perl (cvs head). - 07-30-2005 , 09:03 AM



On Sat, Jul 30, 2005 at 03:46:46PM +0200, Hans-Jürgen Schönig wrote:
Quote:
Michael Fuhr wrote:
Are you saying that it *did* dump core, or that it *didn't*?

it cored; my core-size settings are ok ...
So were you able to get a stack trace from the core dump?

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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Reply With Quote
  #10  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] bug: core dump in pl/perl (cvs head). - 07-30-2005 , 02:18 PM



[Please copy the mailing list on replies.]

On Sat, Jul 30, 2005 at 05:20:07PM +0200, Hans-Jürgen Schönig wrote:
Quote:
Michael Fuhr wrote:
So were you able to get a stack trace from the core dump?

yes, but i did not keep the backtrace.
i did not expect the db to work after the reboot.

you shouldn't worry to much about that. i don't believe it is a
postgresql related problem ...
Maybe not, but if it happens again then please post the stack trace
so somebody can take a look. Even if it isn't a PostgreSQL problem,
it's worth finding out the cause so you can prevent it in the future.

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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.