Bug #53307 valgrind: warnings in main.partition_innodb_plugin
Submitted: 30 Apr 2010 9:49 Modified: 14 Dec 2010 19:28
Reporter: Vasil Dimov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: Marko Mäkelä CPU Architecture:Any

[30 Apr 2010 9:49] Vasil Dimov
Description:
Lots of valgrind warnings in main.partition_innodb_plugin, see the attachment

How to repeat:
fetch mysql-5.1-innodb

enable UNIV_DEBUG_VALGRIND in storage/innodb_plugin/include/univ.i

$ ./configure --enable-thread-safe-client --enable-local-infile --with-pic --with-client-ldflags=-static --with-mysqld-ldflags=-static --with-zlib-dir=bundled --without-ndb-debug --with-big-tables --with-ssl --with-readline --with-embedded-server --with-archive-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine --with-example-storage-engine --with-federated-storage-engine --with-partition --with-extra-charsets=all --with-innodb --with-ndbcluster --with-debug --prefix=/home/vdimov/mysql-5.1-innodb-install
[30 Apr 2010 9:50] Vasil Dimov
Full output from mtr

Attachment: main.partition_innodb_plugin.valgrind.txt (text/plain), 186.06 KiB.

[5 May 2010 13:28] 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/107529
[5 May 2010 13:28] 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/107530
[11 May 2010 10:50] 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/107943
[11 May 2010 10:50] 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/107944
[19 May 2010 8:02] 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/108576
[19 May 2010 8:02] 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/108577
[31 May 2010 8:28] Bugs System
Pushed into 5.1.48 (revid:vasil.dimov@oracle.com-20100531082307-9x08gg1g7zybx2jy) (version source revid:vasil.dimov@oracle.com-20100513074652-0cvlhgkesgbb2bfh) (merge vers: 5.5.5-m3) (pib:16)
[14 Jun 2010 5:04] Mark Callaghan
This change fixes the warnings without disabling the valgrind check on 64-bit
[14 Jun 2010 5:16] Mark Callaghan
... the diff I forget to include:

diff --git a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0buf.c
index 5ea6a57..29ca1ea 100644
--- a/storage/innodb_plugin/buf/buf0buf.c
+++ b/storage/innodb_plugin/buf/buf0buf.c
@@ -688,6 +688,10 @@ buf_block_init(

        block->frame = frame;

+#ifdef UNIV_DEBUG
+       block->page.pad = 0;
+       block->page.pad2 = 0;
+#endif /* UNIV_DEBUG */
        block->page.state = BUF_BLOCK_NOT_USED;
        block->page.buf_fix_count = 0;
        block->page.io_fix = BUF_IO_NONE;
diff --git a/storage/innodb_plugin/include/buf0buf.h b/storage/innodb_plugin/include/buf0buf.h
index 843d599..5e8c7f9 100644
--- a/storage/innodb_plugin/include/buf0buf.h
+++ b/storage/innodb_plugin/include/buf0buf.h
@@ -1105,6 +1105,10 @@ struct buf_page_struct{
                                        is currently bufferfixed */
        /* @} */
 #endif /* !UNIV_HOTBACKUP */
+#ifdef UNIV_DEBUG
+       unsigned        pad;            /*!< Avoid padding for 64-bit as that
+                                       may valgrind warnings (bug 53307)  */
+#endif /* UNIV_DEBUG */
        page_zip_des_t  zip;            /*!< compressed page; zip.data
                                        (but not the data it points to) is
                                        also protected by buf_pool_mutex */
@@ -1177,6 +1181,7 @@ struct buf_page_struct{
        ibool           in_LRU_list;    /*!< TRUE if the page is in
                                        the LRU list; used in
                                        debugging */
+       unsigned        pad2;           /*!< See pad above */
 #endif /* UNIV_DEBUG */
        unsigned        old:1;          /*!< TRUE if the block is in the old
                                        blocks in buf_pool->LRU_old */
[14 Jun 2010 5:36] Mark Callaghan
For the previous diff, replace UNIV_DEBUG with UNIV_DEBUG_VALGRIND
[17 Jun 2010 6:13] Bugs System
Pushed into 5.5.5-m3 (revid:alexey.kopytov@sun.com-20100615145247-8bj0vmuqlotbqsn9) (version source revid:marko.makela@oracle.com-20100519080152-h3555oqmu3wo95so) (merge vers: 5.1.48) (pib:16)
[17 Jun 2010 6:17] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100615150216-cubqoyn1fj9b6a2p) (version source revid:marko.makela@oracle.com-20100519080152-h3555oqmu3wo95so) (pib:16)
[1 Oct 2010 16:55] Anitha Gopi
Re opening since the test is still disabled, http://trollheim.norway.sun.com/archive/2329363.disabled_tests.html. Please enable the test if the bug is fixed
[5 Oct 2010 15:04] 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/120024

3622 Vasil Dimov	2010-10-05
      Enable partition_innodb_plugin after Bug#53307 has been fixed
[14 Oct 2010 8:28] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (version source revid:vasil.dimov@oracle.com-20100513074652-0cvlhgkesgbb2bfh) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 8:43] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (version source revid:vasil.dimov@oracle.com-20100513074652-0cvlhgkesgbb2bfh) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 8:58] Bugs System
Pushed into mysql-5.1-telco-6.2 5.1.51-ndb-6.2.19 (revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (version source revid:vasil.dimov@oracle.com-20100513074652-0cvlhgkesgbb2bfh) (merge vers: 5.5.5-m3) (pib:21)
[19 Oct 2010 6:51] Alexander Nozdrin
Moving to Documenting, since the patches are
in 5.1-security and 5.5-security-fixed.

The bug is fixed in 5.5.7-rc.
[9 Nov 2010 19:48] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:sunanda.menon@sun.com-20101109182959-otkxq8vo2dcd13la) (version source revid:sunanda.menon@sun.com-20101109182959-otkxq8vo2dcd13la) (merge vers: 5.5.7-rc) (pib:21)
[13 Nov 2010 16:17] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:alexander.nozdrin@oracle.com-20101113152450-2zzcm50e7i4j35v7) (merge vers: 5.6.1-m4) (pib:21)
[13 Nov 2010 16:41] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101113160336-atmtmfb3mzm4pz4i) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (pib:21)
[18 Nov 2010 15:56] Bugs System
Pushed into mysql-5.1 5.1.54 (revid:build@mysql.com-20101118153531-693taxtxyxpt037i) (version source revid:build@mysql.com-20101118153531-693taxtxyxpt037i) (merge vers: 5.1.54) (pib:21)
[5 Dec 2010 12:37] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (version source revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (merge vers: 5.6.1) (pib:23)
[16 Dec 2010 22:26] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (version source revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (merge vers: 5.5.9) (pib:24)