Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

DBD::Oracle causes core dumps

SOLVED
Go to solution
Markus Bonet
Advisor

DBD::Oracle causes core dumps

Hi!

I using Perl 5.6.1, DBI-1.22, DBD::Oracle, Oracle 8.0.0.3 on a HP-UX 11.00 machine.

I got lot of trouble compiling and installing all of them.

Now all compiles well, but testing and using the DBD::Oracle driver ends in core-dumps.

Is this forum correct for my problem?
If so, I can post more details on this problem.


Thanks, Markus
28 REPLIES
Steve Steel
Honored Contributor

Re: DBD::Oracle causes core dumps

Hi

This will do

Please give all info you have.

especially messages

If a corefile is created run
file core

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

 
Steve Steel
Honored Contributor

Re: DBD::Oracle causes core dumps

Hi

look at

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x3e777d4cf554d611abdb0090277a778c,00.html

You will see that SIGSEGV is caused bu maxssiz
or the 64 bit equivalent being too small.

Follow the URL above and tune your system values upwards.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
H.Merijn Brand (procura
Honored Contributor

Re: DBD::Oracle causes core dumps

Aside the core dumps, I see some other things you might consider to change or redo

The perl you are using is built with gcc-2.95 for hppa-1.1 architecture (32bit). If you want some performance gain and you do not have HP ANSI C, consider upgrading to gcc-3.0.4 or gcc-3.1 The GNU people have gone through great trouble to improve gcc for HP-UX. gcc-3.0.4 is available for 11.00 on http://hpux.tn.tudelft.nl/hppd/hpux/Gnu/alpha.html (amongst other fine HP mirrors) and you can also find binutils-2.12 there.

DBI-1.22 is very new (only a few days) and the only addition is a bulk interface. DBI-1.21 would have been sufficient.

This perl (32bit) cannot be used with 64bit Oracle, but I guess that is not the problem.

Good luck, and happy perl hacking
Enjoy, Have FUN! H.Merijn
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

OK,

I checked maxssiz:

Parameter: maxssiz
Value: 0x00800000
Default: 0x00800000
Minimum: -
Module: -


There isn't a maxssiz_64 value, because our system is 32bit only.

From the suggested thread I am not sure what value to set.


Sorry, but I am not too sure with this system.
Any hints are valueable for me...
Markus
Steve Steel
Honored Contributor

Re: DBD::Oracle causes core dumps

Hi

There is a document attached to the last part of the url I gave you with good info and indeed the default is too small.

maxssiz maxdsiz maxtsiz are indicators of the maximum memory which can be used.


Would recommend

1)Look at the attached document.

2)Make sure you have at least 1.5*default for these values.

Remember that you must reboot to change but you can use kmtune to upgrade the values online to test

see man kmtune


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

OK,

first of all many thanks for helping.
I will try reconfiguring this machine in the afternoon.

BTW, this is a K360 with 1GB RAM.
The suggestions are based upon N- and V- models.

I wouldn't like to run into troubles, so I am unsure if these suggested values are proper for our system.

I think, I have to change maxssiz to 1.5*default as you said.
Shall I apply this to maxdsiz, too? All values mentioned in this doc to prevent more SIGSEGV core-dumps?


Markus
Steve Steel
Honored Contributor

Re: DBD::Oracle causes core dumps

Hi

maxs maxd maxtsiz you can do online with kmtune without stopping the machine.


Make sure you have 2 to 4 times your memory in swapspace.


If dbc_max_pct is on 50 and you have at least 3gb of swap then put dbc_max and dbc_mix on 20
and 5 to free up main memory.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

OK,

I raised maxssiz to 0x05000000.
I left maxdsiz and maxtsiz untouched at 0x04000000.

My physical RAM is 1GB, swapspace is only 512 (typically half filled). I could rais it to 1.5GB, but I would rather left it so.

Still I get that core-dump.

I will try recompiling everthing with gcc 3.x and binutils 2.11.x unless someone can point me to another problem.


