Re: Encounter shared memory error when running createlang command!

Lists: pgsql-bugs
From: "Yaming Gu" <yaming(dot)gu(at)w-oasis(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Encounter shared memory error when running createlang command!
Date: 2009-09-24 03:44:06
Message-ID: 4C13DA21211F445AA94D1C1A4887313B@SH.WOASIS.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi, List,

Because my previous mail contains some Chinese character, now I modified
it, the whole problem is described as below:

I need to create language Pl/Perl. I have checked all dependencies of
plperl.dll and all is ok.

Next:

D:\Program Files\Postgresql\bin>createlang -U postgres -e plperl example
(example is my dbname)

Password:

SELECT oid FROM pg_catalog.pg_language WHERE lanname = 'plperl';

CREATE LANGUAGE "plperl";

createlang: language installation failed: server closed the connection
unexpectedly

This probably means the server terminated abnormally

before or while processing the request.

And pg_log is :

2009-09-24 10:50:55 HKT LOG: loaded library
"$libdir/plugins/plugin_debugger.dll"

2009-09-24 10:50:59 HKT LOG: loaded library
"$libdir/plugins/plugin_debugger.dll"

Substitution pattern not terminated at line 1.

2009-09-24 10:51:01 HKT LOG: Server process (PID 1640) exited, exit code
255

2009-09-24 10:51:01 HKT LOG: terminating any other active server processes

2009-09-24 10:51:01 HKT LOG: all server processes terminated;
reinitializing

2009-09-24 10:51:02 HKT FATAL: pre-existing shared memory block is still in
use

2009-09-24 10:51:02 HKT HINT: Check if there are any old server processes
still running, and terminate them.

Then unsurprised, I found pgsql-8.3 service has stopped. But then I can
start up it successfully.

Thank you for any advice in advance.

I have been kept on it for two days..

BR

Lucy Gu


From: John R Pierce <pierce(at)hogranch(dot)com>
To: Yaming Gu <yaming(dot)gu(at)w-oasis(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Encounter shared memory error when running createlang command!
Date: 2009-09-24 04:48:02
Message-ID: 4ABAFA02.2040305@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Yaming Gu wrote:
>
>
>
> Hi, List,
>
> Because my previous mail contains some Chinese character, now I
> modified it, the whole problem is described as below:
>
> I need to create language Pl/Perl. I have checked all dependencies of
> plperl.dll and all is ok.
>
have you installed perl? I believe the plperl in postgres on Windows
is dependent on activeperl.


From: "Yaming Gu" <yaming(dot)gu(at)w-oasis(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Cc: "'John R Pierce'" <pierce(at)hogranch(dot)com>
Subject: 答复: [BUGS] Encounter shared memory error when running createlang command!
Date: 2009-09-24 05:59:40
Message-ID: 7ABF311D8EFC4213B7144BBA06178CA8@SH.WOASIS.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


Thank you for your reminding.
Before running createlang script, ActivePerl 5.8.9 has been installed
because of the dependency of plperl.dll on perl58.dll.

-----邮件原件-----
发件人: John R Pierce [mailto:pierce(at)hogranch(dot)com]
发送时间: 2009年9月24日 12:48
收件人: Yaming Gu
抄送: pgsql-bugs(at)postgresql(dot)org
主题: Re: [BUGS] Encounter shared memory error when running createlang
command!

Yaming Gu wrote:
>
>
>
> Hi, List,
>
> Because my previous mail contains some Chinese character, now I
> modified it, the whole problem is described as below:
>
> I need to create language Pl/Perl. I have checked all dependencies of
> plperl.dll and all is ok.
>
have you installed perl? I believe the plperl in postgres on Windows
is dependent on activeperl.


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Yaming Gu <yaming(dot)gu(at)w-oasis(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Encounter shared memory error when running createlang command!
Date: 2009-09-28 02:18:30
Message-ID: 603c8f070909271918w7958958cn3c91d4c382af9f63@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Wed, Sep 23, 2009 at 11:44 PM, Yaming Gu <yaming(dot)gu(at)w-oasis(dot)com> wrote:
> 2009-09-24 10:50:55 HKT LOG:  loaded library
> "$libdir/plugins/plugin_debugger.dll"
>
> 2009-09-24 10:50:59 HKT LOG:  loaded library
> "$libdir/plugins/plugin_debugger.dll"
>
> Substitution pattern not terminated at line 1.

I'm very suspicious of this error message. "Substitution pattern not
terminated at line 1" sounds like an error message that is being
generated *by Perl*. I don't see that phrase anywhere in the
PostgreSQL sources. If that's true, that means that Perl is getting
loaded, but then immediately dying when it tries to compile
something-or-other that has a bad regular expression in there. Could
there be something wrong with your Perl installation? Can you launch
Perl from outside PostgreSQL OK?

Another possibility is that some of the Perl code that PL/perl tries
to execute during the load of Perl is not working for some reason.
What version of Perl do you have on your system? What happens if you
try to load plperlu?

...Robert


From: "Yaming Gu" <yaming(dot)gu(at)w-oasis(dot)com>
To: "'Robert Haas'" <robertmhaas(at)gmail(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: 答复: [BUGS] Encounter shared memory error when running createlang command!
Date: 2009-09-28 06:51:23
Message-ID: 4159E3C73027419AB58AFDC5A728BA12@SH.WOASIS.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


Thank you so much for your kind reply.
Your analysis sounds very reasonable. I checked my Perl version, it is "Perl 5.8.9 Build 826" which is the latest version in the series of 5.8.*.
The whole process of installation of Perl goes well without any something wrong. And I can run Perl command out of Postgresql very well. So is this Perl version not compatible with Postgresql 8.3.7? And may I configure Perl somewhere or something? When Perl is loaded, what will be executed by it?
"Substitution pattern not terminated at line 1." Souds like one regular expression. But I can not determine what will be executed by Perl.
BR
Lucy

-----邮件原件-----
发件人: Robert Haas [mailto:robertmhaas(at)gmail(dot)com]
发送时间: 2009年9月28日 10:19
收件人: Yaming Gu
抄送: pgsql-bugs(at)postgresql(dot)org
主题: Re: [BUGS] Encounter shared memory error when running createlang command!

On Wed, Sep 23, 2009 at 11:44 PM, Yaming Gu <yaming(dot)gu(at)w-oasis(dot)com> wrote:
> 2009-09-24 10:50:55 HKT LOG: loaded library
> "$libdir/plugins/plugin_debugger.dll"
>
> 2009-09-24 10:50:59 HKT LOG: loaded library
> "$libdir/plugins/plugin_debugger.dll"
>
> Substitution pattern not terminated at line 1.

I'm very suspicious of this error message. "Substitution pattern not
terminated at line 1" sounds like an error message that is being
generated *by Perl*. I don't see that phrase anywhere in the
PostgreSQL sources. If that's true, that means that Perl is getting
loaded, but then immediately dying when it tries to compile
something-or-other that has a bad regular expression in there. Could
there be something wrong with your Perl installation? Can you launch
Perl from outside PostgreSQL OK?

Another possibility is that some of the Perl code that PL/perl tries
to execute during the load of Perl is not working for some reason.
What version of Perl do you have on your system? What happens if you
try to load plperlu?

...Robert


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Yaming Gu <yaming(dot)gu(at)w-oasis(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: 答复: [BUGS] Encounter shared memory error when running createlang command!
Date: 2009-09-29 02:34:56
Message-ID: 603c8f070909281934y5cdfe8e9m6ae135a6d57aaec2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Mon, Sep 28, 2009 at 2:51 AM, Yaming Gu <yaming(dot)gu(at)w-oasis(dot)com> wrote:
>
> Thank you so much for your kind reply.
> Your analysis sounds very reasonable. I checked my Perl version, it is "Perl 5.8.9 Build 826" which is the latest version in the series of 5.8.*.
> The whole process of installation of Perl goes well without any something wrong. And I can run Perl command out of Postgresql very well. So is this Perl version not compatible with Postgresql 8.3.7? And may I configure Perl somewhere or something? When Perl is loaded, what will be executed by it?
> "Substitution pattern not terminated at line 1." Souds like one regular expression. But I can not determine what will be executed by Perl.
> BR
> Lucy

Did you try loading plperlu?

...Robert


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Yaming Gu <yaming(dot)gu(at)w-oasis(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: 答复: 答复: [BUGS] Encounter shared memory error when running createlang command!
Date: 2009-10-22 16:24:47
Message-ID: 603c8f070910220924u68518458i543a65ea53ca0f6c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

2009/9/29 Yaming Gu <yaming(dot)gu(at)w-oasis(dot)com>:
> Hi, Robert,
>
>  According to your recommendations, I tried to load plperu, almost the same
> error messages have shown:
>
> D:\Program Files\Postgresql\8.3\bin>createlang -U postgres plperlu example
>
> Password:
>
> createlang: language installation failed: server closed the connection
> unexpectedly
>
>         This probably means the server terminated abnormally
>
>         before or while processing the request.
>
> The following is pg_log message:
>
> 2009-09-29 14:28:07 HKT LOG:  loaded library
> "$libdir/plugins/plugin_debugger.dll"
>
> 2009-09-29 14:28:44 HKT LOG:  loaded library
> "$libdir/plugins/plugin_debugger.dll"
>
> 2009-09-29 14:28:50 HKT LOG:  loaded library
> "$libdir/plugins/plugin_debugger.dll"
>
> 2009-09-29 14:28:53 HKT LOG:  loaded library
> "$libdir/plugins/plugin_debugger.dll"
>
> Substitution pattern not terminated at line 1.
>
> 2009-09-29 14:28:55 HKT LOG:  Server process (PID 3596) exited, exit code
> 255
>
> 2009-09-29 14:28:55 HKT LOG:  terminating any other active server processes
>
> 2009-09-29 14:28:55 HKT WARNING:  terminating connection because of crash of
> another server process
>
> 2009-09-29 14:28:55 HKT 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.
>
> 2009-09-29 14:28:55 HKT HINT:  In a moment you should be able to reconnect
> to the database and repeat your command.
>
> 2009-09-29 14:28:55 HKT WARNING:  terminating connection because of crash of
> another server process
>
> 2009-09-29 14:28:55 HKT 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.
>
> 2009-09-29 14:28:55 HKT HINT:  In a moment you should be able to reconnect
> to the database and repeat your command.
>
> 2009-09-29 14:28:55 HKT LOG:  all server processes terminated;
> reinitializing
>
> 2009-09-29 14:28:56 HKT FATAL:  pre-existing shared memory block is still in
> use
>
> 2009-09-29 14:28:56 HKT HINT:  Check if there are any old server processes
> still running, and terminate them.
>
>
>
> I wonder about the line of “terminating connection because of crash of
> another server process”. I have done nothing else except starting up
> postgresql service.

Well, that's a normal message when something crashes. The question is
what's making it crash. Have you tried removing plugin_debugger.dll
from the equation? Have you tried a fresh PostgreSQL install?
Something's obviously different in your installation than elsewhere.

...Robert