Bug #26009 'mysql-test-run --valgrind --do-test=ps_7ndb' produces valgrind error
Submitted: 1 Feb 2007 14:43 Modified: 10 May 2007 10:12
Reporter: Sergei Glukhov Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:4.1 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[1 Feb 2007 14:43] Sergei Glukhov
Description:
CURRENT_TEST: ps_7ndb
...
==22206== 
==22206== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6568 from 6)
==22206== malloc/free: in use at exit: 32,736 bytes in 2,129 blocks.
==22206== malloc/free: 66,325 allocs, 64,196 frees, 42,548,818 bytes allocated.
==22206== For counts of detected errors, rerun with: -v
==22206== searching for pointers to 2,129 not-freed blocks.
==22206== checked 854,552 bytes.
==22206== 
==22206== 48 (16 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 9
==22206==    at 0x4005400: malloc (vg_replace_malloc.c:149)
==22206==    by 0x840C21B: NdbMem_Allocate (NdbMem.c:39)
==22206==    by 0x840ED54: operator new(unsigned) (new.cpp:13)
==22206==    by 0x83F39BF: GlobalDictCache::get(char const*) (DictCache.cpp:116)
==22206==    by 0x83DDADC: NdbDictionaryImpl::fetchGlobalTableImpl(char const*) (NdbDictionaryImpl.cpp:664)
==22206==    by 0x83DF3AF: NdbDictionaryImpl::createBlobTables(NdbTableImpl&) (NdbDictionaryImpl.hpp:637)
==22206==    by 0x83DF300: NdbDictionaryImpl::createTable(NdbTableImpl&) (NdbDictionaryImpl.cpp:1370)
==22206==    by 0x83D3C98: NdbDictionary::Dictionary::createTable(NdbDictionary::Table const&) (NdbDictionary.cpp:726)
==22206==    by 0x8233559: ha_ndbcluster::create(char const*, st_table*, st_ha_create_information*) (ha_ndbcluster.cc:4001)
==22206==    by 0x820FEB2: ha_create_table(char const*, st_ha_create_information*, bool) (handler.cc:1341)
==22206==    by 0x82003EB: rea_create_table(THD*, char*, char const*, char const*, st_ha_create_information*, List<create_field>&, unsigned, st_key*) (unireg.cc:252)
==22206==    by 0x8240134: mysql_create_table(THD*, char const*, char const*, st_ha_create_information*, Alter_info*, bool, unsigned) (sql_table.cc:1510)
==22206==    by 0x8192615: mysql_execute_command(THD*) (sql_parse.cc:2599)
==22206==    by 0x8195FF3: mysql_parse(THD*, char*, unsigned) (sql_parse.cc:4440)
==22206==    by 0x81967F7: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1530)
==22206==    by 0x81979C3: do_command(THD*) (sql_parse.cc:1331)
==22206== 
==22206== 
==22206== 32 bytes in 1 blocks are indirectly lost in loss record 5 of 9
==22206==    at 0x4005400: malloc (vg_replace_malloc.c:149)
==22206==    by 0x840C21B: NdbMem_Allocate (NdbMem.c:39)
==22206==    by 0x840ED12: operator new[](unsigned) (new.cpp:23)
==22206==    by 0x83F42E0: Vector<GlobalDictCache::TableVersion>::Vector(int) (Vector.hpp:55)
==22206==    by 0x83F39D2: GlobalDictCache::get(char const*) (DictCache.cpp:116)
==22206==    by 0x83DDADC: NdbDictionaryImpl::fetchGlobalTableImpl(char const*) (NdbDictionaryImpl.cpp:664)
==22206==    by 0x83DF3AF: NdbDictionaryImpl::createBlobTables(NdbTableImpl&) (NdbDictionaryImpl.hpp:637)
==22206==    by 0x83DF300: NdbDictionaryImpl::createTable(NdbTableImpl&) (NdbDictionaryImpl.cpp:1370)
==22206==    by 0x83D3C98: NdbDictionary::Dictionary::createTable(NdbDictionary::Table const&) (NdbDictionary.cpp:726)
==22206==    by 0x8233559: ha_ndbcluster::create(char const*, st_table*, st_ha_create_information*) (ha_ndbcluster.cc:4001)
==22206==    by 0x820FEB2: ha_create_table(char const*, st_ha_create_information*, bool) (handler.cc:1341)
==22206==    by 0x82003EB: rea_create_table(THD*, char*, char const*, char const*, st_ha_create_information*, List<create_field>&, unsigned, st_key*) (unireg.cc:252)
==22206==    by 0x8240134: mysql_create_table(THD*, char const*, char const*, st_ha_create_information*, Alter_info*, bool, unsigned) (sql_table.cc:1510)
==22206==    by 0x8192615: mysql_execute_command(THD*) (sql_parse.cc:2599)
==22206==    by 0x8195FF3: mysql_parse(THD*, char*, unsigned) (sql_parse.cc:4440)
==22206==    by 0x81967F7: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1530)
==22206== 
==22206== LEAK SUMMARY:
==22206==    definitely lost: 16 bytes in 1 blocks.
==22206==    indirectly lost: 32 bytes in 1 blocks.
==22206==      possibly lost: 0 bytes in 0 blocks.
==22206==    still reachable: 0 bytes in 0 blocks.
==22206==         suppressed: 32,688 bytes in 2,127 blocks.

How to repeat:
Compile it for valgrind and run
./mysql-test-run --valgrind --do-test=ps_7ndb.
See master.err file

Suggested fix:
Looks like this error was fixed in 5.0(bugs#9626, 11033, 11034 and 11036, problem with 'operator new[](unsigned) (new.cpp:23)' & 'NdbMem_Allocate (NdbMem.c:39)').
suggested fix: make backport from 5.0
[10 May 2007 10:12] Tomas Ulin
will not be fixed in 4.1