Visitar URL original
clob.setvalue(0, value) resulting in SystemError: <built-in method setvalue of cx_Oracle.CLOB object at 0x000002A979E5BD98> returned NULL without setting an error | cx_Oracle.OperationalError: ORA-03113: end-of-file on communication channel · Issue #462 · oracle/python-cx_Oracle · GitHub
The Wayback Machine - https://web.archive.org/web/20201123005633/https://github.com/oracle/python-cx_Oracle/issues/462
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clob.setvalue(0, value) resulting in SystemError: <built-in method setvalue of cx_Oracle.CLOB object at 0x000002A979E5BD98> returned NULL without setting an error | cx_Oracle.OperationalError: ORA-03113: end-of-file on communication channel #462

Open
mkmoisen opened this issue Jul 15, 2020 · 7 comments
Labels
bug

Comments

@mkmoisen
Copy link

@mkmoisen mkmoisen commented Jul 15, 2020

Calling clob.setvalue(0, value) where value is a string of length 352 is resulting in a failure.

In cx_Oracle 6.4.1, it fails with:

SystemError: <built-in method setvalue of cx_Oracle.CLOB object at 0x000002A979E5BD98> returned NULL without setting an error

In cx_Oracle 8.0.0, it fails with:

cx_Oracle.OperationalError: ORA-03113: end-of-file on communication channel
cx_Oracle.DatabaseError: DPI-1062: unexpected OCI return value 1041 in function dpiLob_setFromBytes

Before it fails, the call will hang about 15 seconds.

After the failure, it seems like the client is disconnected, as any successive calls will fail with:

(cx_Oracle.OperationalError) ORA-03114: not connected to ORACLE 

It's kind of strange. I am able to reproduce this problem outside of my application if I use cx_Oracle 8.0.0. However I am unable to reproduce outside of my application if I use cx_Oracle 6.4.1. Yet it's definitely impacting my application which uses 6.4.1.

I'm only able to get this error on Oracle 19.0.0.0.0 - I also tried but could not reproduce the error on 12.2.0.1.0.

For other issues:

  1. Is it an error or a hang or a crash?

Hang and then Error

  1. What error(s) you are seeing?

In cx_Oracle 6.4.1, it fails with:

SystemError: <built-in method setvalue of cx_Oracle.CLOB object at 0x000002A979E5BD98> returned NULL without setting an error

In cx_Oracle 8.0.0, it fails with:

cx_Oracle.OperationalError: ORA-03113: end-of-file on communication channel
cx_Oracle.DatabaseError: DPI-1062: unexpected OCI return value 1041 in function dpiLob_setFromBytes
  1. Include a runnable Python script that shows the problem.

I can only reproduce outside of my application using cx_Oracle 8.0.0 - however my application on 6.4.1 is experiencing this problem.

import cx_Oracle
conn = cx_Oracle.connect('user/password@database')


def get_plsql_clob(conn, value):
    cur = conn.cursor()
    clob = cur.var(cx_Oracle.CLOB)
    clob.setvalue(0, value)
    return clob

# This is fine, no issue
clob = get_plsql_clob(conn, 'a' * 351)

# This is fine, no issue
clob = get_plsql_clob(conn, 'a' * 353)

# This will hang for 15 seconds then fail with ORA-03113: end-of-file
clob = get_plsql_clob(conn, 'a' * 352)

# Repeat again and it fails with DPI-1062: unexpected OCI return value 1041 in function dpiLob_setFromBytes
clob = get_plsql_clob(conn, 'a' * 352)
  1. Show the output of:
import sys
import platform

print("platform.platform:", platform.platform())
print("sys.maxsize > 2**32:", sys.maxsize > 2**32)
print("platform.python_version:", platform.python_version())
platform.platform: Windows-10-10.0.17134-SP0
sys.maxsize > 2**32: True
platform.python_version: 3.6.5

And:

import cx_Oracle
print("cx_Oracle.version:", cx_Oracle.version)
print("cx_Oracle.clientversion:", cx_Oracle.clientversion())

For 6.4.1:

cx_Oracle.version: 6.4.1
cx_Oracle.clientversion: (12, 2, 0, 1, 0)

For 8.0.0:

cx_Oracle.version: 8.0.0
cx_Oracle.clientversion: (12, 2, 0, 1, 0)
  1. What is your Oracle Database version?

I encounter this error on an Oracle 19.0.0.0.0 database sitting on a Unix server.

I cannot reproduce the error on Oracle 12.2.0.1.0 on my Windows computer.

@mkmoisen mkmoisen added the bug label Jul 15, 2020
@anthony-tuininga
Copy link
Member

@anthony-tuininga anthony-tuininga commented Jul 16, 2020

I tried with several different versions running on Linux and didn't run into this problem. I'll see if I can get somebody to run it on Windows and see if they can replicate it there. If you are able to further track down the source of the issue, that will be helpful.

@mkmoisen
Copy link
Author

@mkmoisen mkmoisen commented Jul 16, 2020

@anthony-tuininga I just confirmed with my team, all of the Windows users (3 of us) are facing this issue. None of the Mac users (2 people) are facing it. I'll confirm on Linux in a bit. Thank you.

@cjbj
Copy link
Member

@cjbj cjbj commented Aug 4, 2020

@mkmoisen any update?

@mkmoisen
Copy link
Author

@mkmoisen mkmoisen commented Aug 12, 2020

@cjbj I think it only happens on Windows.

@cjbj
Copy link
Member

@cjbj cjbj commented Aug 12, 2020

@mkmoisen can you re-state the working & failing client & server configurations again? I'm a bit lost about whether you mean it only happens on Windows to a DB running on UNIX.

Also, did you try upgrading the client libraries? 19c is effectively the renumbered terminal release of the 12.2 series, so I'd generally encourage upgrading.

@mkmoisen
Copy link
Author

@mkmoisen mkmoisen commented Aug 27, 2020

@cjbj

Can Reproduce? Client OS Client Library Version Server OS Server DB Version
yes Windows 12.2.0.1.0 Linux 19.0.0.0.0
no Linux 12.2.0.1.0 Linux 19.0.0.0.0
no Windows 12.2.0.1.0 Windows 12.2.0.1.0

In the above, all were using cx_Oracle 8.0.0.

I will try to upgrade my client libraries on Windows; however the 12.2.0.1 client library on Linux appears to be working OK.

@cjbj
Copy link
Member

@cjbj cjbj commented Nov 19, 2020

@mkmoisen did you get the clients updated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.