| Bug #46657 | InnoDB plugin: invalid read in index_merge_innodb test (Valgrind) | ||
|---|---|---|---|
| Submitted: | 11 Aug 18:17 | Modified: | 22 Nov 1:41 |
| Reporter: | Guilhem Bichot | ||
| Status: | Need Doc Info | ||
| Category: | Server: InnoDB Plugin | Severity: | S3 (Non-critical) |
| Version: | 5.1 | OS: | Linux (64bit) |
| Assigned to: | Satya B | Target Version: | 5.1+ |
| Triage: | Triaged: D2 (Serious) | ||
[11 Aug 18:17]
Guilhem Bichot
[11 Aug 19:30]
Guilhem Bichot
the stack trace I gave is the detailed one when I make the plugin be a builtin; when it's a plugin, we just excerpts in pushbuild2: /export/home/pb2/test/sb_1-671695-1249375950.81/mysql-5.1.37-linux-x86_64-test/mysql-test/var/7/log/mysqld.1.err ==11121== at 0x5891EB4: ha_innodb::add_index(st_table*, st_key*, unsigned) (handler0alter.cc:894) /export/home/pb2/test/sb_1-671695-1249375950.81/mysql-5.1.37-linux-x86_64-test/mysql-test/var/7/log/mysqld.1.err ==11121== at 0x4A0541E: free (vg_replace_malloc.c:233) ^ Found warnings!!
[12 Aug 14:24]
Guilhem Bichot
now that 5.1-innodb_plugin has been merged into 5.1-main, bug can very likely be reproduced with the latest 5.1-main tree, available at https://code.launchpad.net/~mysql/mysql-server/mysql-5.1
[13 Aug 8:26]
Marko Mäkelä
The statement after convert_error: reads innodb_table->flags, which will just have been freed after successfully creating the requested indexes. The fix is simple, because innodb_table is not needed anywhere else on this code path: Index: handler/handler0alter.cc =================================================================== --- handler/handler0alter.cc (revision 5670) +++ handler/handler0alter.cc (working copy) @@ -864,6 +864,7 @@ error_handling: indexed_table->n_mysql_handles_opened++; error = row_merge_drop_table(trx, innodb_table); + innodb_table = indexed_table; goto convert_error; case DB_TOO_BIG_RECORD:
[13 Aug 10:36]
Sunny Bains
Marko, OK to commit!
[17 Aug 18:06]
Calvin Sun
set to patch approved until the snapshot is sent to mysql.
[25 Aug 17:27]
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/81525 2874 Guilhem Bichot 2009-08-25 Applying fix from Oracle (Marko) for Bug #46657 "InnoDB plugin: invalid read in index_merge_innodb test (Valgrind)"
[25 Aug 17:29]
Guilhem Bichot
as it was quite annoying (showing up in test suite), I applied Marko's fix which I got from Calvin, to mysql-trunk.
[25 Aug 17:57]
Guilhem Bichot
I don't put the bug in "patch queued" state because the fix isn't in 5.1-main yet (I only put it in mysql-trunk).
[16 Sep 8:45]
Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090916063112-8hjmu6wkxfx5qxf4) (version source revid:alik@sun.com-20090916062454-qzqttcefueqgsfn3) (merge vers: 5.4.4-alpha) (pib:11)
[4 Nov 12:11]
Sergey Vojtovich
Pushed into 5.1.41.
