Bug #104858 An improper locking bug due to unrelased lock
Submitted: 7 Sep 2021 15:07 Modified: 8 Sep 2021 11:07
Reporter: Cai Ryan Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Locking Severity:S3 (Non-critical)
Version:8.0.26 OS:Any
Assigned to: CPU Architecture:Any

[7 Sep 2021 15:07] Cai Ryan
Description:
Hi developers, in the below codes, the lock engine->slabs.lock could be not released before program's exit abort();. I think it is better to write pthread_mutex_unlock(&engine->slabs.lock); before the abort(); for better resource management and code symmetry. Thanks!

https://github.com/mysql/mysql-server/blob/7ed30a748964c009d4909cb8b4b22036ebdef239/plugin...

Best,

How to repeat:
It's found by static scan.

Suggested fix:
Write pthread_mutex_unlock(&engine->slabs.lock); before the abort();
[8 Sep 2021 11:07] MySQL Verification Team
Hi Mr. Yuandao,

Thank you for your bug report.

However, it is not a bug.

When the program aborts, all of its memory, threads and locks are released by the host OS, hence no action is there necessary.

Not a bug.
[8 Sep 2021 11:17] MySQL Verification Team
Hi,

One more information related to your report:

"

The InnoDB memcached plugin is deprecated as of MySQL 8.0.22; expect support for it to be removed in a future version of MySQL.

"