Thread: dlopen error 128 with createlang

dlopen error 128 with createlang

From
sylvain
Date:
I tried to install languages into PostgreSQL 7.4.3-1 and ran into the
following problem:

$ createlang --echo plperlu test
SELECT oid FROM pg_language WHERE lanname = 'plperlu';
SELECT oid FROM pg_proc WHERE proname = 'plperl_call_handler' AND prorettype =
(SELECT oid FROM pg_type WHERE typname = 'language_handler') AND pronargs = 0;
CREATE FUNCTION "plperl_call_handler" () RETURNS language_handler
AS '$libdir/pl
perl' LANGUAGE C;
CREATE LANGUAGE "plperlu" HANDLER "plperl_call_handler";
ERROR:  could not load library "/usr/lib/postgresql/plperl.dll": dlopen: Win32
error 126
createlang: language installation failed: ERROR:  could not load
library "/usr/lib/postgresql/plperl.dll": dlopen: Win32 error 126


By checking plperl.dll, I noticed that cygperl5_8_2.dll was missing:
 $ cygcheck /usr/lib/postgresql/plperl.dll
 C:/cygwin/lib/postgresql/plperl.dll
  C:\cygwin\bin\postgres.exe
    C:\cygwin\bin\cygcrypt-0.dll
      C:\cygwin\bin\cygwin1.dll
        C:\WINDOWS\System32\ADVAPI32.DLL
          C:\WINDOWS\System32\ntdll.dll
          C:\WINDOWS\System32\KERNEL32.dll
          C:\WINDOWS\System32\RPCRT4.dll
    C:\cygwin\bin\cygcrypto-0.9.7.dll
    C:\cygwin\bin\cygssl-0.9.7.dll
Error: could not find cygperl5_8_2.dll

But I have the cygperl5_8_5.dll in the '/lib/' directory so...
What can I do ?


Re: dlopen error 128 with createlang

From
Jason Tishler
Date:
On Mon, Aug 23, 2004 at 02:22:33PM +0000, sylvain wrote:
> Error: could not find cygperl5_8_2.dll
>
> But I have the cygperl5_8_5.dll in the '/lib/' directory so...
> What can I do ?

Search the Cygwin mailing list?  See the following thread starting with
this post:

    http://cygwin.com/ml/cygwin/2004-08/msg00866.html

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: dlopen error 128 with createlang

From
Reini Urban
Date:
Jason Tishler schrieb:
> On Mon, Aug 23, 2004 at 02:22:33PM +0000, sylvain wrote:
>>Error: could not find cygperl5_8_2.dll
>>
>>But I have the cygperl5_8_5.dll in the '/lib/' directory so...
>>What can I do ?

I would try just copying cygperl5_8_5.dll to cygperl5_8_2.dll.
Should be compatible, IMHO.

And 7.4.5 will be ready soon. I just need an updated ant > 1.5

> Search the Cygwin mailing list?  See the following thread starting with
> this post:
>
>     http://cygwin.com/ml/cygwin/2004-08/msg00866.html
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

Re: dlopen error 128 with createlang

From
Kumar Pandey
Date:
>I would try just copying cygperl5_8_5.dll to
>cygperl5_8_2.dll.
>Should be compatible, IMHO.

>Reini Urban
This workaround does installs plperl. I could even
define a simple perl function that comes in the doc
(one with employee and comp calculation)
However executing a sql with the function crashes the
database.

Could this be because the postgres was built with perl
5.8.2 and at runitme only finds 5.8.3?

Thanks
Kumar





__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

Re: dlopen error 128 with createlang

From
Reini Urban
Date:
Kumar Pandey schrieb:
>>I would try just copying cygperl5_8_5.dll to
>>cygperl5_8_2.dll.
>>Should be compatible, IMHO.
>>Reini Urban
>
> This workaround does installs plperl. I could even
> define a simple perl function that comes in the doc
> (one with employee and comp calculation)
> However executing a sql with the function crashes the
> database.
>
> Could this be because the postgres was built with perl
> 5.8.2 and at runitme only finds 5.8.3?

cygwin perl 5.8.2, 5.8.3 and 5.8.5 should be binary API compatible.

