Bug #96188 | memory leak detected from MDL locking in read_histograms | ||
---|---|---|---|
Submitted: | 12 Jul 2019 13:12 | Modified: | 22 Aug 2019 13:00 |
Reporter: | andy zhang | Email Updates: | |
Status: | Unsupported | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[12 Jul 2019 13:12]
andy zhang
[12 Jul 2019 13:45]
MySQL Verification Team
Hi Mr. Zhang, Thank you for your bug report. Also, thank you for your patch. However, we can not accept your patch without a fully reproducible test case, or if you prefer it that way, without a full scenario. After we receive a test case from you, we shall run it with memory testing turned on. If our own testing show leaks, we will be happy to verify this bug. Thanks in advance.
[15 Jul 2019 7:14]
andy zhang
Sinisa, Thanks for your quick response. I admit it's so easy to make a handy reproducible scenario for me or you at present. May I ask you to take my patch as an optimization feature, that is to reduce the MDL locking duration for histogram reading then?
[15 Jul 2019 7:15]
andy zhang
typo "it's so easy to make a handy reproducible scenario for me or you at present." ---> " it's NOT so easy to make a handy reproducible scenario for me or you at present."
[15 Jul 2019 12:47]
MySQL Verification Team
Hi Mr. Zhang, I can leave this bug for developers to decide whether it makes sense or not. However, we can not accept patches from community without the OCA agreement. In order to submit contributions you must first sign the Oracle Contribution Agreement (OCA). For additional information please check http://www.oracle.com/technetwork/community/oca-486395.html. If you have any questions, please contact the MySQL community team at https://dev.mysql.com/community/
[16 Aug 2019 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[23 Nov 2023 2:06]
Fan Lyu
we meet the same leak stack at 8.0.28 and I think it's not solved yet because no more release note in later versions; It's not easy to reproduce in our daily pipeline. Direct leak of 688 byte(s) in 1 object(s) allocated from: #0 0x7f97d084be46 in __interceptor_malloc (/ci/workspace/hwsql/debug/binary/bin/../lib/libasan.so.6+0x109e46) #1 0x55c2c5e2e850 in my_raw_malloc /ci/workspace/hwsql/mysys/my_malloc.cc:206 #2 0x55c2c5e2e96f in my_malloc(unsigned int, unsigned long, int) /ci/workspace/hwsql/mysys/my_malloc.cc:82 #3 0x55c2c5df3e78 in lf_alloc_new(LF_PINS*) /ci/workspace/hwsql/mysys/lf_alloc-pin.cc:449 #4 0x55c2c5df5f13 in lf_hash_insert(LF_HASH*, LF_PINS*, void const*) /ci/workspace/hwsql/mysys/lf_hash.cc:491 #5 0x55c2c415084e in MDL_map::find_or_insert(LF_PINS*, MDL_key const*, bool*) /ci/workspace/hwsql/sql/mdl.cc:1344 #6 0x55c2c414c6bf in MDL_context::try_acquire_lock_impl(MDL_request*, MDL_ticket**) /ci/workspace/hwsql/sql/mdl.cc:3016 #7 0x55c2c414d3bc in MDL_context::acquire_lock(MDL_request*, unsigned long) /ci/workspace/hwsql/sql/mdl.cc:3487 #8 0x55c2c414eaa6 in MDL_context::acquire_locks(I_P_List<MDL_request, I_P_List_adapter<MDL_request, &MDL_request::next_in_list, &MDL_request::prev_in_list>, I_P_List_counter, I_P_List_no_push_back<MDL_request> >*, unsigned long) /ci/workspace/hwsql/sql/mdl.cc:3755 #9 0x55c2c34bb53a in read_histograms /ci/workspace/hwsql/sql/sql_base.cc:587 #10 0x55c2c34bd0a3 in get_table_share(THD*, char const*, char const*, char const*, unsigned long, bool, bool) /ci/workspace/hwsql/sql/sql_base.cc:817 #11 0x55c2c34c0b4c in get_table_share_with_discover /ci/workspace/hwsql/sql/sql_base.cc:888 #12 0x55c2c34cbbd8 in open_table(THD*, TABLE_LIST*, Open_table_context*) /ci/workspace/hwsql/sql/sql_base.cc:3221 #13 0x55c2c34ceed4 in open_and_process_table /ci/workspace/hwsql/sql/sql_base.cc:5088 #14 0x55c2c34cfc79 in open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /ci/workspace/hwsql/sql/sql_base.cc:5910 #15 0x55c2c34d17b2 in open_and_lock_tables(THD*, TABLE_LIST*, unsigned int, Prelocking_strategy*) /ci/workspace/hwsql/sql/sql_base.cc:6641 #16 0x55c2c33dab40 in open_and_lock_tables(THD*, TABLE_LIST*, unsigned int) (/ci/workspace/hwsql/debug/binary/bin/mysqld+0x3d6ab40) #17 0x55c2c3b19c41 in check_engine_type_for_acl_table(THD*, bool) /ci/workspace/hwsql/sql/auth/sql_auth_cache.cc:2018 #18 0x55c2c3b1b3a1 in acl_init(bool) /ci/workspace/hwsql/sql/auth/sql_auth_cache.cc:1777 #19 0x55c2c33b89ce in mysqld_main(int, char**) /ci/workspace/hwsql/sql/mysqld.cc:7862 #20 0x55c2c339022d in main /ci/workspace/hwsql/sql/main.cc:25 #21 0x7f97cf483504 in __libc_start_main (/lib64/libc.so.6+0x22504)
[23 Nov 2023 10:54]
MySQL Verification Team
Hi, This is a forum for bug reports with repeatable test cases. It can be run in some memory checking software, but it still has to be a test case. Also, make sure that you are using binary from our download site at dev.mysql.com.
[19 Nov 2024 3:16]
alex xing
I also encountered this problem with mysql8.0.26