Bug #43456 backup.backup_client.test throws a valgrind warning
Submitted: 6 Mar 2009 13:49 Modified: 11 Mar 2009 7:44
Reporter: Ingo Strüwing Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:6.0-backup OS:Linux
Assigned to: CPU Architecture:Any
Tags: pushbuild, valgrind, warning

[6 Mar 2009 13:49] Ingo Strüwing
Description:
backup.backup_client                     [ fail ]  Found warnings/errors in server log file!
        Test ended at 2009-03-06 14:13:49
mysqltest: Logging to ''.
mysqltest: Results saved in ''.
mysqltest: Connecting to server localhost:10120 (socket /home2/mydev/bzrroot/mysql-6.0-bug41979-1/mysql-test/var/tmp/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...
mysqltest: ... Connected.
mysqltest: Start processing test commands from './include/check-warnings.test' ...
file_name       line
/home2/mydev/bzrroot/mysql-6.0-bug41979-1/mysql-test/var/mysqld.1/mysqld.err    ==18340==    at 0xE00A96: longest_match (deflate.c:1121)
^ Found warnings!!
mysqltest: ... Done processing test commands.
mysqltest: Test has succeeded!
ok

Error log contains:

==18340== Thread 17:
==18340== Conditional jump or move depends on uninitialised value(s)
==18340==    at 0xE00A96: longest_match (deflate.c:1121)
==18340==    by 0xE01E99: deflate_slow (deflate.c:1595)
==18340==    by 0xDFFF79: deflate (deflate.c:790)
==18340==    by 0xEA2EA4: backup::Output_stream::close() (stream.cc:456)
==18340==    by 0xE8F9A8: Backup_restore_ctx::close() (kernel.cc:1048)
==18340==    by 0xE8FEBB: Backup_restore_ctx::do_backup() (kernel.cc:1155)
==18340==    by 0xE91B41: execute_backup_command(THD*, LEX*, String*, bool, bool) (kernel.cc:206)
==18340==    by 0x76B69F: mysql_execute_command(THD*) (sql_parse.cc:2451)
==18340==    by 0x772D75: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5812)
==18340==    by 0x77392C: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1057)
==18340==    by 0x774DB6: do_command(THD*) (sql_parse.cc:739)
==18340==    by 0x761E64: handle_one_connection (sql_connect.cc:1146)
==18340==    by 0x524DFC6: start_thread (pthread_create.c:297)
==18340==    by 0x63285AC: clone (in /usr/lib/debug/libc-2.7.so)

This is either wrong usage in the backup kernel (less likely due to the simple interface), a problem in zlib, or a candidate for another valgrind report suppression.

How to repeat:
Note that the backup client, including this test case, has not been pushed to the main tree at the time of this writing. So to repeat, you need to branch from mysql-6.0-backup until this is pushed.

Do a valgrind build. Test backup_client with --valgrind.
[6 Mar 2009 13:57] Ingo Strüwing
Setting lead to Konstantin for now, assuming that zlib belongs to the core server.
[9 Mar 2009 8:50] Rafal Somla
Looks like duplicate of BUG#43105, BUG#42409, BUG#39989 - they all report the same valgrind warning in zlib.
[9 Mar 2009 8:51] Rafal Somla
Typo: the last bug shuld be BUG#36989.
[11 Mar 2009 7:44] Rafal Somla
Duplicate of Bug#36989. A patch is queued for it now.