Bug #40416 | Maria: Memory allocated at trnman.c:129 was underrun | ||
---|---|---|---|
Submitted: | 30 Oct 2008 7:31 | Modified: | 9 Jan 2009 15:26 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Maria storage engine | Severity: | S3 (Non-critical) |
Version: | 6.0 | OS: | Any |
Assigned to: | Sergei Golubchik | CPU Architecture: | Any |
[30 Oct 2008 7:31]
Philip Stoev
[6 Nov 2008 12:56]
Guilhem Bichot
pushed to 5.1-maria http://lists.mysql.com/maria/257
[6 Nov 2008 13:04]
Guilhem Bichot
This is also queued to 6.0-maria.
[6 Nov 2008 14:03]
Guilhem Bichot
Back to "verified" because Serg is unsure about his patch.
[6 Nov 2008 21:07]
Guilhem Bichot
Something which looks related. I'm using the latest mysql-maria, and running on Linux 32-bit: (i=0; while true; do i=`expr $i + 1`; echo $i; ./mtr --debug --mysqld=--default-storage-engine=maria mysqlslap || exit 1; done; ) On i=4 it crashed in trnman_destroy(), this line: my_free((void *)(short_trid_to_active_trn+1), MYF(0)); with this message: *** glibc detected *** /home/mysql_src/bzrrepos/mysql-maria/sql/mysqld: free(): invalid pointer: 0xb6828008 *** ======= Backtrace: ========= /lib/libc.so.6[0xb7e296e1] /lib/libc.so.6(cfree+0x89)[0xb7e2ad79] /home/mysql_src/bzrrepos/mysql-maria/sql/mysqld(my_no_flags_free+0x5d)[0x861ec3d] /home/mysql_src/bzrrepos/mysql-maria/sql/mysqld(trnman_destroy+0x228)[0x84f81a3] /home/mysql_src/bzrrepos/mysql-maria/sql/mysqld(maria_end+0x7e)[0x85199a6] /home/mysql_src/bzrrepos/mysql-maria/sql/mysqld(maria_panic+0x281)[0x854e0a1] /home/mysql_src/bzrrepos/mysql-maria/sql/mysqld[0x8514670] /home/mysql_src/bzrrepos/mysql-maria/sql/mysqld(_Z22ha_finalize_handlertonP13st_plugin_int+0x61)[0x8333063] /home/mysql_src/bzrrepos/mysql-maria/sql/mysqld[0x83cc126] /home/mysql_src/bzrrepos/mysql-maria/sql/mysqld[0x83cd6a5] /home/mysql_src/bzrrepos/mysql-maria/sql/mysqld(_Z15plugin_shutdownv+0xe3)[0x83cdc19 Note that the allocation in trnman_init() had gone ok: T@1 : | | | | | | >trnman_init T@1 : | | | | | | | >my_malloc T@1 : | | | | | | | | my: size: 262140 my_flags: 48 T@1 : | | | | | | | | exit: ptr: 0xb6828008 T@1 : | | | | | | | <my_malloc and note that the my_free() in trnman_destroy() wants to free the same pointer value, which makes sense too: T@704 : | | | | | info: pthread_mutex_destroy LOCK_trn_list T@704 : | | | | | >my_free T@704 : | | | | | | my: ptr: 0xb6828008 A grep for this 0xb6828008 in the trace showed no other occurence than trnman_init() and trnman_destroy().
[17 Nov 2008 22:03]
Guilhem Bichot
The error in my previous post was Linux-32-bit, and I just saw it on Linux-64-bit too.
[27 Nov 2008 8:33]
Guilhem Bichot
saw it again (same mysqlslap test, latest 5.1-maria)
[15 Dec 2008 10:08]
Bugs System
Pushed into 6.0.9-alpha (revid:serg@mysql.com-20081205102011-ef1exxc10yz68ov9) (version source revid:guilhem@mysql.com-20081213204800-0nubni3t4ihn4hv9) (pib:5)
[9 Jan 2009 15:26]
MC Brown
Added a note to the 6.0.9 changelog: When executing concurrent CREATE TABLE ... SELECT statements on a Maria table, the error Error: Memory allocated at trnman.c:129 was underrun, discovered at ma_close.c:65 error would be logged in the error file, and the server would eventually crash.