develooper Front page | perl.dbi.users | Postings from June 2009

DBD-Oracle 1.23 reports ORA-24334 in t/58object.t

Thread Next
From:
Peter Jeremy
Date:
June 5, 2009 02:28
Subject:
DBD-Oracle 1.23 reports ORA-24334 in t/58object.t
Message ID:
20090605053128.GA2729@pjdesk.au.alcatel-lucent.com
I am trying to install DBD-Oracle 1.23 with Oracle 10.1.4 on Solaris
10 using the standard (Sun-supplied) perl.  In order to make it build,
I need to edit mk.pm and Makefile, replacing '-xarch=v9' with
'-xarch=native' and changing .../oracle/product/10.1.4/lib to
.../oracle/product/10.1.4/lib32 (see my previous report).  It then
mostly works but reports two errors in the test-suite.  The first one
in t/10general.t is relatively unimportant but I'm nore concerned about
the failure in t/58object.t.

$ perl -Mblib t/10general.t
1..31
not ok 1 - system exit 1 should return 256
not ok 2 - system exit 0 should return 0
ok 3 - preparse, case insensitive, placeholders in comments
...
These two tests fail because Oracle is setting a SIGCHLD handler so
the waitid(2) in system() is returning ECHILD

$ perl -Mblib t/58object.t
1..34
ok 1 - use DBI;
ok 2 - ora_objects flag is set to 1
ok 3 - ora_objects flag is set to 0
ok 4 - The object isa DBI::db
DBD::Oracle::db prepare failed: ORA-24334: no descriptor for this position (DBD ERROR: OCIParamGet) [for Statement "select * from dbd_test__obj_table order by id"] at t/58object.t line 79.
$ 

A more detailed trace of the failure in t/58object.t shows:
    <- do= 1 at t/58object.t line 73
    -> prepare for DBD::Oracle::db (DBI::db=HASH(0x2f3f70)~0x2f3ee0 'select * from dbd_test__obj_table order by id')
    New 'DBI::st' (for DBD::Oracle::st, parent=DBI::db=HASH(0x2f3ee0), id=undef)
    dbih_setup_handle(DBI::st=HASH(0x41f150)=>DBI::st=HASH(0x41f108), DBD::Oracle::st, 4205c0, Null!)
    dbih_make_com(DBI::db=HASH(0x2f3ee0), 2f44e8, DBD::Oracle::st, 320, 0) thr#0
    dbih_setup_attrib(DBI::st=HASH(0x41f108), Err, DBI::db=HASH(0x2f3ee0)) SCALAR(0x14f128) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x41f108), State, DBI::db=HASH(0x2f3ee0)) SCALAR(0x14f188) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x41f108), Errstr, DBI::db=HASH(0x2f3ee0)) SCALAR(0x14f158) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x41f108), TraceLevel, DBI::db=HASH(0x2f3ee0)) 0 (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x41f108), FetchHashKeyName, DBI::db=HASH(0x2f3ee0)) 'NAME' (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x41f108), HandleSetErr, DBI::db=HASH(0x2f3ee0)) undef (not defined)
    dbih_setup_attrib(DBI::st=HASH(0x41f108), HandleError, DBI::db=HASH(0x2f3ee0)) undef (not defined)
    dbih_setup_attrib(DBI::st=HASH(0x41f108), ReadOnly, DBI::db=HASH(0x2f3ee0)) undef (not defined)
    dbih_setup_attrib(DBI::st=HASH(0x41f108), Profile, DBI::db=HASH(0x2f3ee0)) undef (not defined)
        OCIHandleAlloc(38ed78,42048c,OCI_HTYPE_STMT,0,0)=SUCCESS
        OCIStmtPrepare(3ac7bc,3a66f8,'select * from dbd_test__obj_table order by id',45,1,0)=SUCCESS
        OCIAttrGet(3ac7bc,OCI_HTYPE_STMT,420498,0,24,3a66f8)=SUCCESS
        dbd_st_prepare'd sql SELECT (pl1, auto_lob1, check_sql1)
        dbd_describe SELECT (EXPLICIT, lb 80)...
        OCIStmtExecute(3a6684,3ac7bc,3a66f8,0,0,0,0,mode=DESCRIBE_ONLY,16)=SUCCESS
        OCIAttrGet(3ac7bc,OCI_HTYPE_STMT,ffbfef90,0,18,3a66f8)=SUCCESS
        OCIParamGet(3ac7bc,4,3a66f8,41fec0,1)=SUCCESS
        OCIAttrGet(3abfb8,OCI_DTYPE_PARAM,41fedc,0,2,3a66f8)=SUCCESS
        OCIAttrGet(3abfb8,OCI_DTYPE_PARAM,41fede,0,1,3a66f8)=SUCCESS
        OCIAttrGet(3abfb8,OCI_DTYPE_PARAM,41feec,0,285,3a66f8)=SUCCESS
        OCIAttrGet(3abfb8,OCI_DTYPE_PARAM,41feee,0,286,3a66f8)=SUCCESS
        OCIAttrGet(3abfb8,OCI_DTYPE_PARAM,41fef0,0,31,3a66f8)=SUCCESS
        OCIAttrGet(3abfb8,OCI_DTYPE_PARAM,41fef2,0,32,3a66f8)=SUCCESS
        OCIAttrGet(3abfb8,OCI_DTYPE_PARAM,41fee0,0,5,3a66f8)=SUCCESS
        OCIAttrGet(3abfb8,OCI_DTYPE_PARAM,41fee2,0,6,3a66f8)=SUCCESS
        OCIAttrGet(3abfb8,OCI_DTYPE_PARAM,41fee3,0,7,3a66f8)=SUCCESS
        OCIAttrGet(3abfb8,OCI_DTYPE_PARAM,41fee4,ffbfef8c,4,3a66f8)=SUCCESS
