Bug #91560 | Possible Memory leak bug | ||
---|---|---|---|
Submitted: | 6 Jul 2018 5:13 | Modified: | 25 Oct 2018 7:10 |
Reporter: | Sandeep Sethia (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 8.0 | OS: | CentOS |
Assigned to: | CPU Architecture: | ARM | |
Tags: | Contribution, innodb |
[6 Jul 2018 5:13]
Sandeep Sethia
[6 Jul 2018 5:14]
Sandeep Sethia
Possible memory leak Issue in readview (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: memoryleak.patch (application/octet-stream, text), 667 bytes.
[6 Jul 2018 5:42]
MySQL Verification Team
Hello Sandeep Sethia, Thank you for the report and contribution. Thanks, Umesh
[23 Jul 2018 6:45]
Sandeep Sethia
Any update?
[25 Oct 2018 7:10]
Erlend Dahl
Posted by developer - Bin X Su In InnoDB, all read views are in fact managed by MVCC class, including allocating a new view, or destroy a view. So MVCC is responsible to manage the memory properly for read views. Thus there is no need to construct and destroy ReadView in TrxFactory. So I would say this is not a bug, which should not introduce memory leak. BTW, I guess the OCA patch has not been tested ever. Because the patch could not run after being applied, it will crash the server. Because this is obviously problematic: @@ -302,6 +302,7 @@ struct TrxFactory { trx->lock.table_locks.~lock_pool_t(); trx->hit_list.~hit_list_t(); + trx->read_view->~ReadView(); } Before this change, there is already an assertion saying: ut_ad(trx->read_view == NULL);