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

Race condition in KILL command execution

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.19, 6.2.2
    • Fix Version/s: 2.5.20, 6.2.3
    • Component/s: Core
    • Labels:
      None

      Description

      To reproduce, run the following SQL with the mariadb client with --delimiter=// option:

      BEGIN NOT ATOMIC SET @a = NOW(); WHILE TIME_TO_SEC(TIMEDIFF(NOW(), @a)) < 30 DO DO 1; END WHILE; END //
      

      Once the query has started, interrupt it with Ctrl+C. With a direct connection to the database the connection is killed immediately but with MaxScale the KILL command it generates doesn't end up being processed correctly.

      There's possibly a race condition of sorts where the execution of the sub-KILL commands that are derived from the original one end up being discarded due to the fact that the session is stopping. If this is true then the solution is to wait until all the sent commands have been written to the network before the OK packet is sent for the original KILL command.

        Attachments

          Activity

            People

            Assignee:
            markus makela markus makela
            Reporter:
            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.