Bug #89596 __tls_get_addr leak on Ubuntu 17.10
Submitted: 9 Feb 2018 4:17 Modified: 9 Feb 2018 12:54
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:8.0.4 OS:Ubuntu (17.10)
Assigned to: CPU Architecture:Any
Tags: valgrind

[9 Feb 2018 4:17] Laurynas Biveinis
Description:
On Ubuntu 17.10, certain testcases under Valgrind report a memory leak with the following allocation stacktrace:

1 bytes in 1 blocks are still reachable in loss record 1 of 7
   at 0x65A6B0F: malloc (vg_replace_malloc.c:299)
   by 0x598A41C: allocate_dtv_entry (dl-tls.c:591)
   by 0x598A41C: allocate_and_init (dl-tls.c:616)
   by 0x598A41C: tls_get_addr_tail (dl-tls.c:796)
   by 0x5990FA7: __tls_get_addr (tls_get_addr.S:55)
   by 0x240FA554: ???
   by 0x273A3F0: plugin_deinitialize(st_plugin_int*, bool) (sql_plugin.cc:1102)
   by 0x273A942: reap_plugins() (sql_plugin.cc:1181)
   by 0x273D466: plugin_shutdown() (sql_plugin.cc:2025)
   by 0x25B0D49: clean_up(bool) (mysqld.cc:2082)
   by 0x25BE119: mysqld_main(int, char**) (mysqld.cc:6499)
   by 0x25AD7E9: main (main.cc:32)

How to repeat:
$ ./mtr --big-test --debug-server --valgrind rpl_nogtid.rpl_semi_sync_after_sync

Suggested fix:
Add a suppression
[9 Feb 2018 12:09] MySQL Verification Team
Please provide the cmake command you have used to compile the server. Thanks in advance.
[9 Feb 2018 12:54] MySQL Verification Team
Thank you for the feedback.
I observed this on Ubuntu 17.10, not reproducible on Ol7 etc 

Thanks,
Umesh
[9 Feb 2018 12:55] MySQL Verification Team
test results

Attachment: 89596.results (application/octet-stream, text), 16.56 KiB.