Re: postgresql server crash on windows 7 when using plpython - Mailing list pgsql-general

From c k
Subject Re: postgresql server crash on windows 7 when using plpython
Date
Msg-id CAN2Y=uPDc_n1_rCahkX7bHCO28P=WKqNr5ziGM-2JRecK=_yPg@mail.gmail.com
Whole thread Raw
In response to Re: postgresql server crash on windows 7 when using plpython  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: postgresql server crash on windows 7 when using plpython  (Craig Ringer <ringerc@ringerc.id.au>)
List 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.klaver@gmail.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.klaver@gmail.com

pgsql-general by date:

Previous
From: Ioana Danes
Date:
Subject: Re: PLPGSQL Generic query in trigger doubt
Next
From: Geoffrey Myers
Date:
Subject: Is max connections in a table somewhere?