Describe col #1 type=2(NVARCHAR2)
Described col  1: dbtype 2(NVARCHAR2), scale 0, prec 38, nullok 1, name ID
                  : dbsize 22, char_used 0, char_size 0, csid 0, csform 0, disize 171
        fbh 1: 'ID'     NULLable, otype   2->  5, dbsize 22/172, p38.s0
        OCIParamGet(3ac7bc,4,3a66f8,41ff24,2)=SUCCESS
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,41ff40,0,2,3a66f8)=SUCCESS
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,41ff42,0,1,3a66f8)=SUCCESS
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,41ff50,0,285,3a66f8)=SUCCESS
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,41ff52,0,286,3a66f8)=SUCCESS
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,41ff54,0,31,3a66f8)=SUCCESS
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,41ff56,0,32,3a66f8)=SUCCESS
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,41ff44,0,5,3a66f8)=SUCCESS
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,41ff46,0,6,3a66f8)=SUCCESS
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,41ff47,0,7,3a66f8)=SUCCESS
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,41ff48,ffbfef8c,4,3a66f8)=SUCCESS
Describe col #2 type=108(ORA_XMLTYPE or SQLT_NTY)
        OCIHandleAlloc(38ed78,420490,OCI_HTYPE_DESCRIBE,0,0)=SUCCESS
Described col  2: dbtype 108(ORA_XMLTYPE or SQLT_NTY), scale 0, prec 0, nullok 1, name OBJ
                  : dbsize 2000, char_used 0, char_size 0, csid 0, csform 0, disize 0
        fbh 2: 'OBJ'    NULLable, otype 108->108, dbsize 2000/0, p0.s0
        OCIAttrSet(3ac7bc,OCI_HTYPE_STMT,ffbfee44,4,13,3a66f8)=SUCCESS
        OCIAttrSet(3ac7bc,OCI_HTYPE_STMT,ffbfee40,4,11,3a66f8)=SUCCESS
        row cache OCI_ATTR_PREFETCH_ROWS 7, OCI_ATTR_PREFETCH_MEMORY 0
        rs_array_init: rs_array_on=0, rs_array_size=1
        OCIDefineByPos(3ac7bc,41fec4,3a66f8,1,420088,172,5,41e420,41e430,41e440,mode=DEFAULT,0)=SUCCESS
        OCIDefineByPos(3ac7bc,41ff28,3a66f8,2,41e450,0,108,41e460,41e470,41e480,mode=DEFAULT,0)=SUCCESS
