Skip to content

Application abort caused by pointer problems in underlying C library #74

@duncan-simey

Description

@duncan-simey

There is a problem in the C library used by the Python SDK that causes the application to abort.
Exit code is 0xC0000005, which usually indicates pointer problems.
OpenZiti Python SDK version = (b'1.0.11', b'g92c7d63')
Tested under Windows Subsystem Linux (Ubuntu 22.04.5 LTS), Python 3.10.12

The use case is straightforward.
I have a Python script that enrolls with OpenZiti, then listens to a local port for connections. When a connection is created it dials an OpenZiti service and copies messages in both directions. It works fine in normal conditions.
To reproduce the failure

  • Turn off internet access
  • Launch the Python application
    • Enrolling appears to work, the call returns normally. There are no SDK methods for checking status of the OpenZiti context, but it isn't connected as there is no internet connection
    • The console shows a few messages generated by the SDK
      • (14024)[ 0.013] ERROR ziti-sdk:ziti_ctrl.c:164 ctrl_resp_cb() ctrl[controller.XXXX] request failed: -3008(unknown node or service
      • (14024)[ 0.013] ERROR ziti-sdk:ziti.c:1696 version_cb() ztx[0] failed to get controller version from https://controller.XXXX:443 CONTROLLER_UNAVAILABLE(unknown node or service)
      • (14024)[ 0.013] ERROR ziti-sdk:ziti_ctrl.c:164 ctrl_resp_cb() ctrl[controller.XXXX] request failed: -3008(unknown node or service)
  • Connect to the local port
    • Python application receives the connection and attempts to dial the service
    • Application aborts with status code 0xC0000005
    • Debugging shows the last line of Python executed is in zitilib.py:255 check_error(_ziti_connect(fd, ztx, srv, terminator_b)) and the failure is in _ziti_connect

My guess is that there is a bad parameter declaration that is receiving an actual value instead of a pointer. I can't tell if the problem is part of the Python SDK, or buried in the underlying C library.

Metadata

Metadata

Assignees

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