Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-3218

Crash with LOAD DATA LOCAL INFILE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.5.4
    • 2.5.5
    • mariadbclient
    • None

    Description

      When a LOAD DATA LOCAL INFILE is being executed, the process_special_commands function is called with every packet sent in the load. This causes a debug assertion in the query classifier to be hit.

      The following CSV file reproduces the problem (the leading whitespace is required):

       USE test
       KILL 123
      
      

      With a release build it creates the following stacktrace:

      2020-09-30 16:03:29   error  : (1) [qc_sqlite] The provided buffer does not contain a COM_QUERY, but a COM_UNKNOWN(4f).
      2020-09-30 16:03:29   error  : (1) [qc_sqlite] The query could not be parsed. Response not valid.
      alert  : MaxScale 2.5.5 received fatal signal 11. Commit ID: 17ea429d132581d9cb3bb3260e284e5841d69fc6 System name: Linux Release string: Fedora release 32 (Thirty Two)
      2020-09-30 16:03:29   alert  : (1) Statement currently being classified: none/unknown
      2020-09-30 16:03:29   alert  : (1) 
        /tmp/build/lib64/maxscale/libqc_sqlite.so(+0xd1a0): query_classifier/qc_sqlite/qc_sqlite.cc:248
        /tmp/build/lib64/maxscale/libmaxscale-common.so.1.0.0(+0x125f57): server/core/query_classifier.cc:219
        /tmp/build/lib64/maxscale/libmaxscale-common.so.1.0.0(_Z21qc_get_database_namesB5cxx11P5GWBUF+0x4f): server/core/query_classifier.cc:812
        /tmp/build/lib64/maxscale/libmariadbclient.so(_ZN23MariaDBClientConnection19handle_use_databaseEP5GWBUF+0x19): /usr/include/c++/10/bits/stl_iterator.h:954
        /tmp/build/lib64/maxscale/libmariadbclient.so(_ZN23MariaDBClientConnection24process_special_commandsEP5GWBUFh+0x19d): server/modules/protocol/MariaDB/mariadb_client.cc:1174
        /tmp/build/lib64/maxscale/libmariadbclient.so(_ZN23MariaDBClientConnection15route_statementEON8maxscale6BufferE+0x6b): server/modules/protocol/MariaDB/mariadb_client.cc:1230
        /tmp/build/lib64/maxscale/libmariadbclient.so(_ZN23MariaDBClientConnection19process_normal_readEv+0x1b2): include/maxscale/session.hh:749
        /tmp/build/lib64/maxscale/libmariadbclient.so(_ZN23MariaDBClientConnection17ready_for_readingEP3DCB+0x70): server/modules/protocol/MariaDB/mariadb_client.cc:1426
        /tmp/build/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN3DCB14process_eventsEj+0xc4): server/core/dcb.cc:1314
        /tmp/build/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN3DCB13event_handlerEPS_j+0x49): server/core/dcb.cc:1357
        /tmp/build/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN7maxbase6Worker15poll_waiteventsEv+0x1b6): maxutils/maxbase/src/worker.cc:879
        /tmp/build/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN7maxbase6Worker3runEPNS_9SemaphoreE+0x53): maxutils/maxbase/src/worker.cc:574
        /lib64/libstdc++.so.6(+0xd8b84): ??:?
        /lib64/libpthread.so.0(+0x9432): pthread_create.c:?
        /lib64/libc.so.6(clone+0x43): :?
      

      Attachments

        Issue Links

          Activity

            People

              markus makela markus makela
              markus makela markus makela
              Votes:
              1 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.