Field #2 is a  object or colection of some sort. Using OCIDefineObject and or OCIObjectPin 
At level=0 in description an embedded object 
        OCIAttrGet(3abf94,OCI_DTYPE_PARAM,ffbfee44,0,110,3a66f8)=SUCCESS
        OCITypeByRef(38ed78,3a66f8,423dc4)=SUCCESS
        OCIDescribeAny(3a6684,3a66f8,42e360,0,3,1,6,3ab9e4)=SUCCESS
        OCIAttrGet(3ab9e4,OCI_HTYPE_DESCRIBE,4202b8,0,124,3a66f8)=SUCCESS
        OCIAttrGet(3ab9c0,OCI_DTYPE_PARAM,ffbfedcc,ffbfedc8,9,3a66f8)=SUCCESS
        OCIAttrGet(3ab9c0,OCI_DTYPE_PARAM,ffbfedc4,ffbfedc0,4,3a66f8)=SUCCESS
        OCIAttrGet(3ab9c0,OCI_DTYPE_PARAM,4202c4,0,216,3a66f8)=SUCCESS
Getting the properties of object named =SCOTT.DBD_TEST__TYPE_A at level 0 typecode=108
Object named =SCOTT.DBD_TEST__TYPE_A at level 0 is an Object
        OCIAttrGet(3ab9c0,OCI_DTYPE_PARAM,4202cc,0,110,3a66f8)=SUCCESS
        OCIObjectPin_log_stat(38ed78,3a66f8,430cb4,4202d8)=SUCCESS
        OCIAttrGet(3ab9c0,OCI_DTYPE_PARAM,4202e0,0,228,3a66f8)=SUCCESS
        OCIAttrGet(3ab9c0,OCI_DTYPE_PARAM,ffbfedbc,0,229,3a66f8)=SUCCESS
        OCIParamGet(3ab99c,53,3a66f8,ffbfedb8,1)=SUCCESS
        OCIAttrGet(3ab978,OCI_DTYPE_PARAM,436670,436674,4,3a66f8)=SUCCESS
        OCIAttrGet(3ab978,OCI_DTYPE_PARAM,436684,0,216,3a66f8)=SUCCESS
Getting property #1, named=NUM and its typecode is 3 
        OCIParamGet(3ab99c,53,3a66f8,ffbfedb8,2)=SUCCESS
        OCIAttrGet(3ab954,OCI_DTYPE_PARAM,4366b0,4366b4,4,3a66f8)=SUCCESS
        OCIAttrGet(3ab954,OCI_DTYPE_PARAM,4366c4,0,216,3a66f8)=SUCCESS
