Skip to content

Segmentation fault when running in Docker container #1019

@Kyrremann

Description

@Kyrremann

I'm trying to run a Python script in a Docker container talking with db2, but I just get a segmentation fault. We can run the Python-script locally, but when I try it from a container it fails, and using db2cli to debug doesn't help.

  • Operating System Name: Dockerfile FROM python:3.12
  • db2level output from clidriver if in use:
$ ./db2level
DB21085I  This instance or install (instance name, where applicable: "*") uses 
"64" bits and DB2 code release "SQL11059" with level identifier "060A010F".
Informational tokens are "DB2 v11.5.9.0", "special_50315", 
"DYN2410311831AMD64_50315", and Fix Pack "0".
Product is installed at "..".
  • Target Db2 Server Version: ??
  • Python Version: 3.12.11
  • ibm_db version: 3.2.6
  • For non-Windows, output of below commands:
    uname = Linux
    uname -m = x86_64
  • Value of below environment variables if set:
    IBM_DB_HOME:
    PATH:
    LIB/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH:

Dockerfile:

FROM python:3.12

RUN pip install ibm_db --no-binary :all: --no-cache-dir

RUN ln -s /var/run/secrets/db2-license/db2consv_zs.lic /usr/local/lib/python3.12/site-packages/clidriver/license/db2consv_zs.lic

db2cli validate:

$ ./db2cli validate -connstring "UID=xxx;PWD=xxx;HOSTNAME=xxx;PORT=5025;DATABASE=xxx" -displaylic

===============================================================================
Client information for the current copy:
===============================================================================

Client Package Type       : IBM Data Server Driver For ODBC and CLI
Client Version (level/bit): DB2 v11.5.9.0 (special_50315/64-bit)
Client Platform           : Linux/X8664
Install/Instance Path     : ..
DB2DSDRIVER_CFG_PATH value: <not-set>
db2dsdriver.cfg Path      : ../cfg/db2dsdriver.cfg
DB2CLIINIPATH value       : <not-set>
db2cli.ini Path           : ../cfg/db2cli.ini
db2diag.log Path          : db2diag.log

===============================================================================
db2dsdriver.cfg schema validation for the entire file:
===============================================================================

Note: The validation utility could not find the configuration file 
db2dsdriver.cfg. The file is searched at "../cfg/db2dsdriver.cfg".

Segmentation fault (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions