Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

Hi,
I am trying small sample proc program on HP unix 64 bit machine. But with 9.2.0.5 it gives core dump

program:
====
#include
#include
#include
#include

#define USERNAME "xx1"
#define PASSWORD "xx1"


char *username = USERNAME;
char *password = PASSWORD;
VARCHAR dynstmt[80];
VARCHAR ename[12];
int empno = 10;
main() {
EXEC SQL WHENEVER SQLERROR GOTO error;
EXEC SQL CONNECT :username IDENTIFIED BY :password;
puts("Connected\n");
exit(1);
error :
puts("\n not connected.\n");
}

Machine is
HP-UX xx B.11.11 U 9000/800 178484665 unlimited-user license

The program runs fine in oracle 9.0.1.4.0
But it gives core dump in oracle 9.2.0.5.0

GDB Trace is shown below,
====
#0 0x800003ffbf157390 in pthread_default_stacksize_np+0xe8 () from /usr/lib/pa20_64/libpthread.1
#1 0x800003ffbfe609c0 in Ldipme10+0x85daf0 ()
from /u01/apps/products/oracle/902/lib/libclntsh.sl.9.0
#2 0x800003ffbf9f1130 in Ldipme10+0x3ee260 ()
from /u01/apps/products/oracle/902/lib/libclntsh.sl.9.0
#3 0x800003ffbf9f48c8 in Ldipme10+0x3f19f8 ()
from /u01/apps/products/oracle/902/lib/libclntsh.sl.9.0
#4 0x800003ffbf9f5294 in Ldipme10+0x3f23c4 ()
from /u01/apps/products/oracle/902/lib/libclntsh.sl.9.0
=========

Can anyone help me out ? Have anyone faced this issue ?

Also, is there any patch needs to be updated for 9.2.0.5 ?

Thanks.

With Regards,
Srinivasan S


11 REPLIES
Julio Yamawaki
Esteemed Contributor

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

Hi,

Oracle Server 9.0 is a 64/32 bit version while 9.2 is a 64 bit full version.
Probably you are addressing 64 bits lib when compiling in 9.2 version.
Try addressing $ORACLE_HOME/lib32 when compiling this program.
If your problem continue, please let me know.

Regards.

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

Hi,
Thanks for your suggestion.
I am in the process of installing of proc32.

But anyway If I have to run in 64 Bit why should it give core dump ? I have checked the environment libraries. It all points to 64 Bit only.
PAVIC Thierry
Frequent Advisor

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

Check the lib used by you makefile, take a look at your env, specialy the PA RISK library.

I'm not sure but check if the 9i Oracle server is actually a 64 bit version.

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

It is 64 bit and i do checked using command "ldd".

and checked the library loaded it is infact pointing to 64 bit library.

Well,
During this time of investigation, if I place -lpthread option ie., if enabling thread it is running fine ?


I am not able to understand logic behind this.

Regards,
Srinivasan S
Volker Borowski
Honored Contributor

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

Hi,

from 9.2 on the client libs are release dependend. YOu need to change the client libs to the new client-sw.

In addition, never use a DEFINE for a password in a C-program !

strings programname

will exploit uid and password in this case.
Use real coding an my be the chr() function.

passwd[0]=chr(65);
passwd[1]=chr(66);
passwd[2]=chr(67);
passwd[3]=0;

Not so easy to crack, and in addition, keep an eye on the sourcecode.

Hope this helps
Volker

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

Thanks.( This is just installation check code)

Moreover I am not using it as separate client at all.

I am wondering why I should add -lpthread option in 9.2.0.5 where as it does not require in 9.0.1.4.0 ?

Regards,
Srinivasan S

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

Based on suggestions I checked environment.
But I am clueless. When I include -lpthread option the program seems to work fine.

Can anyone teach me whether -lpthread is needed in all proc programs from 9.2.0.5 ?

To my understanding we include -lpthread iff we have multi thread programs.

Also,
When should I do relink and not do relink ?

Meaning everytime If installed 9.2.0.5.0 do the relink is required ?
ranganath ramachandra
Esteemed Contributor

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

does this mean - when you didnt link with libpthread the program coredumped inside libpthread ? if that is the case, some shared library has a dependency on libpthread anyway. so perhaps that library assumes you are going to link in libpthread. what do oracle folks say ?

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

Yes if i dont include -lpthread it gives abort.

I have not contected oracle support yet.

The thing is same compilation if I do in 9.0.1.4.0 it goes fine.

ranganath ramachandra
Esteemed Contributor

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

since the change is in the oracle version and not in the system (OS,patches etc) it may help to approach oracle. they may be aware of what changes went in and where.
subramonian
Occasional Visitor

Re: HP Unix 64 bit oracle 9i 9.2.0.5.0 Proc Abort Core Dump

Hello Srinivasan ,
We are also facing the same proble as you faced during oracle 9i migration. A simple proc program which connect to oracle 9i is giving coredump... We are using 64 bit HP-UX11i and oracle 9i 64 bit libraries. When we tried with oracle 9i lib32 , it is working fine. In case u come across the same and found solution , please share with us.

Thanks in advance
Subramonian

=============================================
For your reference

#include
#include
#include
#include
#include
#include
EXEC SQL INCLUDE SQLCA ;

int main()
{

EXEC SQL BEGIN DECLARE SECTION ;

char username[15]="" ;
char passwd[15] ="" ;
int count = 0 ;
EXEC SQL END DECLARE SECTION ;

strcpy(username,"ebooking4");
strcpy(passwd,"ebooking4");
EXEC SQL CONNECT :username IDENTIFIED BY :passwd ;
EXEC SQL select count(*) into :count from users ;
cout << "No of users ... " << count <}

compile options

aCC +DA2.0w -g -I $ORACLE_HOME/precomp/public/ -L $ORACLE_HOME/lib -lclntsh connect.cpp

We linked lpthread also , that time also got coredump
=============================================