Bug #61549 Valgrind warning on rpl_heartbeat_basic / main.compress on 5.5 bzr rev. 3462
Submitted: 17 Jun 2011 10:37 Modified: 7 Jan 2022 12:06
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.5 OS:Linux (Ubuntu 10.10 x86_64)
Assigned to: CPU Architecture:Any

[17 Jun 2011 10:37] Laurynas Biveinis
Description:
rpl.rpl_heartbeat_basic 'mix'            [ fail ]  Found warnings/errors in server log file!
        Test ended at 2011-06-17 13:27:54
line
==1867== Thread 17:
==1867== Conditional jump or move depends on uninitialised value(s)
==1867==    at 0x5256E40: inflateReset2 (in /lib/libz.so.1.2.3.4)
==1867==    by 0x5256F2F: inflateInit2_ (in /lib/libz.so.1.2.3.4)
==1867==    by 0x5251648: uncompress (in /lib/libz.so.1.2.3.4)
==1867==    by 0x8DC1D1: my_uncompress (my_compress.c:122)
==1867==    by 0x534EBC: my_net_read (net_serv.cc:1135)
==1867==    by 0x716AAD: cli_safe_read (client.c:735)
==1867==    by 0x71CA65: cli_read_query_result (client.c:3765)
==1867==    by 0x71CF4E: mysql_real_query (client.c:3852)
==1867==    by 0x549C5C: get_master_version_and_clock(st_mysql*, Master_info*) (slave.cc:1350)
==1867==    by 0x54EA2F: handle_slave_io (slave.cc:2811)
==1867==    by 0x90D840: pfs_spawn_thread (pfs.cc:1015)
==1867==    by 0x4E35970: start_thread (pthread_create.c:304)
==1867==    by 0x636192C: clone (clone.S:112)

How to repeat:
cmake options: -DWITH_DEBUG=ON -DWITH_VALGRIND=ON

./mysql-test-run.pl  --valgrind-mysqld rpl_heartbeat_basic
[17 Jun 2011 10:38] Laurynas Biveinis
Full output

Attachment: valgrind.out (application/octet-stream, text), 18.61 KiB.

[17 Jun 2011 12:44] Laurynas Biveinis
Similar warning on main.compress:

main.compress                            [ fail ]  Found warnings/errors in server log file!
        Test ended at 2011-06-17 15:41:27
line
==3356== Thread 14:
==3356== Conditional jump or move depends on uninitialised value(s)
==3356==    at 0x5256E40: inflateReset2 (in /lib/libz.so.1.2.3.4)
==3356==    by 0x5256F2F: inflateInit2_ (in /lib/libz.so.1.2.3.4)
==3356==    by 0x5251648: uncompress (in /lib/libz.so.1.2.3.4)
==3356==    by 0x8DC1D1: my_uncompress (my_compress.c:122)
==3356==    by 0x534EBC: my_net_read (net_serv.cc:1135)
==3356==    by 0x5CDCA5: do_command(THD*) (sql_parse.cc:717)
==3356==    by 0x6BBFC5: do_handle_one_connection(THD*) (sql_connect.cc:787)
==3356==    by 0x6BBA80: handle_one_connection (sql_connect.cc:706)
==3356==    by 0x90D840: pfs_spawn_thread (pfs.cc:1015)
==3356==    by 0x4E35970: start_thread (pthread_create.c:304)
==3356==    by 0x636192C: clone (clone.S:112)
[18 Jun 2011 23:10] MySQL Verification Team
Thank you for the bug report.
[22 Jul 2011 2:14] Stewart Smith
addition to valgrind suppression file (same as for azio callers)

--- valgrind.supp.old	2011-07-21 18:47:12.457093661 -0700
+++ valgrind.supp	2011-07-21 18:49:09.467093733 -0700
@@ -876,3 +876,12 @@
    fun:buf_buddy_free_low
    fun:buf_buddy_free
 }
+{
+   zlib longest_match false positive
+   Memcheck:Cond
+   fun:longest_match
+   fun:deflate_slow
+   fun:deflate
+   fun:compress
+   fun:my_compress_alloc
+}
[7 Jan 2022 12:06] Laurynas Biveinis
5.5 has been EOL for a long time now