Skip to content

SEGFAULT when subscribing to change notifications without importing threading #275

@P403n1x87

Description

@P403n1x87

Answer the following questions:

  1. What is your version of Python? Is it 32-bit or 64-bit? Python 3.6.3 (64-bit)

  2. What is your cx_Oracle version? 7.1.1

  3. What exact command caused the problem (e.g. what command did you try to install with)? Who were you logged in as? N.A.

  4. What error(s) you are seeing? SEGFAULT

  5. What OS (and version) is Python executing on? Oracle Linux Server 7.6 (under systemd-nspawn on Ubuntu 18.04.2 LTS)

  6. What is your version of the Oracle client (e.g. Instant Client)? How was it installed? Where is it installed?
    SQL*Plus: Release 18.0.0.0.0 - Production on Mon Mar 4 12:48:41 2019
    Version 18.4.0.0.0

    Installed from repositories

  7. What is your Oracle Database version?
    Oracle XE 18c installed from the OTN RPM

  8. What is the PATH environment variable (on Windows) or LD_LIBRARY_PATH (on Linux) set to? On macOS, what is in ~/lib?
    LD_LIBRARY_PATH="/lib64:/opt/oracle/product/18c/dbhomeXE/lib"
    No ~/lib folder

  9. What Oracle environment variables did you set? How exactly did you set them?
    ORACLE_SID=XE
    ORACLE_BASE=/opt/oracle
    ORAENV_ASK=NO
    ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE

  10. Do you have a small, single Python script that immediately runs to show us the problem?

import cx_Oracle
# import threading  # Uncomment this to "fix" SEGFAULT

def callback(msg):
	print(msg)

db = cx_Oracle.Connection("g", "g", "XE", events=True)

cursor = db.cursor()
try:
	cursor.execute("drop table temp_sub")
except cx_Oracle.DatabaseError:
	pass
cursor = db.cursor()
cursor.execute("create table temp_sub(id number(3))")

sub = db.subscribe(callback=callback, ipAddress="127.0.0.1")
sub.registerquery("select * from temp_sub")

cursor.executemany(
	"insert into temp_sub values (:1)",
	[(i,) for i in range(10)]
)

cursor.execute("drop table temp_sub")
db.close()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions