Re: cursor.execute() stays blocked on a weird statement without propagating ORA-01652

ConcreteVitamin <[email protected]> Mon, 3 May 2021 10:34:48 -0700
Newsgroups gmane.comp.python.db.cx-oracle
Message-ID <CAG2+eohT4hRpb=m=fPxQ8AHUA6eFc13KXRC=gi6Q-xNfOk1YYA@mail.gmail.com>
--===============2446231996191498047==
Content-Type: multipart/alternative; boundary="0000000000007bd61b05c17061dc"

--0000000000007bd61b05c17061dc
Content-Type: text/plain; charset="UTF-8"

Hi Anthony - thanks for the reply.  I've filed
https://github.com/oracle/python-cx_Oracle/issues/559, with more detailed
info included (e.g., setting DPI_DEBUG_LEVEL to 15).

On Mon, May 3, 2021 at 9:53 AM Anthony Tuininga <[email protected]>
wrote:

> Hi,
>
> First, this e-mail list is no longer used very much. I would suggest
> adding an issue here: https://github.com/oracle/python-cx_Oracle/issues.
> You're more likely to get help there.
>
> Second, you need to set DPI_DEBUG_LEVEL to the value 4, not 64. 64 is used
> for logging messages while the library is being loaded and 4 is used for
> logging ODPI-C calls -- which is what you want in this case. That said, you
> should *still* see messages -- even if only the one saying that debugging
> messages have been initialized. So double check that the environment
> variable is in fact being set!
>
> Finally, I have no idea why SQL*Plus would "work" and cx_Oracle "would not
> work" since they use the same libraries. It might be helpful to show the
> cx_Oracle code you are using.
>
> Anthony
>
> On Sat, May 1, 2021 at 11:46 PM ConcreteVitamin <[email protected]>
> wrote:
>
>>  Hi there,
>>
>> I've a weird statement that's pretty expensive.  Entering this SQL
>> statement in sqlplus eventually leads to this error:
>>
>>     ERROR at line 1:
>>     ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
>>
>> This is expected & good.
>>
>> However, using cx_Oracle, specifically using
>>
>>     cursor.execute(same_statement)
>>
>> would result in the same amount of work being done, and at some point the
>> CPU utilization on the server stopped -- which meant ORA-01652 has happened
>> -- but the cursor.execute(...) call stays blocked without raising an
>> exception.  This makes the app stay in a stuck state.  At that point it
>> doesn't respond to Ctrl-C SIGINT.
>>
>> I've tried export DPI_DEBUG_LEVEL=64 and there are no messages being
>> printed.
>>
>> What's wrong?  Is it possible to enable an exception to be raised?
>>
>> Server: 19c [where sqlplus was run]
>> cx_Oracle: 8.1 [different host from the server; using same DSN as sqlplus]
>>
>> Thanks.
>> _______________________________________________
>> cx-oracle-users mailing list
>> cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>>
> _______________________________________________
> cx-oracle-users mailing list
> cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>

--0000000000007bd61b05c17061dc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Anthony - thanks for the reply.=C2=A0 I&#39;ve filed=C2=
=A0<a href=3D"https://github.com/oracle/python-cx_Oracle/issues/559">https:=
//github.com/oracle/python-cx_Oracle/issues/559</a>, with more detailed inf=
o included (e.g., setting DPI_DEBUG_LEVEL to 15).</div><br><div class=3D"gm=
ail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, May 3, 2021 at 9:5=
3 AM Anthony Tuininga &lt;<a href=3D"mailto:[email protected]">ant=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_=
quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,=
204);padding-left:1ex"><div dir=3D"ltr">Hi,<div><br></div><div>First, this =
e-mail list is no longer used very much. I would suggest adding an issue he=
re:=C2=A0<a href=3D"https://github.com/oracle/python-cx_Oracle/issues" targ=
et=3D"_blank">https://github.com/oracle/python-cx_Oracle/issues</a>. You&#3=
9;re more likely to get help there.</div><div><br></div><div>Second, you ne=
ed to set DPI_DEBUG_LEVEL to the value 4, not 64. 64 is used for logging me=
ssages while the library is being loaded and 4 is used for logging ODPI-C c=
alls -- which is what you want in this case. That said, you should *still* =
see messages -- even if only the one saying that debugging messages have be=
en initialized. So double check that the environment variable is in fact be=
ing set!</div><div><br></div><div>Finally, I have no idea why SQL*Plus woul=
d &quot;work&quot; and cx_Oracle &quot;would not work&quot; since they use =
the same libraries. It might be helpful to show the cx_Oracle code you are =
using.</div><div><br></div><div>Anthony</div></div><br><div class=3D"gmail_=
quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, May 1, 2021 at 11:46 P=
M ConcreteVitamin &lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt; wrote:<br></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli=
d rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">=C2=A0Hi there,<div><=
br></div><div>I&#39;ve a weird statement that&#39;s pretty expensive.=C2=A0=
 Entering this SQL statement in sqlplus eventually leads to this error:</di=
v><div><br></div><div>=C2=A0 =C2=A0 ERROR at line 1:<br>=C2=A0 =C2=A0 ORA-0=
1652: unable to extend temp segment by 128 in tablespace TEMP<br></div><div=
><br></div><div>This is expected &amp; good.=C2=A0=C2=A0</div><div><br></di=
v><div>However, using cx_Oracle, specifically using=C2=A0</div><div><br></d=
iv><div>=C2=A0 =C2=A0 cursor.execute(same_statement)</div><div><br></div><d=
iv>would result in the same amount of work being done, and at some point th=
e CPU utilization on the server stopped -- which meant=C2=A0ORA-01652 has h=
appened -- but the cursor.execute(...) call stays blocked without raising a=
n exception.=C2=A0 This makes the app stay in a stuck state.=C2=A0 At that =
point it doesn&#39;t respond to Ctrl-C SIGINT.</div><div><br></div><div>I&#=
39;ve tried export=C2=A0DPI_DEBUG_LEVEL=3D64 and there are no messages bein=
g printed.</div><div><br></div><div>What&#39;s wrong?=C2=A0 Is it possible =
to enable an exception to be raised?=C2=A0=C2=A0</div><div><br></div><div>S=
erver: 19c [where sqlplus was run]</div><div>cx_Oracle: 8.1 [different host=
 from the server; using same DSN as sqlplus]</div><div><br></div><div>Thank=
s.</div></div>
_______________________________________________<br>
cx-oracle-users mailing list<br>
<a href=3D"mailto:cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" target=3D"_blank">=
cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/cx-oracle-users" re=
l=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/list=
info/cx-oracle-users</a><br>
</blockquote></div>
_______________________________________________<br>
cx-oracle-users mailing list<br>
<a href=3D"mailto:cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" target=3D"_blank">=
cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/cx-oracle-users" re=
l=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/list=
info/cx-oracle-users</a><br>
</blockquote></div>

--0000000000007bd61b05c17061dc--


--===============2446231996191498047==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============2446231996191498047==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
cx-oracle-users mailing list
cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/cx-oracle-users

--===============2446231996191498047==--