[MDEV-29600] Memory leak in row_log_table_apply_update(), in UPDATE involving BLOB, during online table rebuild Created: 2022-09-21 Updated: 2024-02-07 Resolved: 2022-09-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.3.37, 10.4.27, 10.5.18, 10.6.11, 10.7.7, 10.8.6, 10.9.4, 10.10.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | ASAN, leak, upstream | ||
| Issue Links: |
|
||||||||
| Description |
|
Note: The test case is non-deterministic, run with --repeat=N. It usually fails for me within ~5 attempts. The test case is rr-able.
Reproducible on all of 10.3-10.10, also on at least 2 last releases of 10.3. |
| Comments |
| Comment by Marko Mäkelä [ 2022-09-22 ] | |||||||||||||
|
Indeed, it looks like even after
| |||||||||||||
| Comment by Marko Mäkelä [ 2022-09-22 ] | |||||||||||||
|
For every replicated UPDATE that involves off-page storage, btr_pcur_t::old_rec_buf will be leaded by row_log_table_apply_update(). I also checked how row_log_table_apply_insert_low() is managing off-page records. It invokes row_ins_clust_index_entry_low(), which will free the pcur.old_rec_buf in its local variable before returning. So, there was no leak in the INSERT case. As far as I can tell, this memory leak was inherited from MySQL 5.7.5 to MariaDB Server 10.2.2. |