Bug #39436 crash during importing a tablespace
Submitted: 14 Sep 2008 10:04 Modified: 12 Nov 2008 18:23
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:5.0.66a OS:Any (Solaris, Windows)
Assigned to: Assigned Account CPU Architecture:Any

[14 Sep 2008 10:04] Shane Bester
got a crash during a concurrency test:

mysqld-nt.exe!mysql_discard_or_import_tablespace  Line 3015

Line 3015 is: table->file->print_error(error, MYF(0));
3015:   table->file->print_error(error, MYF(0));

00000000005E7AC8 48 8B 4E 08      mov         rcx,qword ptr [rsi+8] 
00000000005E7ACC 48 8B 01         mov         rax,qword ptr [rcx] 
00000000005E7ACF 45 33 C0         xor         r8d,r8d 
00000000005E7AD2 8B D7            mov         edx,edi 
00000000005E7AD4 FF 50 38         call        qword ptr [rax+38h] <--- crash

How to repeat:
run mysqld with --innodb_file_per_table and import/discard an innodb tablespace in > 1 thread.  Will upload testcase later.
[14 Sep 2008 10:06] MySQL Verification Team
more info

Attachment: bug39436_debug_info.txt (text/plain), 17.71 KiB.

[14 Sep 2008 10:26] MySQL Verification Team
testcase. run against server started with --innodb_file_per_table

Attachment: bug39436.c (text/plain), 6.25 KiB.

[14 Sep 2008 10:34] MySQL Verification Team
5.1 crashes with this testcase, but a crash happens in the "select". please see bug #39436 for that crash.
[15 Sep 2008 18:05] Calvin Sun
It is bug #39438 for 5.1.
[12 Nov 2008 16:46] MySQL Verification Team
All:  The OS field of the bug report says Any.  I used windows server because stack trace is neater and doesn't wrap.

The attached testcase is sufficient and can be run on any linux or solaris.
Solaris/Linux mysqld server crashes also:

081106 23:21:53  InnoDB: Error: cannot reset lsn's in table `test/t1`
081106 23:21:53 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 225787 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Why is a windows based testcase needed?
[12 Nov 2008 18:23] Mikhail Izioumtchenko
Vasil fixed the 5.1 version of the bug. Let's make this
a duplicate of bug #39438 and assign to Vasil to check if it's indeed 
the same, if it's feasible to backport it to 5.0, etc. 
I guess it'll be up to MySQL to accept it for 5.0 but Vasil's comments
in #39438 indicate they should consider it. Low R/E, in particular, if it is the same bug.
[5 May 2010 15:18] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 5:59] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:28] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 6:56] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:02] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:44] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:30] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)