Valgrind: 32 bytes in 1 blocks are still reachable in malloc > CRYPTO_malloc > sk_new

Bug #1205196 reported by Roel Van de Paar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Low
Sergei Glushchenko
5.1
Won't Fix
Undecided
Unassigned
5.5
New
Undecided
Unassigned
5.6
Fix Released
Low
Sergei Glushchenko

Bug Description

2013-07-26 08:25:51 32338 [Note] /ssd/Percona-Server-5.6.12-rc60.4-406-debug-valgrind.Linux.x86_64/bin/mysqld: Shutdown complete

==32338==
==32338== HEAP SUMMARY:
==32338== in use at exit: 75,876,624 bytes in 832 blocks
==32338== total heap usage: 32,498 allocs, 31,666 frees, 130,387,498 bytes allocated
==32338==
==32338== 32 bytes in 1 blocks are still reachable in loss record 1 of 296
==32338== at 0x4A069EE: malloc (vg_replace_malloc.c:270)
==32338== by 0x3417C5D9CD: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.0)
==32338== by 0x3417CB6F5E: sk_new (in /usr/lib64/libcrypto.so.1.0.0)
==32338== by 0x341C83D0E4: ??? (in /usr/lib64/libssl.so.1.0.0)
==32338== by 0x341C83D308: SSL_COMP_get_compression_methods (in /usr/lib64/libssl.so.1.0.0)
==32338== by 0x341C844651: SSL_library_init (in /usr/lib64/libssl.so.1.0.0)
==32338== by 0xC798DB: ssl_start (viosslfactories.c:155)
==32338== by 0x625FD9: init_ssl() (mysqld.cc:4310)
==32338== by 0x630170: mysqld_main(int, char**) (mysqld.cc:5509)
==32338== by 0x340C41ECDC: (below main) (in /lib64/libc-2.12.so)
==32338==
==32338== 32 bytes in 1 blocks are still reachable in loss record 2 of 296
==32338== at 0x4A069EE: malloc (vg_replace_malloc.c:270)
==32338== by 0x3417C5D9CD: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.0)
==32338== by 0x3417CB6F7C: sk_new (in /usr/lib64/libcrypto.so.1.0.0)
==32338== by 0x341C83D0E4: ??? (in /usr/lib64/libssl.so.1.0.0)
==32338== by 0x341C83D308: SSL_COMP_get_compression_methods (in /usr/lib64/libssl.so.1.0.0)
==32338== by 0x341C844651: SSL_library_init (in /usr/lib64/libssl.so.1.0.0)
==32338== by 0xC798DB: ssl_start (viosslfactories.c:155)
==32338== by 0x625FD9: init_ssl() (mysqld.cc:4310)
==32338== by 0x630170: mysqld_main(int, char**) (mysqld.cc:5509)
==32338== by 0x340C41ECDC: (below main) (in /lib64/libc-2.12.so)

Tags: qa ssl upstream

Related branches

Revision history for this message
Roel Van de Paar (roel11) wrote :

This is a split from bug 1191582. Testing for this error can be done with the testcase from that bug (note to self: /sssd/209184/start_mtr1000). If you like, we can test a fix in the same bug branch used for that bug.

summary: - 32 bytes in 1 blocks are still reachable in malloc > CRYPTO_malloc >
- sk_new
+ Valgrind: 32 bytes in 1 blocks are still reachable in malloc >
+ CRYPTO_malloc > sk_new
tags: removed: qablock
Revision history for this message
Roel Van de Paar (roel11) wrote :

Actually, not qablock/critical. But may be easy to fix in one patch with bug 1191582.
[roel@qaserver 209184]$ grep -m1 "CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.0)" vardir1_*/log/master.err | wc -l
10

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Either an upstream bug as-is, either a bug that is benign on upstream but visible on PS due to different SSL library used.

tags: added: ssl
tags: added: 56qual
Revision history for this message
Roel Van de Paar (roel11) wrote :

From 448 trial

32 bytes in 1 blocks are still reachable in loss record 22 of 589
   at 0x4A069EE: malloc (vg_replace_malloc.c:270)
   by 0x364265D9CD: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.0)
   by 0x36426B6F5E: sk_new (in /usr/lib64/libcrypto.so.1.0.0)
   by 0x364663D0E4: ??? (in /usr/lib64/libssl.so.1.0.0)
   by 0x364663D308: SSL_COMP_get_compression_methods (in /usr/lib64/libssl.so.1.0.0)
   by 0x3646644651: SSL_library_init (in /usr/lib64/libssl.so.1.0.0)
   by 0xC9167B: ssl_start (viosslfactories.c:155)
   by 0x6299D9: init_ssl() (mysqld.cc:4333)
   by 0x634766: mysqld_main(int, char**) (mysqld.cc:5544)
   by 0x3636E1ECDC: (below main) (in /lib64/libc-2.12.so)

32 bytes in 1 blocks are still reachable in loss record 23 of 589
   at 0x4A069EE: malloc (vg_replace_malloc.c:270)
   by 0x364265D9CD: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.0)
   by 0x36426B6F7C: sk_new (in /usr/lib64/libcrypto.so.1.0.0)
   by 0x364663D0E4: ??? (in /usr/lib64/libssl.so.1.0.0)
   by 0x364663D308: SSL_COMP_get_compression_methods (in /usr/lib64/libssl.so.1.0.0)
   by 0x3646644651: SSL_library_init (in /usr/lib64/libssl.so.1.0.0)
   by 0xC9167B: ssl_start (viosslfactories.c:155)
   by 0x6299D9: init_ssl() (mysqld.cc:4333)
   by 0x634766: mysqld_main(int, char**) (mysqld.cc:5544)
   by 0x3636E1ECDC: (below main) (in /lib64/libc-2.12.so)

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

As I said on IRC, there is a suppression for this leak in upstream but it didn't work because
 by 0x364663D0E4: ??? (in /usr/lib64/libssl.so.1.0.0)
is not resolved, which probably depends on distro/openssl version or smth.
I propose we just make this suppression work.

tags: removed: 56qual
tags: added: upstream
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2038

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.