Bug #45255 Backup: rpl.rpl_backup_shutdown shows warnings in PB2 valgrind
Submitted: 2 Jun 2009 6:53 Modified: 25 Jun 2009 22:21
Reporter: Jørgen Løland Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Server Severity:S3 (Non-critical)
Version:6.0-backup OS:Any
Assigned to: Jørgen Løland CPU Architecture:Any

[2 Jun 2009 6:53] Jørgen Løland
Description:
The test has warnings in PB2 Valgrind.

rpl.rpl_backup_shutdown                  [ fail ]  Found warnings/errors in server log file!
        Test ended at 2009-05-29 13:46:32
mysqltest: Logging to ''.
mysqltest: Results saved in ''.
mysqltest: Connecting to server localhost:13040 (socket /export/home/pb2/test/sb_0-554348-1243591538.01/tmp/BlcvKwLRei/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...
mysqltest: ... Connected.
mysqltest: Start processing test commands from './include/check-warnings.test' ...
file_name	line
/export/home/pb2/test/sb_0-554348-1243591538.01/mysql-5.4.4-alpha-linux-x86_64-test/mysql-test/var/log/mysqld.1.err	==16919==    at 0x4A05809: malloc (vg_replace_malloc.c:149)
^ Found warnings!!
mysqltest: ... Done processing test commands.
mysqltest: Test has succeeded!
ok

 - saving '/export/home/pb2/test/sb_0-554348-1243591538.01/mysql-5.4.4-alpha-linux-x86_64-test/mysql-test/var/log/rpl.rpl_backup_shutdown/' to '/export/home/pb2/test/sb_0-554348-1243591538.01/mysql-5.4.4-alpha-linux-x86_64-test/mysql-test/var/log/rpl.rpl_backup_shutdown/'

Retrying test, attempt(2/3)...

How to repeat:
See PB2

Suggested fix:
Remove warnings
[2 Jun 2009 7:06] Jørgen Løland
Test added to collections/default.experimental to avoid red tree in backup-azalea. Please remove from this list when this bug has been fixed.
[15 Jun 2009 9:29] Jørgen Løland
I'm finally able to get this valgrind error on my desktop. 

The error log for mysqld.1 says:
--------------------------------
==22248== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 5 from 1)
==22248== malloc/free: in use at exit: 56 bytes in 1 blocks.
==22248== malloc/free: 19,335 allocs, 19,334 frees, 32,288,870 bytes allocated.
==22248== For counts of detected errors, rerun with: -v
==22248== searching for pointers to 1 not-freed blocks.
==22248== checked 1,971,696 bytes.
==22248== 
==22248== 56 bytes in 1 blocks are still reachable in loss record 1 of 1
==22248==    at 0x4A05809: malloc (vg_replace_malloc.c:149)
==22248==    by 0x37B240BAA6: _dl_map_object_deps (in /lib64/ld-2.5.so)
==22248==    by 0x37B2410CAC: dl_open_worker (in /lib64/ld-2.5.so)
==22248==    by 0x37B240CEA5: _dl_catch_error (in /lib64/ld-2.5.so)
==22248==    by 0x37B241064B: _dl_open (in /lib64/ld-2.5.so)
==22248==    by 0x37B290622F: do_dlopen (in /lib64/libc-2.5.so)
==22248==    by 0x37B240CEA5: _dl_catch_error (in /lib64/ld-2.5.so)
==22248==    by 0x37B2906396: __libc_dlopen_mode (in /lib64/libc-2.5.so)
==22248==    by 0x37B340E53B: pthread_cancel_init (in /lib64/libpthread-2.5.so)
==22248==    by 0x37B340E64F: _Unwind_ForcedUnwind (in /lib64/libpthread-2.5.so)
==22248==    by 0x37B340C55F: __pthread_unwind (in /lib64/libpthread-2.5.so)
==22248==    by 0x37B3407404: pthread_exit (in /lib64/libpthread-2.5.so)
==22248==    by 0xB66875: nptl_pthread_exit_hack_handler (my_thr_init.c:64)
==22248==    by 0x37B34062F6: start_thread (in /lib64/libpthread-2.5.so)
==22248==    by 0x37B28D1B6C: clone (in /lib64/libc-2.5.so)

The error log for mysqld.2 says:
--------------------------------
==22252== Thread 3:
==22252== Source and destination overlap in strcpy(0x5DA1E81, 0x5DA1E8E)
==22252==    at 0x4A06E47: strcpy (mc_replace_strmem.c:106)
==22252==    by 0xB50152: pack_dirname (mf_pack.c:80)
==22252==    by 0xB40112: fn_format (mf_format.c:78)
==22252==    by 0x896036: Relay_log_info::init_info(bool) (rpl_rli.cc:999)
==22252==    by 0x88A1B3: init_info(Master_info*, bool, int) (slave.cc:382)
==22252==    by 0x88D7D1: change_master(THD*, Master_info*) (sql_repl.cc:1401)
==22252==    by 0x6CF961: mysql_execute_command(THD*) (sql_parse.cc:2531)
==22252==    by 0x6D7263: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5999)
==22252==    by 0x6D8600: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1064)
==22252==    by 0x6D9A4F: do_command(THD*) (sql_parse.cc:746)
==22252==    by 0x6C76F9: handle_one_connection (sql_connect.cc:1146)
==22252==    by 0x37B34062F6: start_thread (in /lib64/libpthread-2.5.so)
==22252==    by 0x37B28D1B6C: clone (in /lib64/libc-2.5.so)
[15 Jun 2009 10:43] Jørgen Løland
The first error (in mysqld.1.err) was suppressed with the valgrind.supp file in place. The second error remains.
[15 Jun 2009 11:30] Jørgen Løland
PB2 does currently not suppress valgrind errors. davi has pushed a fix (http://lists.mysql.com/commits/75732) for this. Putting this bug on hold until the valgrind.supp fix has been merged into azalea.
[17 Jun 2009 9:46] Jørgen Løland
The valgrind suppression fix by Davi fixed the failing test. Two PB2 test iterations have now been run without this test failing. 

Since the test seems stable, I'll remove it from the list of experimental tests.
[17 Jun 2009 13:37] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/76467

2826 Jorgen Loland	2009-06-17
      BUG#45255 - Backup: rpl.rpl_backup_shutdown shows warnings in PB2 valgrind
      
      Problem was fixed when valgrind suppression was enabled in PB2. Removing the test from the list of experimental tests.
     @ mysql-test/collections/default.experimental
        Remove rpl_backup_shutdown from list of experimental tests.
[18 Jun 2009 7:06] Jørgen Løland
The work on this bug only includes finding the problem and removing the test from the experimental list. The problem itself was fixed by Davi enabling valgrind support on PB2. I take the liberty to skip reviews of the above patch which moves the test out of the experimental list
[25 Jun 2009 14:39] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090625143727-9gqcfzh7ajuk66oj) (version source revid:charles.bell@sun.com-20090618161736-be8ueaopvfro2jva) (merge vers: 5.4.4-alpha) (pib:11)
[25 Jun 2009 22:21] Paul DuBois
Test case changes. No changelog entry needed.