Hopeless, Markus :-((
H.Merijn Brand (procura
Honored Contributor

Re: DBD::Oracle causes core dumps

binutils-2.12 please
Enjoy, Have FUN! H.Merijn
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

Ok, ok,

binutils2.12.
But, where can I get it?
On the HPUX Porting page there is currently only 2.11.2 available.
Or do I have to 'make' binutils from the source as well?


Markus
PS: Back on monday, now it's weekend :-))
H.Merijn Brand (procura
Honored Contributor

Re: DBD::Oracle causes core dumps

A quick search revealed the same to me, so I guess you'll have to rebuild that too :(
Enjoy, Have FUN! H.Merijn
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

 
H.Merijn Brand (procura
Honored Contributor

Re: DBD::Oracle causes core dumps

Can the core dumps tell you wether it is /Oracle/, /DBD-Oracle/, /DBI/, or /perl/ that's getting confused and dumps core?
Enjoy, Have FUN! H.Merijn
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

This perl-script:

#!/opt/perl5/bin/perl
use DBI;


$dbh=DBI->connect('dbi:Oracle:host=localhost;sid=xlab;port=2629', 'xxxxxx', 'xxxxxx') or die "Unable to connect: $DBI::errstr";
print "Connect!\n";
$sth = $dbh->prepare("select * from tbar_account");
$sth->execute();

while (@row = $sth->fetchrow_array) #### Die Werte in das Array @row schreiben
{
print "@row";
# $SHARENAME = $row[0]; #### Den Pfad in eine Variable schreiben
# $ARR_PFAD_PERM[$ARR_GROESSE_PERM] = $SHARENAME; #### Dann den verM-dnderten Datenstring wieder in ein Array schreiben,
# $ARR_GROESSE_PERM += "1"; #### dieses Array wird in den Subroutinen hold_rights und get_old_rights verwendet.
}
# print @ARR_PFAD_PERM;


causes this core-dump:

perl /www/cgi-bin/1test.pl
Segmentation fault (core dumped)
root@U8POA:/home/bonet/DBD-Oracle-1.12# file core
core: core file from 'perl' - received SIGSEGV



Markus
H.Merijn Brand (procura
Honored Contributor

Re: DBD::Oracle causes core dumps

Still don't see what version of Oracle you are using.

ALWAYS:

1. use strict;
2. use warnings;

In this case:

a. use DBI debugging to see where the script realy fails


#!/opt/perl5/bin/perl -w

use strict;

use DBI;

DBI->trace (99);
$dbh=DBI->connect ('dbi:Oracle:host=localhost;sid=xlab;port=2629', 'xxxxxx', 'xxxxxx') or die "Unable to connect: $DBI::errstr";
print "Connect!\n";
$sth = $dbh->prepare ("select * from tbar_account");
$sth->execute ();
while (@row = $sth->fetchrow_array) {
print "@row\n";
}


# gdb /opt/perl5/bin/perl core
:
:
:
gdb > where

????
Enjoy, Have FUN! H.Merijn
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

 
H.Merijn Brand (procura
Honored Contributor

Re: DBD::Oracle causes core dumps

So you,ve got Oracle 8. But which? 8.1.7?

Check the README of Oracle installation guide, it states that there are some HP-UX patches are to be installed (pthread related?)

Check the README.hpux for DBD::Oracle

Check the libpthread lib, and if there are still patches available that you did not install

a5:/usr/lib 102 # what libpthread.sl
libpthread.sl:
mutex.c $Date: 2002/01/02 14:04:08 $Revision: r11ros/4 PATCH_11.00 (PHCO_26000)
libpthread.c $Date: 2002/01/10 10:24:01 $Revision: r11ros/8 PATCH_11.00 (PHCO_26000)
Pthread Interfaces
libpthread HP-UX (Release B.11.00): Thu Jul 5 15:26:27 PDT 2001
a5:/usr/lib 103 # ll libcl*
1890 lrwxr-xr-x 1 root sys 9 Sep 24 2001 libcl.0 -> ./libcl.1
1891 -r-xr-xr-x 1 bin bin 1388160 Jun 22 2001 libcl.1
7129 -r-xr-xr-x 1 bin bin 1253376 Jun 12 2001 libcl.2
4500 -r--r--r-- 1 bin bin 1463012 Jun 12 2001 libcl.a
1893 lrwxr-xr-x 1 root sys 9 Sep 24 2001 libcl.sl -> ./libcl.2
a5:/usr/lib 104 # what libcl.2
libcl.2:
Trap Library version UX.11.01.03(GS IB4) - November 16, 1998
Unwind Library version UX.11.01.05 - 00/08/15
fs_amod.s $Revision: 1.9.1.1 $
libcl.sl version B.11.01.08 - Jun 15, 2001
a5:/usr/lib 105 #

Asign points to the answers
Enjoy, Have FUN! H.Merijn
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

It's Oracle 8.0.0.3 EE.

I looked around for patches. Might this be the needed one?

http://support4.itrc.hp.com/service/patch/patchDetail.do?patchid=PHCO_23792&context=hpux:800:11:00



Markus
H.Merijn Brand (procura
Honored Contributor

Re: DBD::Oracle causes core dumps

Almost, PHCO_2600 (http://support4.itrc.hp.com/service/patch/patchDetail.do?patchid=PHCO_26000&context=hpux:800:11:00) is superceding it.

Asign points to /all/ messages. N/A if you think it's not appropriate, but make this thread valuable for the other members too. People look for bunnies and such to see if a thread /solves/ a problem:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x022718276953d61190040090279cd0f9,00.html

I myself am absolutely no Oracle expert, and do not want to become one. I happen to know some bits about perl. I /have to/ work with Oracle (7.3.4.1 and 8.1.7.0) but rather I did not have to. No experience with 8.0.0.3
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: DBD::Oracle causes core dumps

FWIW, I followed the docs Tim and I wrote blindly, rebuilding perl -lcl and -lpthread, re-installed all modules (I wanted to know if all still passed all tests with the newly built perl, which it did), went to DBD-Oracle-1.12, set ORACLE_USERID to "user/password", SHLIB_PATH to "/pro/oracle/v817/lib:$SHLIB_PATH" and did 'make test'

All passed. ()

Now I went back to a usual application, which caused a core dump. Now I went back to DBD-Oracle-1.12 and did:

bev l1:/pro/3gl/CPAN/DBD-Oracle-1.12 109 > env PERL_DL_NONLAZY=1 /pro/bin/perl -Iblib/arch -Iblib/lib -I/pro/lib/perl5/5.6.1/PA-RISC2.0 -I/pro/lib/perl5/5.6.1 `path dbmgr`
bevtest /usr/lib/dld.sl: Can't open shared library: /project/hpux/817/src_final/lib//libwtc8.sl
/usr/lib/dld.sl: No such file or directory
install_driver(Oracle) failed: Can't load 'blib/arch/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such file or directory at /pro/lib/perl5/5.6.1/PA-RISC2.0/DynaLoader.pm line 206.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /pro/po/bin/dbmgr line 118
Exit 255
bev l1:/pro/3gl/CPAN/DBD-Oracle-1.12 110 >

YUCK!, this is why I *hate* the arrogance that Oracle vapours.

# cd /
# mkdir project
# cd project
# mkdir hpux
# cd hpux
# mkdir 817
# cd 817
# ln -s ../../../pro/oracle/v817 src_final
# dbmgr
bevtest + Online
bevv817 Offline
#

Yup, that works. Now where can I get that canon to kill Oracle?
Enjoy, Have FUN! H.Merijn
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

Hi!

After some more research I got it running now!

The clue was to add a parameter to Configure for Perl. (found i another thread: Configure -A prepend:libswanted='cl pthread ')

As I run a test-script as root, all is fine. Connect and data can be taken from db.

When I switch to www-user, the following error occurs.

install_driver(Oracle) failed: Can't load '/opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: Permission denied at /opt/perl5/lib/5.6.1/PA-RISC2.0/DynaLoader.pm line 206.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected

But Oracle.sl can be read by www, so I don't know which permission is missing.


Any help?
Markus
H.Merijn Brand (procura
Honored Contributor

Re: DBD::Oracle causes core dumps

> After some more research I got it running now!

Good.

> The clue was to add a parameter to Configure for Perl. (found i another
> thread: Configure -A prepend:libswanted='cl pthread ')

That's what I've put in the README.hpux for 5.8.0, but are you sure that worked? because I had to alter Configure to accept the final space in that option.

> As I run a test-script as root, all is fine. Connect and data can be taken
> from db.
>
> When I switch to www-user, the following error occurs.
>
> install_driver(Oracle) failed: Can't load
> '/opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl' for

Has it 555 mode? Can the www user reach the complete path?

> module DBD::Oracle: Permission denied at
> /opt/perl5/lib/5.6.1/PA-RISC2.0/DynaLoader.pm line 206. at (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where expected

I still guess it's Oracle.sl

> But Oracle.sl can be read by www, so I don't know which permission is missing.

/read/ is not enough, it needs execute too
Enjoy, Have FUN! H.Merijn
Markus Bonet
Advisor

Re: DBD::Oracle causes core dumps

Complete path to Oracle.sl is accessable by www.

Oracle.sl has 755, so read and exec.

I really don't know what permissions are missing.


Markus