[MDEV-30726] Destroying threads that are not created Created: 2023-02-25 Updated: 2023-11-28 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | mariabackup |
| Affects Version/s: | 11.0.0 |
| Fix Version/s: | 10.5, 10.6, 10.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Ryan | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi, we found a bug, in which, pthread_join possibly destroys threads that are not created. Specifically, in the below code, when pthread_mutex_init(&thd->data_mutex, NULL) || pthread_cond_init(&thd->avail_cond, NULL) || pthread_cond_init(&thd->data_cond, NULL) || pthread_cond_init(&thd->done_cond, NULL) happens, the code executes destroy_worker_thread(threads + i); for error handling. However, the code destroy_worker_thread would join a not-created thread. Thank you for your checking.
Locations: |