OCI + AIX 4.2 -- runtime problem.

OCI + AIX 4.2 -- runtime problem.

Post by Patrick Keshishi » Thu, 11 Dec 1997 04:00:00



Hi all,

   I have been trying to write some code that will be able to insert/
   fetch LONG RAW datatype into/from Oracle 7.3.2 running on AIX 4.2.
   My main problem is documentation.  I have almost none!

   After a few days of looking around on our development machiens
   I was finally able to find the library to link with (or so I
   believe I have found it), libclntsh.a.

   One problem though:  whenever I run my executable it core-dumps with
   signal 11 seg. fault (see pasted text below).  The core file makes
   reference to  'reset_pthread_kill()'  function.  I must note that
   my simple-little-test applications doesn't use threads (I can include
   the source file if you want but I figured you'd not want to look
   at a source from someone else).  To be sure that it isn't my lack of
   programming skills (*smirk*) that is causing this core-dump I took
   one of the demo files that was in the $ORACLE_HOME/rdbms/demo direcotry,
   "oci01.c" to be exact, and compiled it the same way as I did my own
   sample program.  At run time this demo program also core-dumps with
   a similar stack trace from the de*.

   I was wondering if you could suggest something that I was doing
   wrong or not doing that is causing this behavior.

   I read on in the OCI documentation and learned of an OCI call
   'opinit(mode)' which is an optional call to be made before any
   other OCI call to let Oracle know wheather or not the program is
   threaded or not (the default behavior being non-threaded).

   The problem is that I can't find a supplied library (lib*.a file)
   that contains this OCI call.  Any ideas?

   I have no support from our DBA.  He refuses to call Oracle and
   ask for help (in documentation form or otherwise) since our group
   is using the GNU C/C++ compiler (gcc) instead of the IBM CSet++.
   Though this is not a compiler *issue*).  Or am I wrong? :->

   Anyway...I'd appreciate any input regarding the core-dump problem.
   Am I not linking the with proper libs?

   Thanks for listening to my rantings :-)

Patrick ...

P.S.  We are using:

/usr/ecg/echub/classlib/src-2.0> gcc -v
Reading specs from /usr/ecg/lib/gcc-lib/powerpc-ibm-aix4.1.4.0/2.7.2.3/specs
gcc version 2.7.2.3

P.P.S. What my simple test program does is connect the the db and
       gets the column count of a certain table (yes it is already
       created in the db).

-- begin paste from gdb --
GDB 4.16 (powerpc-ibm-aix4.1.4.0),
Copyright 1996 Free Software Foundation, Inc...
Core was generated by `my_oci_app'.
Program terminated with signal 11, Segmentation fault.
#0  0xd03cf628 in reset_pthread_kill ()
(gdb) bt
#0  0xd03cf628 in reset_pthread_kill ()
#1  0xd03d035c in sigaction ()
#2  0xd02d051c in signal ()
#3  0xd08499e0 in osnsui ()
#4  0xd08474d0 in osntns1 ()
#5  0xd07d9240 in osncon ()
#6  0xd07129d8 in upiini ()
#7  0xd0729d4c in upiah0 ()
#8  0xd084fdb0 in upilgn ()
#9  0xd08514d4 in upilog ()
#10 0xd06f1434 in ocilog ()
#11 0x1000036c in main (argCount=1, argValue=0x2ff22bd8) at my_oci_app.C:70
#12 0x100001a0 in __start ()
-- end paste from gdb --

 
 
 

OCI + AIX 4.2 -- runtime problem.

Post by Doogi » Thu, 11 Dec 1997 04:00:00


Patrick,
        Oracle has a program to help you find symbols...  Try the symfind
utility (it's in $ORACLE_HOME/rdbms/bin - I think).


> Hi all,

>    I have been trying to write some code that will be able to insert/
>    fetch LONG RAW datatype into/from Oracle 7.3.2 running on AIX 4.2.
>    My main problem is documentation.  I have almost none!

>    After a few days of looking around on our development machiens
>    I was finally able to find the library to link with (or so I
>    believe I have found it), libclntsh.a.

>    One problem though:  whenever I run my executable it core-dumps with
>    signal 11 seg. fault (see pasted text below).  The core file makes
>    reference to  'reset_pthread_kill()'  function.  I must note that
>    my simple-little-test applications doesn't use threads (I can include
>    the source file if you want but I figured you'd not want to look
>    at a source from someone else).  To be sure that it isn't my lack of
>    programming skills (*smirk*) that is causing this core-dump I took
>    one of the demo files that was in the $ORACLE_HOME/rdbms/demo direcotry,
>    "oci01.c" to be exact, and compiled it the same way as I did my own
>    sample program.  At run time this demo program also core-dumps with
>    a similar stack trace from the de*.

>    I was wondering if you could suggest something that I was doing
>    wrong or not doing that is causing this behavior.

>    I read on in the OCI documentation and learned of an OCI call
>    'opinit(mode)' which is an optional call to be made before any
>    other OCI call to let Oracle know wheather or not the program is
>    threaded or not (the default behavior being non-threaded).

>    The problem is that I can't find a supplied library (lib*.a file)
>    that contains this OCI call.  Any ideas?

>    I have no support from our DBA.  He refuses to call Oracle and
>    ask for help (in documentation form or otherwise) since our group
>    is using the GNU C/C++ compiler (gcc) instead of the IBM CSet++.
>    Though this is not a compiler *issue*).  Or am I wrong? :->

>    Anyway...I'd appreciate any input regarding the core-dump problem.
>    Am I not linking the with proper libs?

>    Thanks for listening to my rantings :-)

> Patrick ...



 
 
 

1. Using Oracle OCI 8.x on AIX 4.2

Hi all,

we have an application compiled with AIX c89 ( or xlc ) compiler. This
application loads
a database driver (using dlopen)  which is  a shared library also compiled
under c89. This driver
is linked with Oracle's OCI libraries. The loading goes okay, however, when
we call any OCI functions, the application aborts with a core dump.  Does
any one have idea what could be causing this? I know that the
OCI libraries are compiled with xlc_r ( thread safe ) compilers but they
should be loadable from
a c89 compiled application.

Any help will be appreciated.

Riaz Merchant
Mertech Data Systems Inc
Miami FL

2. Composite Keys

3. OCI and AIX 4.2

4. Oracle DBA

5. Re-licensing Informix V4 from AIX 3.1 to AIX 4.2 - considering WinNT

6. MSDTC Service

7. Oracle Transparent Gateway 4.0.0.1 for AIX 4.2 installation problem

8. GateWay Insatllation Problem (DRDA 4.0.0.1) on RS/6000 (AIX 4.2)

9. sqlexecd 7.1 problem in AIX 4.2!!