PXB doesn't handle broken pipe correctly when --encrypt and --parallel is used

Description

Steps to reproduce:

output:

Environment

None

AFFECTED CS IDs

CS0017666

Smart Checklist

Activity

Show:

Marcelo Altmann June 1, 2021 at 11:55 AM

Problem:

Inside compress_write and encrypt_write we take thd->ctrl_mutex to
validate only one thread is writting at the time. In case of failure at
xb_crypt_write_chunk / ds_write / write_uint64_le or write_uint32_le we
will terminate the threads without releasing the mutex the thread owns.
In case other thread is waiting on this mutex, it will hang forever.

Fix:

Ensure threads release ctrl_mutex and data_mutex as part of error
handling.
Also added capabilities to detect if we are running on a debug binary.
Note that broken pipe test will not skip in case of non debug. Because
the test for --encrypt can be easily reproducible.

Marcelo Altmann May 31, 2021 at 12:24 PM

Confirmed with , this issue (at least the way it's reported here) doesn't affect 8.0. We don't use data_mutex nor ctrl_mutex on 8.0. 

Done

Assignee

Reporter

Needs Review

Yes

Time tracking

2d 3h logged

Fix versions

Affects versions

Priority

Created April 28, 2021 at 9:31 AM
Updated March 6, 2024 at 6:41 PM
Resolved June 1, 2021 at 11:55 AM
Loading...