Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-167

Crash on mthd_stmt_read_all_rows when SELECT has lots of field

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 3.1.0
    • Prepared Statements
    • None
    • Windows, using QT 5 plugin

    Description

      I have a rather long SELECT query that retrieves data from multiple tables - a query that crashes when it is executed.

      I've attached the windows minidump. Plus some analysis data from BoundsChecker,

      backtrace:
      1 libmariadb.dll!net_field_length(unsigned char * * packet=0x0018e128)
      *2 libmariadb.dll!mthd_stmt_read_all_rows(st_mysql_stmt * stmt=0x032c7ce8)
      3 libmariadb.dll!mysql_stmt_store_result(st_mysql_stmt * stmt=0x032c7ce8)
      4 qsqlmysql.dll!QMYSQLResult::exec()

      Easily reproducible - please let me know what you need more.

      Attachments

        1. Capture.PNG
          Capture.PNG
          39 kB
        2. maria.dmp
          74 kB
        3. maria220316.dmp
          65 kB
        4. libmariadb.dll
          797 kB
        5. libmariadb.pdb
          7.64 MB
        6. maria2.sql
          180 kB

        Activity

          georg Georg Richter added a comment -

          Hi,

          thx for your bug report.
          can you please provide a table dump and the select statement?

          Thanks!

          georg Georg Richter added a comment - Hi, thx for your bug report. can you please provide a table dump and the select statement? Thanks!
          ozgilat Oz Gilat added a comment - - edited

          you can get the database dump at
          https://drive.google.com/file/d/0B_uEVRIKDy09U0p0OVBKV0o5NnM/view?usp=sharing

          the query:
          select deployment_app_status.* , deployment_apps_versions.* , deployment_apps.* , deployment_tasks_descriptors.* , deployment_packages.* from deployment_app_status left join deployment_apps_versions on (deployment_app_status.app_version_id = deployment_apps_versions.app_version_id) left join deployment_apps on (deployment_apps.app_id = deployment_apps_versions.app_id) left join deployment_tasks_descriptors on (deployment_tasks_descriptors.task_descriptor_id = deployment_apps_versions.task_descriptor_id) left join deployment_packages on (deployment_packages.package_id = deployment_tasks_descriptors.package_id)

          ozgilat Oz Gilat added a comment - - edited you can get the database dump at https://drive.google.com/file/d/0B_uEVRIKDy09U0p0OVBKV0o5NnM/view?usp=sharing the query: select deployment_app_status.* , deployment_apps_versions.* , deployment_apps.* , deployment_tasks_descriptors.* , deployment_packages.* from deployment_app_status left join deployment_apps_versions on (deployment_app_status.app_version_id = deployment_apps_versions.app_version_id) left join deployment_apps on (deployment_apps.app_id = deployment_apps_versions.app_id) left join deployment_tasks_descriptors on (deployment_tasks_descriptors.task_descriptor_id = deployment_apps_versions.task_descriptor_id) left join deployment_packages on (deployment_packages.package_id = deployment_tasks_descriptors.package_id)
          georg Georg Richter added a comment -

          Thanks, but this is not a dump (doesn't contain create table statements) - and I don't need the entire database, only tables which are used in select statement.

          georg Georg Richter added a comment - Thanks, but this is not a dump (doesn't contain create table statements) - and I don't need the entire database, only tables which are used in select statement.
          ozgilat Oz Gilat added a comment - sorry - new dump https://drive.google.com/file/d/0B_uEVRIKDy09Yk1ZaHo2U0wydzg/view?usp=sharing
          ozgilat Oz Gilat added a comment - - edited

          One interesting note -
          in the select, when you switch ", deployment_tasks_descriptors.* , deployment_packages.* " to ",deployment_packages.*, deployment_tasks_descriptors.* " - 
          the crash is gone...
          

          ozgilat Oz Gilat added a comment - - edited One interesting note - in the select, when you switch ", deployment_tasks_descriptors.* , deployment_packages.* " to ",deployment_packages.*, deployment_tasks_descriptors.* " - the crash is gone...
          georg Georg Richter added a comment - - edited

          Which server version do you use?
          Also it would be good to know if you really use Connector/C 2.2.0 - According to the line numbers in Capture.png it will not match 2.2.0 - likely it's a much older version.

          I wasn't able to reproduce problem with latest C/C version 2.2.2 and MariaDB Server 10.1

          georg Georg Richter added a comment - - edited Which server version do you use? Also it would be good to know if you really use Connector/C 2.2.0 - According to the line numbers in Capture.png it will not match 2.2.0 - likely it's a much older version. I wasn't able to reproduce problem with latest C/C version 2.2.2 and MariaDB Server 10.1
          georg Georg Richter added a comment -

          We had same crash in CONC-60 with similiar line numbers, so I highly assume that you're using an old 1.0 or 1.1 version of Connector/C

          georg Georg Richter added a comment - We had same crash in CONC-60 with similiar line numbers, so I highly assume that you're using an old 1.0 or 1.1 version of Connector/C
          ozgilat Oz Gilat added a comment -

          my server is:
          Server version: 5.6.28-log MySQL Community Server (GPL) on Windows 7.

          ozgilat Oz Gilat added a comment - my server is: Server version: 5.6.28-log MySQL Community Server (GPL) on Windows 7.
          ozgilat Oz Gilat added a comment - - edited

          Also verified it's version libmariadb connector C 2.2.2.
          Attached new dump maria220316.dmp libmariadb.dll and dll and pdb used (received from regular installation from your website..)

          also reproduced on "Server version: 5.6.16 MySQL Community Server (GPL)" running on windows 10

          ozgilat Oz Gilat added a comment - - edited Also verified it's version libmariadb connector C 2.2.2. Attached new dump maria220316.dmp libmariadb.dll and dll and pdb used (received from regular installation from your website..) also reproduced on "Server version: 5.6.16 MySQL Community Server (GPL)" running on windows 10
          ozgilat Oz Gilat added a comment -

          also attached latests dump to match the latest crash files I've added maria2.sql

          ozgilat Oz Gilat added a comment - also attached latests dump to match the latest crash files I've added maria2.sql
          ozgilat Oz Gilat added a comment -

          Hey Georg ,
          do you need anything else from me?

          ozgilat Oz Gilat added a comment - Hey Georg , do you need anything else from me?
          georg Georg Richter added a comment -

          Hi Oz,

          would it be possible to provide
          a) a Zend server version which uses libmariadb.dll (with some instructions how to repeat the bug)
          or b)
          a wireshark dump

          Thanks !

          georg Georg Richter added a comment - Hi Oz, would it be possible to provide a) a Zend server version which uses libmariadb.dll (with some instructions how to repeat the bug) or b) a wireshark dump Thanks !
          ozgilat Oz Gilat added a comment -

          ok - I'll work on preparing you a machine with a reproduction

          ozgilat Oz Gilat added a comment - ok - I'll work on preparing you a machine with a reproduction

          People

            georg Georg Richter
            ozgilat Oz Gilat
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.