Getting property #2, named=NAME and its typecode is 9 
        OCIParamGet(3ab99c,53,3a66f8,ffbfedb8,3)=ERROR
        OCIErrorGet(3a66f8,1,"<NULL>",ffbfecbc,"ORA-24334: no descriptor for this position
",1024,2)=SUCCESS
        OCIErrorGet after OCIParamGet (er1:ok): -1, 24334: ORA-24334: no descriptor for this position

        OCIErrorGet(3a66f8,2,"<NULL>",ffbfecbc,"ORA-24334: no descriptor for this position
",1024,2)=NO_DATA
 level=0        type_name = SCOTT.DBD_TEST__TYPE_A
        type_namel = 0
        parmdp = 3ab9c0
        parmap = 0
        tdo = 42e360
        typecode = OBJECT
        col_typecode = 0
        element_typecode = (UNKNOWN OCI TYPECODE 0)
        obj_ref = 430cb4
        obj_value = 0
        obj_type = 42e360
        field_count = 131072
        fields = 436670
  
--->sub objects
   level=1      type_name = NUM
        type_namel = 3
        parmdp = 0
        parmap = 0
        tdo = 0
        typecode = INT
        col_typecode = 0
        element_typecode = (UNKNOWN OCI TYPECODE 0)
        obj_ref = 0
        obj_value = 0
        obj_type = 0
        field_count = 0
        fields = 0
  
--->done NUM

Perl and config details:
$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=solaris, osvers=2.10, archname=sun4-solaris-64int
    uname='sunos localhost 5.10 sun4u sparc SUNW,Ultra-2'
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO',
    optimize='-xO3 -xspace -xildoff',
    cppflags=''
    ccversion='Sun WorkShop', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =''
    libpth=/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE'
    cccdlflags='-KPIC', lddlflags='-G'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
  Locally applied patches:
        22667 The optree builder was looping when constructing the ops ...
        22715 Upgrade to FileCache 1.04
        22733 Missing copyright in the README.
        22746 fix a coredump caused by rv2gv not fully converting a PV ...
        22755 Fix 29149 - another UTF8 cache bug hit by substr.
        22774 [perl #28938] split could leave an array without ...
        22775 [perl #29127] scalar delete of empty slice returned garbage
        22776 [perl #28986] perl -e "open m" crashes Perl
        22777 add test for change #22776 ("open m" crashes Perl)
        22778 add test for change #22746 ([perl #29102] Crash on assign ...
        22781 [perl #29340] Bizarre copy of ARRAY make sure a pad op's ...
        22796 [perl #29346] Double warning for int(undef) and abs(undef) ...
        22818 BOM-marked and (BOMless) UTF-16 scripts not working
        22823 [perl #29581] glob() misses a lot of matches
        22827 Smoke [5.9.2] 22818 FAIL(F) MSWin32 WinXP/.Net SP1 (x86/1 cpu)
        22830 [perl #29637] Thread creation time is hypersensitive
        22831 improve hashing algorithm for ptr tables in perl_clone: ...
        22839 [perl #29790] Optimization busted: '@a = "b", sort @a' ...
        22850 [PATCH] 'perl -v' fails if local_patches contains code snippets
        22852 TEST needs to ignore SCM files
        22886 Pod::Find should ignore SCM files and dirs
        22888 Remove redundant %SIG assignments from FileCache
        23006 [perl #30509] use encoding and "eq" cause memory leak
        23074 Segfault using HTML::Entities
        23106 Numeric comparison operators mustn't compare addresses of ...
        23320 [perl #30066] Memory leak in nested shared data structures ...
        23321 [perl #31459] Bug in read()
        27722 perlio.c breaks on Solaris/gcc when > 256 FDs are available
        SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962
  Built under solaris
  Compiled at Aug  8 2007 19:08:30
  @INC:
    /usr/perl5/5.8.4/lib/sun4-solaris-64int
    /usr/perl5/5.8.4/lib
    /usr/perl5/site_perl/5.8.4/sun4-solaris-64int
    /usr/perl5/site_perl/5.8.4
    /usr/perl5/site_perl
    /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int
    /usr/perl5/vendor_perl/5.8.4
    /usr/perl5/vendor_perl
    .
$ perl Makefile.PL
Using DBI 1.59 (for perl 5.008004 on sun4-solaris-64int) installed in /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI/

Configuring DBD::Oracle for perl 5.008004 on solaris (sun4-solaris-64int)

Remember to actually *READ* the README file! Especially if you have any problems.

Installing on a solaris, Ver#2.10
Using Oracle in /osp/3rdpty/oracle/product/10.1.4
DEFINE _SQLPLUS_RELEASE = "1001000500" (CHAR)
Oracle version 10.1.0.5 (10.1)
Found /osp/3rdpty/oracle/product/10.1.4/rdbms/demo/demo_rdbms.mk
Found /osp/3rdpty/oracle/product/10.1.4/rdbms/lib/ins_rdbms.mk
Using /osp/3rdpty/oracle/product/10.1.4/rdbms/demo/demo_rdbms.mk
Your LD_LIBRARY_PATH env var is set to '/osp/3rdpty/oracle/product/10.1.4/lib32:/osp/3rdpty/oracle/product/10.1.4/lib'
Reading /osp/3rdpty/oracle/product/10.1.4/rdbms/demo/demo_rdbms.mk
Reading /osp/3rdpty/oracle/product/10.1.4/rdbms/lib/env_rdbms.mk

Attempting to discover Oracle OCI build rules
cc   -c  DBD_ORA_OBJ.c
by executing: [make -f /osp/3rdpty/oracle/product/10.1.4/rdbms/demo/demo_rdbms.mk build ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=true OPTIMIZE= CCFLAGS= EXE=DBD_ORA_EXE OBJS=DBD_ORA_OBJ.o]
Oracle oci build command:
        [true  -xarch=v9 -L/osp/3rdpty/oracle/product/10.1.4/lib/ -L/osp/3rdpty/oracle/product/10.1.4/rdbms/lib/ -o DBD_ORA_EXE DBD_ORA_OBJ.o -lclntsh   `cat /osp/3rdpty/oracle/product/10.1.4/lib/sysliblist` -R/osp/3rdpty/oracle/product/10.1.4/lib -laio  -lposix4 -lkstat -lm  -lthread]

Found header files in /osp/3rdpty/oracle/product/10.1.4/rdbms/public.

Checking for functioning wait.ph


System: perl5.008004 sunos localhost 5.10 sun4u sparc SUNW,Ultra-2
Compiler:   cc -xO3 -xspace -xildoff -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO
Linker:     not found
Sysliblist: -lnsl -lsocket -lgen -ldl 
Oracle makefiles would have used these definitions but we override them:
  CC:       cc
  CFLAGS:   $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)\
        $(SHARED_CFLAG) $(USRFLAGS)
           [$(GFLAG) -xO3 $(CDEBUG) -Xa $(PROFILE) -xstrconst -dalign -xF $(XS) $(MR) -xildoff -errtags=yes -v -xarch=v9 -xchip=ultra3 -W2,-AKNR_S -Wd,-xsafe=unboundsym -Wc,-Qiselect-funcalign=32 -xcode=abs44 -Wc,-Qgsched-trace_late=1 -Wc,-Qgsched-T5 -xalias_level=weak -D_REENTRANT -DSS_64BIT_SERVER -DBIT64 -DMACHINE64 -K PIC -I/osp/3rdpty/oracle/product/10.1.4/rdbms/demo -I/osp/3rdpty/oracle/product/10.1.4/rdbms/public -I/osp/3rdpty/oracle/product/10.1.4/plsql/public -I/osp/3rdpty/oracle/product/10.1.4/network/public -DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD -D_REENTRANT $(LPFLAGS) $(USRFLAGS)]
  LDFLAGS:  -o $@ $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME) $(LDPATHFLAG)$(LIBHOME)/prod/lib/v9
           [-o $@ -L/osp/3rdpty/oracle/product/10.1.4/rdbms/lib/ -L$(LIBHOME) -L$(LIBHOME)/prod/lib/v9]
Linking with OTHERLDFLAGS = -xarch=v9 -L/osp/3rdpty/oracle/product/10.1.4/lib/ -L/osp/3rdpty/oracle/product/10.1.4/rdbms/lib/   -lclntsh   `cat /osp/3rdpty/oracle/product/10.1.4/lib/sysliblist` -R/osp/3rdpty/oracle/product/10.1.4/lib -laio  -lposix4 -lkstat -lm  -lthread [from 'build' rule]


WARNING: If you have problems you may need to rebuild perl with threading enabled.
Checking if your kit is complete...
Looks good
LD_RUN_PATH=/osp/3rdpty/oracle/product/10.1.4/lib32:/osp/3rdpty/oracle/product/10.1.4/rdbms/lib32
Using DBD::Oracle 1.23.
Using DBD::Oracle 1.23.
Using DBI 1.59 (for perl 5.008004 on sun4-solaris-64int) installed in /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI/
Writing Makefile for DBD::Oracle

***  If you have problems...
     read all the log printed above, and the README and README.help.txt files.
     (Of course, you have read README by now anyway, haven't you?)

-- 
Peter Jeremy

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About