Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 293BBB5D8C5 for ; Wed, 10 Aug 2011 21:07:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 96177-09 for ; Thu, 11 Aug 2011 00:07:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com [209.85.216.46]) by mail.postgresql.org (Postfix) with ESMTP id D7449B5D80A for ; Wed, 10 Aug 2011 21:07:47 -0300 (ADT) Received: by qwk3 with SMTP id 3so811521qwk.19 for ; Wed, 10 Aug 2011 17:07:47 -0700 (PDT) Received: by 10.224.200.197 with SMTP id ex5mr3286712qab.228.1313021267307; Wed, 10 Aug 2011 17:07:47 -0700 (PDT) Received: from [10.1.1.8] (124-169-181-228.dyn.iinet.net.au [124.169.181.228]) by mx.google.com with ESMTPS id fl1sm691012qab.13.2011.08.10.17.07.40 (version=SSLv3 cipher=OTHER); Wed, 10 Aug 2011 17:07:43 -0700 (PDT) Message-ID: <4E431D47.6060609@ringerc.id.au> Date: Thu, 11 Aug 2011 08:07:35 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: c k CC: Adrian Klaver , pgsql-general@postgresql.org Subject: Re: postgresql server crash on windows 7 when using plpython References: <201108100704.44907.adrian.klaver@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/308 X-Sequence-Number: 178590 On 11/08/2011 1:00 AM, c k wrote: > 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. It doesn't have to be. On Windows, the directory containing the current executable is implicitly the first path entry. Since postgres.exe lives in the same directory as uuid-ossp.dll, that's the copy of the DLL that'll be called. > 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. OK, so maybe Python doesn't use uuid-ossp but its own implementation in pure Python. I'll pull out a Windows box and check. > Recent log contains following lines. > *Fatal Python error: PyThreadState_Get: no current thread* Hmm, that's interesting. Thanks for supplying the error message; looks like I was probably on entirely the wrong track because I was forced to guess with not enough information. If I get a chance I'll have a play with the function you posted and see if I can reproduce the crash on my Win7 box. In the mean time, if you want you can try to collect some more information about the crash according to these instructions: http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Windows -- Craig Ringer