[MDEV-26556] An improper locking bug(s) due to unreleased lock Created: 2021-09-07  Updated: 2022-08-05  Resolved: 2021-10-25

Status: Closed
Project: MariaDB Server
Component/s: Plugin - Audit
Affects Version/s: 10.6.4
Fix Version/s: 10.2.41, 10.3.32, 10.4.22, 10.5.13, 10.6.5

Type: Bug Priority: Critical
Reporter: Ryan Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: None
Environment:

All



 Description   

Hi, developers, thank you for your checking. It seems the lock lock_bigbuffer is not released correctly when big_buffer == NULL in the function log_statement_ex?

https://github.com/MariaDB/server/blob/57f14eab20ae2733eb341f3d293515a10a40bc48/plugin/server_audit/server_audit.c#L1838-L1848

Thank you for your checking!



 Comments   
Comment by Ryan [ 2021-09-07 ]

Similarly, the lock archive_ctxt->mutex is not released correctly when archive_ctxt->dest_file == NULL in the function archive_open?

https://github.com/MariaDB/server/blob/76f4a78ba2639b5abd01a88b24a3c509c11530ce/extra/mariabackup/ds_archive.cc#L168-L175

Comment by Ryan [ 2021-09-07 ]

the lock stream_ctxt->mutex is not released correctly when stream_ctxt->dest_file == NULL in the function xbstream_open
https://github.com/MariaDB/server/blob/76f4a78ba2639b5abd01a88b24a3c509c11530ce/extra/mariabackup/ds_xbstream.cc#L126-L133

Comment by Daniel Black [ 2021-09-07 ]

on audit plugin - dates back to original commit - https://github.com/MariaDB/server/commit/cc84ac3be41d9d6ac480d55449d5bf4e324cca10

xtrabackup too - https://github.com/MariaDB/server/commit/d7714308e014a7335e1c0f60dc0afbf5eba5ff99

Ryan can to report a bug to percona too - https://github.com/percona/percona-xtrabackup/blob/8.0/storage/innobase/xtrabackup/src/ds_xbstream.cc#L124

and before you go too far, a single bug report per instance would help to documented the fixed version as they may be different.

Comment by Ryan [ 2021-09-08 ]

@danblack@holyfoot Thank you very much for your checking.

Ok, I would create more bug reports to let a bug report per instance to help to document the fixed version.

Comment by Daniel Black [ 2021-10-26 ]

holyfoot are the mariabackup fixes coming too? Or are those going to be put into a separate bug report?

Comment by Ryan [ 2021-10-26 ]

Could you please also take a look at other similar issues I reported? Thanks

MDEV-26561
MDEV-26558
MDEV-26560

Generated at Thu Feb 08 09:46:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.