however I finished my postgesql-7.4.5-1 cygwin release.
http://xarch.tu-graz.ac.at/home/rurban/software/cygwin/postgresql/postgresql-7.4.5-1/

I just don't have a setup.hint, so you have to install it manually.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

postgesql-7.4.5-1 cygwin , perl function call crashes server process

From
Kumar Pandey
Date:
--- Reini Urban <rurban@x-ray.at> wrote:

> however I finished my postgesql-7.4.5-1 cygwin
> release.
>
http://xarch.tu-graz.ac.at/home/rurban/software/cygwin/postgresql/postgresql-7.4.5-1/
>
> I just don't have a setup.hint, so you have to
> install it manually.
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/
>
I manually installed (tar) new postgesql-7.4.5-1
cygwin release.
Thanks Reini!
Prior to that I uninstalled 7.4.3-1 and re-installed
perl 5.8.5-1 via cygwin install

createlang plperl worked fine.
I created the employee table and empcomp perl function
as given in the docs under pl/perl section.

When I try to run the query "Select
name,empcomp(employee) from emploee"
database child server process crashes with exit code
128 and database reinitializes.

Here's the debug log for postmaster (its rather long
but I thought a discerning eye might see something
there)-

DEBUG:  found "/bin/postgres" using argv[0]
DEBUG:  invoking IpcMemoryCreate(size=9469952)
WARNING:  dup(0) failed after 3196 successes: Bad file
descriptor
DEBUG:  max_safe_fds = 986, usable_fds = 3196,
already_open = 4
DEBUG:  found "/bin/postmaster" using argv[0]
LOG:  database system was interrupted at 2004-08-26
09:07:17 PDT
.....
LOG:  database system is ready
DEBUG:  forked new backend, pid=2192 socket=7
DEBUG:  /bin/postmaster child[2192]: starting with (
DEBUG:          postgres
DEBUG:          -d5
DEBUG:          -v196608
DEBUG:          -p
DEBUG:          version4
DEBUG:  )
DEBUG:  InitPostgres
DEBUG:  StartTransactionCommand
LOG:  statement: SELECT name, empcomp(employee) FROM
employee;
DEBUG:  parse tree:
DETAIL:  {QUERY :commandType 1 :querySource 0
:canSetTag true :utilityStmt <>
        :resultRelation 0 :into <> :hasAggs false
:hasSubLinks false :rtable ({RTE
        :alias <> :eref {ALIAS :aliasname employee
:colnames ("name" "basesalary"
        "bonus")} :rtekind 0 :relid 70814 :inh true
:inFromCl true :checkForRead true
        :checkForWrite false :checkAsUser 0})
:jointree {FROMEXPR :fromlist
        ({RANGETBLREF :rtindex 1}) :quals <>}
:rowMarks () :targetList ({TARGETENTRY
        :resdom {RESDOM :resno 1 :restype 25
:restypmod -1 :resname name
        :ressortgroupref 0 :resorigtbl 70814
:resorigcol 1 :resjunk false} :expr {VAR
        :varno 1 :varattno 1 :vartype 25 :vartypmod -1
:varlevelsup 0 :varnoold 1
        :varoattno 1}} {TARGETENTRY :resdom {RESDOM
:resno 2 :restype 23 :restyp mod -1
        :resname empcomp :ressortgroupref 0
:resorigtbl 0 :resorigcol 0 :resjunk
        false} :expr {FUNCEXPR :funcid 70819
:funcresulttype 23 :funcretset false
        :funcformat 0 :args ({VAR :varno 1 :varattno 0
:vartype 70815 :vartypmod 4
        :varlevelsup 0 :varnoold 1 :varoattno 0})}})
:groupClause <> :havingQual <>
        :distinctClause <> :sortClause <> :limitOffset
<> :limitCount <>
        :setOperations <> :resultRelations ()}

