[MDEV-17238] Document special thread IDs used in SHOW ENGINE INNODB STATUS output Created: 2018-09-18  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Documentation - Support, Storage Engine - InnoDB, Storage Engine - XtraDB
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Thirunarayanan Balathandayuthapani
Resolution: Unresolved Votes: 2
Labels: None

Issue Links:
Relates
relates to MDEV-11703 InnoDB background threads show up in ... Stalled
relates to MDEV-17237 thread IDs are printed in different f... Open
relates to MDEV-18572 Thread executing DROP TABLE listed tw... Open
relates to MDEV-18698 Show InnoDB's internal background thr... Open
relates to MDEV-21566 Lock monitor doesn't print a name for... Closed
relates to MDEV-22087 Increase buffer size for query in SHO... Open
relates to MDEV-18429 Consistent non-locking reads do not a... Closed
relates to MDEV-21330 Lock monitor doesn't print a semaphor... Closed
relates to MDEV-21390 lock_print_info_summary() should work... Closed

 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/



 Comments   
Comment by Jacob Moorman (Inactive) [ 2019-04-10 ]

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.

Comment by Geoff Montee (Inactive) [ 2019-04-10 ]

See also MDEV-18698.

Comment by Geoff Montee (Inactive) [ 2019-04-10 ]

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.

Comment by Jacob Moorman (Inactive) [ 2019-04-11 ]

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

Comment by Marko Mäkelä [ 2019-04-11 ]

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.

Generated at Thu Feb 08 08:34:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.