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

Crash in PyMem_RawDebugFree

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.8
    • 1.1.9
    • DBAPI 2.0
    • None
    • Windows
    • 3.10

    Description

      This bug was initially reported on Stackoverflow by "JensS": https://stackoverflow.com/questions/77523793/python-crashes-pymem-debugrawfree-when-querying-mariadb-with-sqlalchemy-2-0

      When running the attached script in Python Development Mode it crashes when substituting parameters inside the where clause:

      Debug memory block at address p=0000028AE6179E20: API 'r'
          21 bytes originally requested
          The 7 pad bytes at p-7 are FORBIDDENBYTE, as expected.
          The 8 pad bytes at tail=0000028AE6179E35 are FORBIDDENBYTE, as expected.
          Data at p: 4d 79 20 41 63 63 6f 75 ... 00 00 00 00 00 00 00 00
       
      Enable tracemalloc to get the memory block allocation traceback
       
      Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API 'r', verified using API 'm'
      Python runtime state: initialized
       
      Current thread 0x00001678 (most recent call first):
        File "C:\python\python312\Lib\site-packages\mariadb-1.1.9-py3.12-win-amd64.egg\mariadb\cursors.py", line 135 in _substitute_parameters
        File "C:\python\python312\Lib\site-packages\mariadb-1.1.9-py3.12-win-amd64.egg\mariadb\cursors.py", line 306 in execute
        File "C:\python\python312\Lib\site-packages\sqlalchemy\engine\default.py", line 922 in do_execute
        File "C:\python\python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1969 in _exec_single_context
        File "C:\python\python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1848 in _execute_context
        File "C:\python\python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1639 in _execute_clauseelement
        File "C:\python\python312\Lib\site-packages\sqlalchemy\sql\elements.py", line 516 in _execute_on_connection
        File "C:\python\python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1416 in execute
        File "C:\python\python312\Lib\site-packages\sqlalchemy\orm\context.py", line 293 in orm_execute_statement
        File "C:\python\python312\Lib\site-packages\sqlalchemy\orm\session.py", line 2190 in _execute_internal
        File "C:\python\python312\Lib\site-packages\sqlalchemy\orm\session.py", line 2308 in execute
        File "C:\work\test\bug.py", line 21 in <module>
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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