[MDEV-30047] Memory leak on rollback of bulk insert Created: 2022-11-21  Updated: 2022-11-22  Resolved: 2022-11-21

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.7.7
Fix Version/s: 10.11.2, 10.7.8, 10.8.7, 10.9.5, 10.10.3

Type: Bug Priority: Major
Reporter: Thirunarayanan Balathandayuthapani Assignee: Thirunarayanan Balathandayuthapani
Resolution: Fixed Votes: 0
Labels: ASAN

Issue Links:
Problem/Incident
is caused by MDEV-29761 Bulk insert fails to rollback during... Closed

 Description   

InnoDB fails to remove the bulk_store when we roll back the bulk insert on multiple tables.
This is caused by MDEV-29761



 Comments   
Comment by Marko Mäkelä [ 2022-11-21 ]

The failure was detected by tests that were added for MDEV-27214.

10.7 0e6f2757d11502d74d21e4a75fa5247fc3334024

***Warnings generated in error logs during shutdown after running tests: innodb.insert_into_empty
 
==143531==ERROR: LeakSanitizer: detected memory leaks
SUMMARY: AddressSanitizer: 730552 byte(s) leaked in 5 allocation(s).
Attempting backtrace. You can use the following information to find out

In the server error log, we can see the following (quoting just the most relevant part):

Direct leak of 136 byte(s) in 1 object(s) allocated from:
    #0 0x7f939eba3947 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0x10f947)
    #1 0x560abea4f0fd in trx_mod_table_time_t::start_bulk_insert(dict_table_t*) /home/buildbot/buildbot/build/mariadb-10.7.8/storage/innobase/include/trx0trx.h:481
    #2 0x560abea4aa71 in trx_undo_report_row_operation(que_thr_t*, dict_index_t*, dtuple_t const*, upd_t const*, unsigned long, unsigned char const*, unsigned short const*, unsigned long*) /home/buildbot/buildbot/build/mariadb-10.7.8/storage/innobase/trx/trx0rec.cc:1867
    #3 0x560abe8cbdb0 in row_ins_clust_index_entry_low(unsigned long, unsigned long, dict_index_t*, unsigned long, dtuple_t*, unsigned long, que_thr_t*) /home/buildbot/buildbot/build/mariadb-10.7.8/storage/innobase/row/row0ins.cc:2674

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