Encounter shared memory error when running createlang command!

Started by Yaming Guover 16 years ago7 messagesbugs
Jump to latest
#1Yaming Gu
yaming.gu@w-oasis.com

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

#2John R Pierce
pierce@hogranch.com
In reply to: Yaming Gu (#1)
Re: 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.

#3Yaming Gu
yaming.gu@w-oasis.com
In reply to: John R Pierce (#2)
答复: [BUGS] Encounter shared memory error when running createlang command!

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@hogranch.com]
发送时间: 2009年9月24日 12:48
收件人: Yaming Gu
抄送: pgsql-bugs@postgresql.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.

#4Robert Haas
robertmhaas@gmail.com
In reply to: Yaming Gu (#1)
Re: Encounter shared memory error when running createlang command!

On Wed, Sep 23, 2009 at 11:44 PM, Yaming Gu <yaming.gu@w-oasis.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

#5Yaming Gu
yaming.gu@w-oasis.com
In reply to: Robert Haas (#4)
答复: [BUGS] Encounter shared memory error when running createlang command!

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@gmail.com]
发送时间: 2009年9月28日 10:19
收件人: Yaming Gu
抄送: pgsql-bugs@postgresql.org
主题: Re: [BUGS] Encounter shared memory error when running createlang command!

On Wed, Sep 23, 2009 at 11:44 PM, Yaming Gu <yaming.gu@w-oasis.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

#6Robert Haas
robertmhaas@gmail.com
In reply to: Yaming Gu (#5)
Re: 答复: [BUGS] Encounter shared memory error when running createlang command!

On Mon, Sep 28, 2009 at 2:51 AM, Yaming Gu <yaming.gu@w-oasis.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

#7Robert Haas
robertmhaas@gmail.com
In reply to: Yaming Gu (#1)
Re: 答复: 答复: [BUGS] Encounter shared memory error when running createlang command!

2009/9/29 Yaming Gu <yaming.gu@w-oasis.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