Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6290

Crash in KILL HARD QUERY USER x@y when slave threads are running

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.3.12, 5.5.37, 10.0.11
    • 5.5.39, 10.0.13, 5.3.13
    • None
    • None

    Description

      This simple test case crashes the server:

      --source include/master-slave.inc
      --connection server_2
      kill hard query user test2@nohost;
      --source include/rpl_end.inc

      It crashes inside kill_threads_for_user(), in this code:

          if (((user->host.str[0] == '%' && !user->host.str[1]) ||
               !strcmp(tmp->security_ctx->host, user->host.str)) &&
              !strcmp(tmp->security_ctx->user, user->user.str))

      tmp->security_ctx->host is NULL for the slave IO thread, so we get a NULL
      pointer reference inside strcmp().

      I'm not sure if the bug here is that the host field is NULL in the replication
      thread, or if the bug is that the code in kill_threads_for_user() should check
      for NULL...

      Attachments

        Activity

          knielsen Kristian Nielsen created issue -

          Also reproducible on old versions of 5.3 and 5.5 (tried 5.3.7 and 5.5.23)/

          elenst Elena Stepanova added a comment - Also reproducible on old versions of 5.3 and 5.5 (tried 5.3.7 and 5.5.23)/
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Fix Version/s 10.0.12 [ 15201 ]
          Fix Version/s 5.5.38 [ 15400 ]
          Fix Version/s 5.3.13 [ 12602 ]
          Affects Version/s 5.3.12 [ 12000 ]
          Affects Version/s 5.5.37 [ 15000 ]
          Affects Version/s 10.0.11 [ 15200 ]
          Affects Version/s 5.5.36 [ 14600 ]
          Assignee Michael Widenius [ monty ]
          serg Sergei Golubchik made changes -
          Assignee Michael Widenius [ monty ] Sergei Golubchik [ serg ]
          serg Sergei Golubchik made changes -
          Fix Version/s 5.5.39 [ 15800 ]
          Fix Version/s 5.5.38 [ 15400 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 41704 ] MariaDB v2 [ 43536 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0.13 [ 16000 ]
          Fix Version/s 10.0.12 [ 15201 ]
          serg Sergei Golubchik made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0.13 [ 16300 ]
          Fix Version/s 5.5.39 [ 16301 ]
          Fix Version/s 5.5 [ 15800 ]
          Fix Version/s 10.0 [ 16000 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 43536 ] MariaDB v3 [ 63726 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 63726 ] MariaDB v4 [ 147925 ]

          People

            serg Sergei Golubchik
            knielsen Kristian Nielsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.