DEBUG:  rewritten parse tree:
DETAIL:  ({QUERY :commandType 1 :querySource 0
:canSetTag true :utilityStmt <>
        :resultRelation 0 :into <> :hasAggs false
:hasSubLinks false :rtable ({RTE
        :alias <> :eref {ALIAS :aliasname employee
:colnames ("name" "basesalary"
        "bonus")} :rtekind 0 :relid 70814 :inh true
:inFromCl true :checkForRead true
        :checkForWrite false :checkAsUser 0})
:jointree {FROMEXPR :fromlist
        ({RANGETBLREF :rtindex 1}) :quals <>}
:rowMarks () :targetList ({TARGETENTRY
        :resdom {RESDOM :resno 1 :restype 25
:restypmod -1 :resname name
        :ressortgroupref 0 :resorigtbl 70814
:resorigcol 1 :resjunk false} :expr {VAR
        :varno 1 :varattno 1 :vartype 25 :vartypmod -1
:varlevelsup 0 :varnoold 1
        :varoattno 1}} {TARGETENTRY :resdom {RESDOM
:resno 2 :restype 23 :restyp mod -1
        :resname empcomp :ressortgroupref 0
:resorigtbl 0 :resorigcol 0 :resjunk
        false} :expr {FUNCEXPR :funcid 70819
:funcresulttype 23 :funcretset false
        :funcformat 0 :args ({VAR :varno 1 :varattno 0
:vartype 70815 :vartypmod 4
        :varlevelsup 0 :varnoold 1 :varoattno 0})}})
:groupClause <> :havingQual <>
        :distinctClause <> :sortClause <> :limitOffset
<> :limitCount <>
        :setOperations <> :resultRelations ()})
DEBUG:  plan:
DETAIL:  {SEQSCAN :startup_cost 0.00 :total_cost 22.50
:plan_rows 1000 :plan_width 36
        :targetlist ({TARGETENTRY :resdom {RESDOM
:resno 1 :restype 25 :restypmod -1
        :resname name :ressortgroupref 0 :resorigtbl
70814 :resorigcol 1 :resjunk
        false} :expr {VAR :varno 1 :varattno 1
:vartype 25 :vartypmod -1 :varlevelsup
        0 :varnoold 1 :varoattno 1}} {TARGETENTRY
:resdom {RESDOM :resno 2 :restype 23
        :restypmod -1 :resname empcomp
:ressortgroupref 0 :resorigtbl 0 :resorigcol 0
        :resjunk false} :expr {FUNCEXPR :funcid 70819
:funcresulttype 23 :funcretset
        false :funcformat 0 :args ({VAR :varno 1
:varattno 0 :vartype 70815 :vartypmod
        4 :varlevelsup 0 :varnoold 1 :varoattno 0})}})
:qual <> :lefttree <>
        :righttree <> :initPlan <> :extParam ()
:allParam () :nParamExec 0 :scanrelid
        1}

DEBUG:  PortalRun
DEBUG:  forked new backend, pid=2012 socket=7
DEBUG:  reaping dead processes
DEBUG:  child process (PID 2192) exited with exit code
128
LOG:  server process (PID 2192) exited with exit code
128
LOG:  terminating any other active server processes
DEBUG:  sending SIGQUIT to process 2012
DEBUG:  /bin/postmaster child[2012]: starting with (
DEBUG:          postgres
DEBUG:          -d5
DEBUG:          -v196608
DEBUG:          -p
DEBUG:          version4
DEBUG:  )
WARNING:  terminating connection because of crash of
another server process
DETAIL:  The postmaster has commanded this server
process to roll back the curre
nt transaction and exit, because another server
process exited abnormally and po
ssibly corrupted shared memory.
HINT:  In a moment you should be able to reconnect to
the database and repeat yo
ur command.
DEBUG:  reaping dead processes
DEBUG:  child process (PID 2012) exited with exit code
1
LOG:  all server processes terminated; reinitializing
DEBUG:  shmem_exit(0)
DEBUG:  invoking IpcMemoryCreate(size=9469952)
LOG:  database system was interrupted at 2004-08-26
09:10:07 PDT
LOG:  checkpoint record is at 0/16C40C8
LOG:  redo record is at 0/16C40C8; undo record is at
0/0; shutdown TRUE
LOG:  next transaction ID: 645; next OID: 74486
LOG:  database system was not properly shut down;
automatic recovery in progress

LOG:  record with zero length at 0/16C4108
LOG:  redo is not required
LOG:  database system is ready
DEBUG:  proc_exit(0)
DEBUG:  shmem_exit(0)
DEBUG:  exit(0)
DEBUG:  reaping dead processes






__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail