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

Add status variable that gets incremented if connection is aborted prior to authentication

Details

    Description

      If a connection is aborted prior to authentication, then the only status variable that gets incremented is Aborted_connects. The Aborted_connects status variable gets incremented for a lot of reasons though, so there is no status variable that can be used to determine how many connections have gotten aborted prior to authentication.

      You can reproduce this by doing something like using telnet to connect to the MariaDB port, and then killing the telnet process:

      $ telnet 127.0.0.1 3306
      Trying 127.0.0.1...
      Connected to 127.0.0.1.
      Escape character is '^]'.
      Y
      5.5.5-10.1.38-MariaDB@TcxOay_?▒MFWbhc931>#4mysql_native_password^CConnection closed by foreign host
      

      The only status variable that is incremented from this is Aborted_connects:

      MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'Aborted%';
      +------------------+-------+
      | Variable_name    | Value |
      +------------------+-------+
      | Aborted_clients  | 0     |
      | Aborted_connects | 1     |
      +------------------+-------+
      2 rows in set (0.00 sec)
       
      MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'Access_denied%';
      +----------------------+-------+
      | Variable_name        | Value |
      +----------------------+-------+
      | Access_denied_errors | 0     |
      +----------------------+-------+
      1 row in set (0.00 sec)
       
      MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'Connection_errors%';
      +-----------------------------------+-------+
      | Variable_name                     | Value |
      +-----------------------------------+-------+
      | Connection_errors_accept          | 0     |
      | Connection_errors_internal        | 0     |
      | Connection_errors_max_connections | 0     |
      | Connection_errors_peer_address    | 0     |
      | Connection_errors_select          | 0     |
      | Connection_errors_tcpwrap         | 0     |
      +-----------------------------------+-------+
      6 rows in set (0.00 sec)
      

      Attachments

        Issue Links

          Activity

            GeoffMontee Geoff Montee (Inactive) created issue -
            GeoffMontee Geoff Montee (Inactive) made changes -
            Field Original Value New Value
            GeoffMontee Geoff Montee (Inactive) made changes -
            serg Sergei Golubchik made changes -
            Assignee Oleksandr Byelkin [ sanja ]
            sanja Oleksandr Byelkin made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            Is Aborted_nonauth_connects a good name?

            sanja Oleksandr Byelkin added a comment - Is Aborted_nonauth_connects a good name?

            I do not think that we should change value and meaning of Aborted_connects , but just add new variable which will count aborted with no authentication additionally?

            sanja Oleksandr Byelkin added a comment - I do not think that we should change value and meaning of Aborted_connects , but just add new variable which will count aborted with no authentication additionally?

            What do you think about Aborted_connects_preauth? Aborted_nonauth_connects would work too though.

            I agree with you about the behavior of Aborted_connects.

            GeoffMontee Geoff Montee (Inactive) added a comment - What do you think about Aborted_connects_preauth? Aborted_nonauth_connects would work too though. I agree with you about the behavior of Aborted_connects.

            OK, it will be Aborted_connects_preauth, thanks for helping with the name

            sanja Oleksandr Byelkin added a comment - OK, it will be Aborted_connects_preauth, thanks for helping with the name
            sanja Oleksandr Byelkin added a comment - - edited

            OK, the last question, does it matter if the connection closed with error or closed without an error?

            The connection can be closed because of error (probably timeout belong here), because was killed or because actually connection closed, but we are only interested if it was closed unauthorized, correct?

            sanja Oleksandr Byelkin added a comment - - edited OK, the last question, does it matter if the connection closed with error or closed without an error? The connection can be closed because of error (probably timeout belong here), because was killed or because actually connection closed, but we are only interested if it was closed unauthorized, correct?
            sanja Oleksandr Byelkin made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]

            I don't think it should matter if the connection was closed with or without an error. I think this status variable should only be concerned with whether the connection was closed prior to performing authentication--regardless of whether an error was involved.

            GeoffMontee Geoff Montee (Inactive) added a comment - I don't think it should matter if the connection was closed with or without an error. I think this status variable should only be concerned with whether the connection was closed prior to performing authentication--regardless of whether an error was involved.
            sanja Oleksandr Byelkin made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]

            the same patch with MDEV-19277

            sanja Oleksandr Byelkin added a comment - the same patch with MDEV-19277
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            sanja Oleksandr Byelkin made changes -
            Assignee Sergei Golubchik [ serg ] Vladislav Vaintroub [ wlad ]

            Looks good to me, ok to push

            wlad Vladislav Vaintroub added a comment - Looks good to me, ok to push
            wlad Vladislav Vaintroub made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            wlad Vladislav Vaintroub made changes -
            Assignee Vladislav Vaintroub [ wlad ] Oleksandr Byelkin [ sanja ]
            sanja Oleksandr Byelkin made changes -
            sanja Oleksandr Byelkin made changes -
            Fix Version/s 10.4.5 [ 23311 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 95460 ] MariaDB v4 [ 133932 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 103711

            People

              sanja Oleksandr Byelkin
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.