Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-330

Segmentation fault during close

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 1.1.14
    • None
    • DBAPI 2.0
    • None
    • 3.12.10

    Description

      I've created a DB API v2 connection wrapper class which uses a MariaDB connection class as the underlying connection instance. The error I am referring to happens during testing, after I run a specific test that executes a single query which retrieves a single scalar value from the database, e.g. "SELECT 1", "SELECT '1'", "SELECT 1.0", etc...

      After the test is executed 5 or 6 times, a `Windows fatal exception: access violation` error is raised and the python process completely stops. In Ubuntu, a similar segmentation fault error is raised.

      I've traced where the bug occurs and it does while attempting to close the connection, (which I do after a test is over). Furthermore, the segmentation fault actually happens due to an AttributeError in line 119 of mariadb.connection.py.

      The line is `if self._Connection__pool:`.

      And the error is this: `AttributeError: 'Connection' object has no attribute '_Connection__pool'`.

      If I comment out this if/else and just close the connection, the program works just fine.

      Attachments

        Activity

          People

            georg Georg Richter
            manos96 Manos Stoumpos
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.