Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: ORA-03118 two-task error while doing a non blocking OCI call

Re: ORA-03118 two-task error while doing a non blocking OCI call

From: None of ur business <320050932735-0001_at_t-online.de>
Date: Thu, 11 Jan 2001 04:09:02 +0100
Message-ID: <3A5D23CE.74424212@t-online.de>

On the Oracle Metalink OCI Forum another user has reported a problem when running the OCI in NON BLOCKING mode and fetching data The post was as followos:

> Core Dump when non blocking fetch is used
>
> Hi,
>
> I urgently need help with a strange scenario that I encountered.
>
> I have a little test program that reads data from a single table. It uses DefineByPos and DefineArray to read data in bulk.
>
> The program works fine if it is in blocking mode. However, if I set it to non blocking mode and with a magic number of fetch rows in OCIStmtFetch, the program will core dump.
>
> The result set contains a various data type: varchar2, raw and date. I am not sure whether it is caused by some conversion when data is fetch. It also seems to be timing related since when I the program is connected to the database through a slow network, it core dump earlier.
>
> The call stack look like this:
>
> [1] __align_cpy_1(0x39a2cc, 0x1, 0x7309, 0x7, 0x0, 0x39a2cc), at 0xfea606ec
> [2] ttcSetBuf(0x5463c, 0x55da4, 0x5cc54, 0xff1ad27c, 0x0, 0x0), at 0xfef59ee0
> [3] ttcdrv(0x55ac4, 0x55da4, 0xff1ad27c, 0x55da6, 0x55da4, 0x55da8), at 0xfef5ae2c
> [4] nioqwa(0x546e0, 0x0, 0xfef5a024, 0x55ac4, 0x54664, 0x0), at 0xfee9dcdc
> [5] upirtrc(0x546e0, 0x54d04, 0x0, 0x0, 0x5d0c0, 0x5d058), at 0xfed21abc
> [6] kpurcsc(0x5d058, 0xffbeef8e, 0x54604, 0x55ac4, 0x561fc, 0x0), at 0xfed60d38
> [7] kpufch0(0x0, 0x547c0, 0x5463c, 0x55a14, 0x5d058, 0x5cc98), at 0xfedb77a0
> [8] kpufch(0x5d084, 0x547c0, 0x0, 0xff1ad27c, 0x54604, 0x2), at 0xfedb8384
> =>[9] Fetch(uRowCount = 0), line 78 in "nbquery.cpp"
> [10] ExecuteSQL(), line 187 in "nb.cpp"
> [11] main(argc = 2, argv = 0xffbef1ec), line 219 in "nb.cpp"
>
>
> Any help or suggestions are appreciated.
>
> Thanks ahead,
> Ben
> benjamin.ho_at_cicadacorp.com

Since everything works fine in BLOCKING mode, I guess it's just a bug somewhere in the Oracle code. Depending on the Oracle version and platform it might cause differnt errors.

--tcbw

Barry Leslie wrote:
>
> Hi,
>
> I have an application that runs on Linux and uses OCI API (version 8.1.6).
>
> If I do the following in non blocking mode after polling about
> 70 times I get the error:
>
> ORA-03118: two-task coroutine has invalid state
>
> do {
> call_cnt++;
> rtc = OCIStmtFetch(stmtptr->stmt, oracle_err, 1, OCI_FETCH_NEXT,
> OCI_DEFAULT);
> } while (rtc == OCI_STILL_EXECUTING);
>
> This doesn't happen all the time but it happens most often on big selects.
>
> Does anyone have any idea what is happening here?
>
> I have searched for related information but have come up dry. If anyone
> knows anything or maybe a better place to ask this question please tell me.
>
> Thanks,
> Barry
Received on Wed Jan 10 2001 - 21:09:02 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US