Bug #107991 | Clone_persist_gtid causes memory leak | ||
---|---|---|---|
Submitted: | 27 Jul 2022 2:02 | Modified: | 23 Oct 2023 8:31 |
Reporter: | Baolin Huang | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 8.0.25 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Clone_persist_gtid, Contribution, Leak, memory leak |
[27 Jul 2022 2:02]
Baolin Huang
[27 Jul 2022 2:02]
Baolin Huang
jemalloc profiling over 8 hour
Attachment: w_diff.pdf (application/pdf, text), 20.04 KiB.
[2 Aug 2022 5:57]
MySQL Verification Team
Hello Baolin Huang, Thank you for the report and test case. regards, Umesh
[28 Oct 2022 1:26]
Baolin Huang
Not sure if there are plans to fix this problem. I think it can be fixed like this Author: baolin.hbl <baolin.hbl@alibaba-inc.com> Date: Fri Oct 28 09:18:46 2022 +0800 [Bugfix] [Aone#44846897] Clone_persist_gtid causes memory leak diff --git a/storage/innobase/clone/clone0repl.cc b/storage/innobase/clone/clone0repl.cc index 1d22a6814f4..db3488521e7 100644 --- a/storage/innobase/clone/clone0repl.cc +++ b/storage/innobase/clone/clone0repl.cc @@ -607,6 +607,7 @@ void Clone_persist_gtid::periodic_write() { os_event_reset(m_event); /* Write accumulated GTIDs to disk table */ flush_gtids(thd); + thd->mem_root->ClearForReuse(); }
[12 Jan 2023 3:35]
Baolin Huang
Clear mem_root after each flush_gtids (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: bug_107991_clone_persist_gtid_memleak.txt (text/plain), 993 bytes.
[23 Oct 2023 8:31]
Baolin Huang
Modify Category to Replication.