Bug #15976 Multiply warnings about unfreed memory
Submitted: 24 Dec 2005 21:46 Modified: 27 Dec 2005 20:44
Reporter: Dmitry Lenev Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S1 (Critical)
Version:5.1-20051225 OS:Linux (Linux)
Assigned to: Antony Curtis CPU Architecture:Any

[24 Dec 2005 21:46] Dmitry Lenev
Tons of warnings about unfreed memory are emitted while running tests for -debug-max build.

I have used server's source snapshot corresponding to the following changeset:

ChangeSet 1.1987 2005/12/23 17:51:14 brian@zim.(none)
  Just a few cleanup points in azio. Should solve Ubuntu compile problem. 
Typical excerpt from mysql-test/var/log/master.err log:

CURRENT_TEST: auto_increment
051225  0:04:44 [Note] Got signal 15 to shutdown mysqld
051225  0:04:44 [Note] /home/dlenev/mysql-5.1-new/sql/mysqld: Normal shutdown

051225  0:04:44 [Note] /home/dlenev/mysql-5.1-new/sql/mysqld: Shutdown complete

^G/home/dlenev/mysql-5.1-new/sql/mysqld: 51 files and 0 streams is left open

User time 1.61, System time 1.40
Maximum resident set size 0, Integral resident set size 0
Non-physical pagefaults 10074, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 14065, Involuntary context switches 5648
Warning: Not freed memory segments: 75
Warning: Memory that was not free'ed (63969 bytes):
            14 bytes at 0x00895c980, allocated at line  153 in 'my_open.c'
            14 bytes at 0x00895c950, allocated at line  153 in 'my_open.c'
            14 bytes at 0x0089d9748, allocated at line  153 in 'my_open.c'
            14 bytes at 0x00895caa8, allocated at line  153 in 'my_open.c'
            14 bytes at 0x0089d9718, allocated at line  153 in 'my_open.c'
            14 bytes at 0x0089582c8, allocated at line  153 in 'my_open.c'
            14 bytes at 0x00894c0e0, allocated at line  153 in 'my_open.c'
            14 bytes at 0x00894c1f8, allocated at line  153 in 'my_open.c'
          8136 bytes at 0x042de5028, allocated at line  197 in 'my_alloc.c'
          8136 bytes at 0x042de3040, allocated at line  197 in 'my_alloc.c'
           344 bytes at 0x042de2ec8, allocated at line   57 in 'ft_stopwords.c'
           256 bytes at 0x042dc3528, allocated at line  434 in 'ha_federated.cc'
           256 bytes at 0x042dc3408, allocated at line  207 in 'ha_archive.cc'
           256 bytes at 0x042dc32e8, allocated at line  241 in 'ha_berkeley.cc'
           256 bytes at 0x040cffdb0, allocated at line 1437 in 'ha_innodb.cc'
         16391 bytes at 0x0089359f0, allocated at line  120 in 'net_serv.cc'
          4112 bytes at 0x0089349c0, allocated at line  129 in 'my_alloc.c'
          8208 bytes at 0x008932990, allocated at line  129 in 'my_alloc.c'
            64 bytes at 0x008929118, allocated at line  265 in 'sql_class.cc'
           128 bytes at 0x008929078, allocated at line  257 in 'sql_class.cc'
          1040 bytes at 0x008928c48, allocated at line   64 in 'my_alloc.c'
            42 bytes at 0x008928bf8, allocated at line  593 in 'time.cc'
            33 bytes at 0x008928bb0, allocated at line  593 in 'time.cc'
            33 bytes at 0x0088e2200, allocated at line  593 in 'time.cc'
           128 bytes at 0x008928b10, allocated at line 1730 in 'sql_class.cc'
           128 bytes at 0x008928a70, allocated at line 1727 in 'sql_class.cc'
          8152 bytes at 0x008926a78, allocated at line 1632 in 'sql_lex.cc'
          5500 bytes at 0x0089254d8, allocated at line  422 in 'sql_list.h'
            24 bytes at 0x0088e0fe8, allocated at line 1299 in 'ha_innodb.cc'
           256 bytes at 0x0088e0e80, allocated at line 5118 in 'ha_ndbcluster.cc'
           568 bytes at 0x0088e2c98, allocated at line  150 in 'mgmapi.cpp'
           568 bytes at 0x0088c1ea0, allocated at line  150 in 'mgmapi.cpp'
Maximum memory usage: 2583660 bytes (2524k)

How to repeat:
1) Build server with BUILD/compile-pentium-debug-max
2) Run test-suite ("make test")
3) Observer warnings about unfreed memory in mysql-test/var/log/master.err log
[25 Dec 2005 11:30] 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:

[27 Dec 2005 19:18] Antony Curtis
Reviewed by serg
[27 Dec 2005 20:44] Antony Curtis
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at