Bug #34110 Crash in InnoDB when used "embedded"
Submitted: 28 Jan 2008 20:07 Modified: 6 Feb 2008 11:21
Reporter: Joerg Bruehe
Status: Verified
Category:Server: InnoDB Severity:S1 (Critical)
Version:5.1.23-rc OS:Other (See report text)
Assigned to: Sunny Bains Target Version:5.1+
Triage: Triaged: D1 (Critical)

[28 Jan 2008 20:07] Joerg Bruehe
Description:
This crash happened in the 5.1.23-rc release build,
when running the test suite on the "embedded" server:

::::::::::::::
main.innodb                    [ fail ]

ERROR: mysqltest returned unexpected code 139, it has probably crashed

Stopping All Servers
::::::::::::::

Some platforms report status 139, others report 138.

List of crashing platforms:
- FreeBSD 6.0, x86 + x86_64
- HP-UX 11.23, IA64
- i5os, PowerPC both 32 and 64 bit
- Linux, PPC
- RedHat 3, x86 + x86_64
- RedHat 3, IA64 (ICC)
- RedHat 4, x86_64
- OS X 10.4, x86 + PPC-32 + PPC-64
- OS X 10.5, x86 + x86_64
- Solaris 9,  Sparc-32 + Sparc-64 + x86
- Solaris 10, Sparc-32 + Sparc-64 + x86 + x86_64

There is only *one* platform on which this test crashes if run on a separate server, that
is SuSE 10 on x86_64,
and this happens only in one configuration, in the "PS" test run.
This does not seem to be related.

How to repeat:
Found while running the test suite.
[4 Feb 2008 9:11] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior on support Solaris machine. Please indicate one of
machines bug is repeatable on. Also please confirm or reject if bug is repeatable every
time when tests run.
[6 Feb 2008 11:21] Sveta Smirnova
Thank you for the report.

Verified as described.

Problem description below.

$cat bug34110.test
--source include/have_innodb.inc

set foreign_key_checks=0;
create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT
CHARSET=latin1;
create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;
rename table t3 to t1;

$./mysql-test-run.pl main.bug34110
Logging: ./mysql-test-run.pl main.bug34110
<....>
mysqltest: At line 6: query 'rename table t3 to t1' failed: 1025: Error on rename of
'./test/t3' to './test/t1' (errno: 150)

Which is correct.

$./mysql-test-run.pl --embedded-server main.bug34110
Logging: ./mysql-test-run.pl --embedded-server main.bug34110
<...>
mysqltest: At line 6: query 'rename table t3 to t1' failed: 1025: Error on rename of
'/PATH/mysql-test/var/master-data/test/t3' to '/PATH/mysql-test/var/master-data/
[6 Feb 2008 14:39] Heikki Tuuri
Can you make a stack trace? The bug is probably something very simple that I can spot once
I have the trace.

Regards,

Heikki
[7 Feb 2008 9:15] Sveta Smirnova
Not, embedded server fails to start with --debug option. Additionally "No stack trace on
core dump" is its knowsn limitation.

But it is easy to repeat: just save my test case as bug34110.test and run
./mysql-test-run.pl --embedded-server main.bug34110