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

THD::proc_info is vulnerable to data race

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • Fix possible garbage STATE output in SHOW/information_schema.PROCESSLIST

    Description

      The description of THD::proc_info in sql_class.h reads:

      This member is accessed and assigned without any synchronization.
      Therefore, it may point only to constant (statically allocated) strings, which memory won't go away over time.

      This old assumption is insufficient: Without synchronization, accessing a variable while another thread writes to it is not guaranteed to be conflict-free.

      The THD::wsrep_info of Galera is in a worse condition for beïng a buffer compared to a pointer, where reading the memory mid-write could result in an amalgamated message.

      Attachments

        Issue Links

          Activity

            People

              ParadoxV5 Jimmy Hú
              ParadoxV5 Jimmy Hú
              Kristian Nielsen Kristian Nielsen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.