Bug #54474 | valgrind warnings for partition_innodb_plugin | ||
---|---|---|---|
Submitted: | 14 Jun 2010 6:27 | Modified: | 17 Jun 2010 14:11 |
Reporter: | Mark Callaghan | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: InnoDB Plugin storage engine | Severity: | S1 (Critical) |
Version: | 5.1.47 | OS: | Any |
Assigned to: | Marko Mäkelä | CPU Architecture: | Any |
Tags: | innodb, mtr, plugin, valgrind |
[14 Jun 2010 6:27]
Mark Callaghan
[14 Jun 2010 20:26]
Mark Callaghan
The interesting call stack is: page_cur_tuple_insert: * calls mem_heap_create, mem_heap_alloc to allocate buffer * calls rec_convert_dtuple_to_rec rec_convert_dtuple_to_rec calls rec_convert_dtuple_to_rec_new rec_convert_dtuple_to_rec_new: * calls rec_convert_dtuple_to_rec_comp * calls rec_set_info_and_status_bits Note that rec_set_info_and_status_bits does a read-modify-write to set bits in a byte. But nothing prior to it set those bytes. The bytes are at offset: REC_NEW_STATUS, REC_NEW_INFO_BITS rec_convert_dtuple_to_rec_old has this code: #ifdef UNIV_DEBUG /* Suppress Valgrind warnings of ut_ad() in mach_write_to_1(), mach_write_to_2() et al. */ memset(buf, 0xff, rec - buf + data_size); #endif /* UNIV_DEBUG */ Maybe rec_convert_dtuple_to_rec_new needs that. And adding this to rec_covert_dtuple_to_rec_new makes the warnings go away: #ifdef UNIV_DEBUG_VALGRIND /* See http://bugs.mysql.com/bug.php?id=54474 */ *(((byte*)rec) - REC_NEW_STATUS) = 0; *(((byte*)rec) - REC_NEW_INFO_BITS) = 0; *(((byte*)rec) - REC_NEW_HEAP_NO) = 0; *(((byte*)rec) - REC_NEW_HEAP_NO + 1) = 0; #endif
[17 Jun 2010 8:39]
MySQL Verification Team
this is not repeatabled using revno: 3410 from bk-internal, 5.1.49-debug. logs attached.
Attachment: bug54474_5.1.49_debug.zip (application/x-zip-compressed, text), 6.25 KiB.
[17 Jun 2010 14:00]
MySQL Verification Team
Some more info from me.. I built standard source .tar.gz: Each test is the same: edit univ.i s/#if 0/#if 1/ to enable all the debug defs, then: ./BUILD/compile-pentium-debug-max-no-ndb edit disabled.def to comment out partition_innodb_plugin ./mysql-test-run.pl --mtr-port-base=15000 --valgrind partition_innodb_plugin 5.1.47 failed the test. 5.1.48 passed the test. 5.1.49 from bk-internal passed. All tests on same machine: valgrind-3.5.0 gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) openSUSE 10.2 (X86-64) Linux box2 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux
[17 Jun 2010 14:11]
Mark Callaghan
I missed that you were able to repro on 5.1.47. We can stop spending time on this then if it appears to be fixed. There have been a lot of commits after 5.1.47 to fix valgrind problems in innodb.