Bug #68644 failed test case in MySQL5.6.10
Submitted: 12 Mar 2013 2:07 Modified: 12 Mar 2013 8:41
Reporter: zhai weixiang (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: GIS Severity:S3 (Non-critical)
Version:5.6.10 OS:Linux
Assigned to: CPU Architecture:Any

[12 Mar 2013 2:07] zhai weixiang
Description:
there are two failed test case (using valgrind ) in my environment and both were related to GIS
failed test case:main.gis-rt-precise main.gis-rtree 

$cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.1 (Santiago)

linux kernel version :2.6.32

cmake command:

CFLAGS="-O3 -g -fno-exceptions  -gdwarf-2 -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing"
CXX=g++
CXXFLAGS="-O3 -g -fno-exceptions  -fno-inline -fno-rtti -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing"
export CFLAGS CXX CXXFLAGS

cmake . \
  -DCMAKE_BUILD_TYPE:STRING=Release             \
  -DSYSCONFDIR:PATH=/u01/mysql \
  -DCMAKE_INSTALL_PREFIX:PATH=/u01/mysql \
  -DENABLED_PROFILING:BOOL=ON                   \
  -DENABLE_DEBUG_SYNC:BOOL=OFF                  \
  -DMYSQL_DATADIR:PATH=/u01/mysql/data    \
  -DMYSQL_MAINTAINER_MODE:BOOL=OFF              \
  -DWITH_EXTRA_CHARSETS:STRING=all  \
  -DWITH_BIG_TABLES:BOOL=ON \
  -DWITH_FAST_MUTEXES:BOOL=ON \
  -DENABLE-PROFILING:BOOL=ON \
  -DWITH_SSL:STRING=bundled                     \
  -DWITH_UNIT_TESTS:BOOL=OFF                    \
  -DWITH_ZLIB:STRING=bundled                    \
  -DWITH_PARTITION_STORAGE_ENGINE:BOOL=ON       \
  -DWITH_PLUGINS=heap,csv,partition,innodb_plugin,myisam \
  -DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_chinese_ci -DWITH_EXTRA_CHARSETS=all\
  -DENABLED_ASSEMBLER:BOOL=ON                   \
  -DENABLED_LOCAL_INFILE:BOOL=ON                \
  -DENABLED_THREAD_SAFE_CLIENT:BOOL=ON          \
  -DENABLED_EMBEDDED_SERVER:BOOL=ON            \
  -DWITH_CLIENT_LDFLAGS:STRING=all-static                 \
  -DINSTALL_LAYOUT:STRING=STANDALONE

./mtr --valgrind main.gis-rtree
line
==30772== Warning: invalid file descriptor -1 in syscall close()
^ Found warnings in /u01/project/PS5518/branches/mysql-5.6.10/mysql-test/var/log/mysqld.1.err
ok

 - saving '/u01/project/PS5518/branches/mysql-5.6.10/mysql-test/var/log/main.gis-rtree/' to '/u01/project/PS5518/branches/mysql-5.6.10/mysql-test/var/log/main.gis-rtree/'
worker[1] Valgrind report from /u01/project/PS5518/branches/mysql-5.6.10/mysql-test/var/log/mysqld.1.err after tests:
 main.gis-rtree
--------------------------------------------------------------------------
HEAP SUMMARY:
    in use at exit: 67,287,305 bytes in 1,234 blocks
  total heap usage: 23,145 allocs, 21,911 frees, 115,312,362 bytes allocated

76 bytes in 1 blocks are definitely lost in loss record 228 of 385
   at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
   by 0x38888CE9B0: gaih_inet (in /lib64/libc-2.12.so)
   by 0x38888D0D0F: getaddrinfo (in /lib64/libc-2.12.so)
   by 0x5DE896: network_init() (mysqld.cc:2221)
   by 0x5E0AE9: mysqld_main(int, char**) (mysqld.cc:5433)
   by 0x388881EC9C: (below main) (in /lib64/libc-2.12.so)

LEAK SUMMARY:
   definitely lost: 76 bytes in 1 blocks
   indirectly lost: 0 bytes in 0 blocks
     possibly lost: 0 bytes in 0 blocks
   still reachable: 0 bytes in 0 blocks
        suppressed: 67,287,229 bytes in 1,233 blocks

For counts of detected and suppressed errors, rerun with: -v
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 338 from 338)

valgrind_report                          [ fail ]
        Test ended at 2013-03-12 09:44:17

./mtr --valgrind main.gis-rt-precise

==31199== Warning: invalid file descriptor -1 in syscall close()
^ Found warnings in /u01/project/PS5518/branches/mysql-5.6.10/mysql-test/var/log/mysqld.1.err
ok

 - saving '/u01/project/PS5518/branches/mysql-5.6.10/mysql-test/var/log/main.gis-rt-precise/' to '/u01/project/PS5518/branches/mysql-5.6.10/mysql-test/var/log/main.gis-rt-precise/'
worker[1] Valgrind report from /u01/project/PS5518/branches/mysql-5.6.10/mysql-test/var/log/mysqld.1.err after tests:
 main.gis-rt-precise
--------------------------------------------------------------------------
HEAP SUMMARY:
    in use at exit: 67,282,713 bytes in 1,110 blocks
  total heap usage: 18,254 allocs, 17,144 frees, 108,558,654 bytes allocated

76 bytes in 1 blocks are definitely lost in loss record 225 of 374
   at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
   by 0x38888CE9B0: gaih_inet (in /lib64/libc-2.12.so)
   by 0x38888D0D0F: getaddrinfo (in /lib64/libc-2.12.so)
   by 0x5DE896: network_init() (mysqld.cc:2221)
   by 0x5E0AE9: mysqld_main(int, char**) (mysqld.cc:5433)
   by 0x388881EC9C: (below main) (in /lib64/libc-2.12.so)

LEAK SUMMARY:
   definitely lost: 76 bytes in 1 blocks
   indirectly lost: 0 bytes in 0 blocks
     possibly lost: 0 bytes in 0 blocks
   still reachable: 0 bytes in 0 blocks
        suppressed: 67,282,637 bytes in 1,109 blocks

How to repeat:
run the test case

Suggested fix:
I don't know if I can ignore these failed test cases.
[12 Mar 2013 5:59] Erlend Dahl
We run these tests internally on a daily basis, and we don't see the failures that you report.

There have been some bogus reports of failures in the GIS tests though which have disappeared when we have gone to later versions of the compiler and valgrind itself:

  gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) 
  valgrind-3.8.1

Note that we run the tests without the optimization level (-O3) that you use.
[12 Mar 2013 7:02] zhai weixiang
my gcc version :
gcc version 4.4.5 20110214 (Red Hat 4.4.5-6) (GCC)

$valgrind --version
valgrind-3.6.0
[12 Mar 2013 8:33] MySQL Verification Team
verified as described on 5.6.12, valgrind-3.8.1, fedora 17 x64
[12 Mar 2013 8:39] MySQL Verification Team
I was too quick to set verified :(

compile-pentium-valgrind-max-no-ndb
Ver 5.6.12-debug for Linux on x86_64 (MySQL Community Server (GPL))
gcc (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2)

Now, looking at the actual failure it is really SSL related, not GIS related (there's another bug for that).

Any I see not network related leaks either.  
So, "cant repeat" is probably better.