[MDEV-28719] compress_write() fails to release mutex on failure Created: 2022-06-01  Updated: 2023-01-18  Resolved: 2022-06-01

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.9.1, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
Fix Version/s: 10.3.36, 10.4.26, 10.5.17, 10.6.9, 10.7.5, 10.8.4, 10.9.2

Type: Bug Priority: Critical
Reporter: Ryan Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None
Environment:

All



 Description   

Hi, @marko, it seems that the fixing for MDEV-28689 is buggy. The lock thd->data_mutex is still not released during erroneously writing to the destination stream and writing to the destination stream (Line 246 and 256).

Due to the original issue is closed, thus I just open a new issue.

https://github.com/MariaDB/server/blob/863c3eda872b19f70ce6045119bf621584e1312d/extra/mariabackup/ds_compress.cc#L233-L259



 Comments   
Comment by Marko Mäkelä [ 2022-06-01 ]

Thank you Ryan, indeed in MDEV-28689 I only fixed problems related to the ctrl_mutex by removing that mutex. The function compress_write() fails to release the data_mutex in case it fails to write to the stream.

Generated at Thu Feb 08 10:02:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.