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

Document special thread IDs used in SHOW ENGINE INNODB STATUS output

Details

    Description

      SHOW ENGINE INNODB STATUS output seems to use special thread IDs in some sections of the output. For example, check out this line from the SEMAPHORES section:

      --Thread 139981888375552 has waited at lock0lock.cc line 7221 for 0.0000 seconds the semaphore:
      Mutex at 0x7f8859c88068 '&lock_sys->mutex', lock var 0
      Last time reserved by thread 18446744073709551615 in file not yet reserved line 0, waiters flag 0
      wait has ended
      

      This semaphore is supposedly held by a thread with ID 18446744073709551615. This thread ID is FFFFFFFFFFFFFFFF in hex. No threads with this ID are mentioned anywhere in the TRANSACTIONS section, so it does not appear to be a user thread. I would guess that this is a special identifier for some internal thread. If so, then we should document what thread this is referring to:

      https://mariadb.com/kb/en/library/show-engine-innodb-status/

      Attachments

        Issue Links

          Activity

            Discussed output with Geoff and Kenneth; Kenneth to follow-up with Marko Makela regarding whether documentation update is appropriate or if the functionality should be refactored for increased clarity to the user.

            jacob.moorman Jacob Moorman (Inactive) added a comment - Discussed output with Geoff and Kenneth; Kenneth to follow-up with Marko Makela regarding whether documentation update is appropriate or if the functionality should be refactored for increased clarity to the user.
            GeoffMontee Geoff Montee (Inactive) added a comment - See also MDEV-18698 .
            GeoffMontee Geoff Montee (Inactive) added a comment - - edited

            The fact that SHOW ENGINE INNODB STATUS prints the thread ID of the last thread that reserved the mutex seems to be an XtraDB extension.

            For example, compare the InnoDB code in 10.2.23:

            https://github.com/MariaDB/server/blob/mariadb-10.2.23/storage/innobase/sync/sync0arr.cc#L510

            to the XtraDB code in 10.1.38:

            https://github.com/MariaDB/server/blob/mariadb-10.1.38/storage/xtradb/sync/sync0arr.cc#L523

            So this could also be a bug in 10.1 XtraDB, rather than a "special thread ID." We probably need input from marko though.

            GeoffMontee Geoff Montee (Inactive) added a comment - - edited The fact that SHOW ENGINE INNODB STATUS prints the thread ID of the last thread that reserved the mutex seems to be an XtraDB extension. For example, compare the InnoDB code in 10.2.23: https://github.com/MariaDB/server/blob/mariadb-10.2.23/storage/innobase/sync/sync0arr.cc#L510 to the XtraDB code in 10.1.38: https://github.com/MariaDB/server/blob/mariadb-10.1.38/storage/xtradb/sync/sync0arr.cc#L523 So this could also be a bug in 10.1 XtraDB, rather than a "special thread ID." We probably need input from marko though.

            Converted to bug and escalated to Marko per email from Marko.

            jacob.moorman Jacob Moorman (Inactive) added a comment - Converted to bug and escalated to Marko per email from Marko.

            I do not think that we should dump 'noise' information such as a bogus thread identifier `-1` about mutexes that have never been reserved.

            I do not think that this is important enough to be fixed in MariaDB Server 5.5 if that version is affected. (I set the version provisionally.)

            thiru, for documentation purposes, please find out which exact versions of InnoDB and XtraDB are affected, and try to make the InnoDB output match the XtraDB output in 10.1, after removing the useless part of the output.

            marko Marko Mäkelä added a comment - I do not think that we should dump 'noise' information such as a bogus thread identifier `-1` about mutexes that have never been reserved. I do not think that this is important enough to be fixed in MariaDB Server 5.5 if that version is affected. (I set the version provisionally.) thiru , for documentation purposes, please find out which exact versions of InnoDB and XtraDB are affected, and try to make the InnoDB output match the XtraDB output in 10.1, after removing the useless part of the output.

            People

              thiru Thirunarayanan Balathandayuthapani
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              5 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.