This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: windows 7 python 3.6 : after some security updates, import ibm_db fails
Type: security Stage: resolved
Components: Windows Versions: Python 3.6
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, paul.moore, sabakauser, steve.dower, tim.golden, tjguk, zach.ware
Priority: normal Keywords:

Created on 2018-01-10 13:53 by sabakauser, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg309764 - (view) Author: Saba Kauser (sabakauser) Date: 2018-01-10 13:53
Hello,
I have a user who is complaining that python ibm_db module import fails after some windows 7 security update. I am not sure if this is a bug or some other setup issue but I could not find any other forum where I can post this query. Please feel free to point me to correct forum if this is not the correct place.

The error as reported by him is available here : https://github.com/ibmdb/python-ibmdb/issues/294#issuecomment-356254726

When run through pdb, the stack shows this:
C:\Users\IBM_ADMIN\Documents\Python>python -m pdb "test DB2 connection.py"
> c:\users\ibm_admin\documents\python\test db2 connection.py(3)<module>()
-> import ibm_db
(Pdb) continue
Traceback (most recent call last):
  File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python36-32\lib\pdb.py", line 1667, in main
    pdb._runscript(mainpyfile)
  File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python36-32\lib\pdb.py", line 1548, in _runscript
    self.run(statement)
  File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python36-32\lib\bdb.py", line 431, in run
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
  File "c:\users\ibm_admin\documents\python\test db2 connection.py", line 3, in <module>
    import ibm_db
SystemError: <built-in function connect> returned NULL without setting an error
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> c:\users\ibm_admin\documents\python\test db2 connection.py(3)<module>()
-> import ibm_db
(Pdb)

when 'cont' is used, the control reaches python ibm_db driver that should have happened without having to 'cont'.

c:\users\ibm_admin\documents\python\test db2 connection.py(2)()
-> import ibm_db
(Pdb) cont
Traceback (most recent call last):
File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python36-32\lib\pdb.py", line 1667, in main
pdb._runscript(mainpyfile)
File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python36-32\lib\pdb.py", line 1548, in _runscript
self.run(statement)
File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python36-32\lib\bdb.py", line 431, in run
exec(cmd, globals, locals)
File "", line 1, in
File "c:\users\ibm_admin\documents\python\test db2 connection.py", line 2, in
import ibm_db
SQLCODE=-30082][CLI Driver] SQL30082N Security processing failed with reason "15" ("PROCESSING FAILURE"). SQLSTATE=08001
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
c:\users\ibm_admin\documents\python\test db2 connection.py(2)()
-> import ibm_db
(Pdb) cont
Post mortem debugger finished. The test DB2 connection.py will be restarted
c:\users\ibm_admin\documents\python\test db2 connection.py(2)()
-> import ibm_db
(Pdb) cont
Traceback (most recent call last):
File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python36-32\lib\pdb.py", line 1667, in main
pdb._runscript(mainpyfile)
File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python36-32\lib\pdb.py", line 1548, in _runscript
self.run(statement)
File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python36-32\lib\bdb.py", line 431, in run
exec(cmd, globals, locals)
File "", line 1, in
File "c:\users\ibm_admin\documents\python\test db2 connection.py", line 2, in
import ibm_db
SQLCODE=-30082][CLI Driver] SQL30082N Security processing failed with reason "15" ("PROCESSING FAILURE"). SQLSTATE=08001
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
c:\users\ibm_admin\documents\python\test db2 connection.py(2)()
-> import ibm_db
(Pdb)


Please note that the script works fine when run as administrator and it fails only when run as non-admin user. non-admin user too was working fine until recently when some update was applied to windows OS and then it stopped working only for non-admin user. Python and ibm_db driver both have be uninstalled and re-installed for non-admin user, but no luck.
kindly help!
msg309767 - (view) Author: TJG (tjguk) Date: 2018-01-10 13:56
The error is coming from the extension module's "connect" function 
(which is the standard DB API entry point for Python database 
interfaces). Presumably from your description, some environmental 
situation leaves it with an unconsidered code path.

This is not apparently a bug in Python; rather in the extension module 
at the Python C API level. Suggest you raise an issue in the ibm_db 
issue tracker.
msg309768 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2018-01-10 14:22
ibm_db is a third-party module. Please contact the authors of the module. The C code of the module has a bug. It's returning NULL without setting an exception with PyExc_*().
History
Date User Action Args
2022-04-11 14:58:56adminsetgithub: 76708
2018-01-10 14:22:25christian.heimessetstatus: open -> closed
resolution: third party
stage: resolved
2018-01-10 14:22:08christian.heimessetnosy: + christian.heimes
messages: + msg309768
2018-01-10 13:56:55tjguksetnosy: + tjguk
messages: + msg309767
2018-01-10 13:53:19sabakausercreate