Re: postgresql server crash on windows 7 when using plpython

From: c k <shreeseva(dot)learning(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgresql server crash on windows 7 when using plpython
Date: 2011-08-10 17:00:30
Message-ID: CAN2Y=uPDc_n1_rCahkX7bHCO28P=WKqNr5ziGM-2JRecK=_yPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

I have renamed uuid-ossp.dll to 0uuid-ossp.dll in postgresql's lib
directory. But it is also found that postgresql's bin directory is not
included in the path.
Then started the postgresql again, called the same plpython function again
and again server crashed without any details in the log.
Also searched for the above dll or similar in python's installation but not
founf, one available was not dll but was .py file.
Recent log contains following lines.

2011-08-10 22:25:38 IST LOG: database system was shut down at 2011-08-10
14:40:36 IST
2011-08-10 22:25:38 IST FATAL: the database system is starting up
2011-08-10 22:25:38 IST LOG: database system is ready to accept connections
2011-08-10 22:25:38 IST LOG: autovacuum launcher started
*Fatal Python error: PyThreadState_Get: no current thread*

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
2011-08-10 22:27:49 IST LOG: server process (PID 2584) exited with exit
code 3
2011-08-10 22:27:49 IST LOG: terminating any other active server processes
2011-08-10 22:27:49 IST WARNING: terminating connection because of crash of
another server process
2011-08-10 22:27:49 IST DETAIL: The postmaster has commanded this server
process to roll back the current transaction and exit, because another
server process exited abnormally and possibly corrupted shared memory.
2011-08-10 22:27:49 IST HINT: In a moment you should be able to reconnect
to the database and repeat your command.
2011-08-10 22:27:49 IST WARNING: terminating connection because of crash of
another server process
2011-08-10 22:27:49 IST DETAIL: The postmaster has commanded this server
process to roll back the current transaction and exit, because another
server process exited abnormally and possibly corrupted shared memory.
2011-08-10 22:27:49 IST HINT: In a moment you should be able to reconnect
to the database and repeat your command.
2011-08-10 22:27:49 IST WARNING: terminating connection because of crash of
another server process
2011-08-10 22:27:49 IST DETAIL: The postmaster has commanded this server
process to roll back the current transaction and exit, because another
server process exited abnormally and possibly corrupted shared memory.
2011-08-10 22:27:49 IST HINT: In a moment you should be able to reconnect
to the database and repeat your command.
2011-08-10 22:27:49 IST WARNING: terminating connection because of crash of
another server process
2011-08-10 22:27:49 IST DETAIL: The postmaster has commanded this server
process to roll back the current transaction and exit, because another
server process exited abnormally and possibly corrupted shared memory.
2011-08-10 22:27:49 IST HINT: In a moment you should be able to reconnect
to the database and repeat your command.
2011-08-10 22:27:49 IST LOG: all server processes terminated;
reinitializing
2011-08-10 22:27:58 IST FATAL: pre-existing shared memory block is still in
use
2011-08-10 22:27:58 IST HINT: Check if there are any old server processes
still running, and terminate them.

Is it related with python threads?

Regards,
Chaitanya Kulkarni

On Wed, Aug 10, 2011 at 7:34 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:

> On Tuesday, August 09, 2011 10:13:17 pm c k wrote:
> > Here is the actual function.
> > create or replace function software.python_test() returns text as
> > $body$
> > import sys
> > from uuid import getnode as get_mac
> > mac = get_mac()
> > return mac
> > $body$
> > language plpythonu volatile security definer;
> >
> > When running the same code from python prompt, it run correctly without
> any
> > error.
>
> The above function runs correctly in Postgres 9.0.3 on my Linux machine. I
> would
> say Craigs post about multiple versions of uuid causing the problem is the
> answer to your problem.
>
>
> >
> >
> > Chaitanya Kulkarni
> >
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message A J 2011-08-10 17:36:40 Frequency of archive_cleanup_command
Previous Message Kevin Grittner 2011-08-10 17:00:07 Re: Cleanup of same archive used by multiple standbys

Browse pgsql-general by date

  From Date Subject
Next Message Andy Colson 2011-08-10 18:41:52 Re: Is max connections in a table somewhere?
Previous Message Ioana Danes 2011-08-10 15:25:52 Re: PLPGSQL Generic query in trigger doubt