Bug #20223 Embedded server crashes (almost all platforms, all tests)
Submitted: 2 Jun 2006 10:27 Modified: 7 Jun 2006 20:25
Reporter: Joerg Bruehe Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S1 (Critical)
Version:5.1.11-beta OS:Unix (almost all)
Assigned to: CPU Architecture:Any

[2 Jun 2006 10:27] Joerg Bruehe
Description:
Build of 5.1.11-beta, based on ChangeSet
  1.2186 06/05/26 17:11:21 elliot@mysql.com +2 -0
  BUG#15868 InnoDB thread thrashing
  Restoring default innodb_thread_concurrency to 8
  This default now matches 5.0

On almost all platforms, "embedded" tests fail completely when accessing any data
(the only ones that pass are "comments", "overflow", and "sysdate_is_now" - which do not access any database or table).
The process crashes with signal 10 (OS X) or 11 (other platforms).

The only platforms where this does _not_ occur seem to be AIX 5.2 (both 32 + 64 bit) and SCO OSR 6.
For these platforms, "NDB" and "PARTITION" are not configured - I do not know whether that is a significant connection or not.
(Sorry, no time in the schedule to try crashing platforms without that configuration.)
An argument against that connection: The crash is also on "osx-tiger-ppc-64bit", for which "NDB" and "PARTITION" are also not configured, so there must be another reason.

There are two very similar symptoms, I give a "diff -u" only:

 alter_table                    [ fail ]

 Errors are (from /PATH/mysqltest-time) :
 YYMMDD HH:MM:SS [Warning] mysql_embedded: unknown variable 'loose-binlog-show-xid=0'

 YYMMDD HH:MM:SS [Warning] mysql_embedded: unknown variable 'loose-binlog-show-xid=0'

+YYMMDD HH:MM:SS [Warning] Setting lower_case_table_names=2 because file system for /PATH/mysql-test/var/master-data/ is case insensitive
 InnoDB: The first specified data file /PATH/mysql-test/var/master-data/ibdata1 did not exist:
 InnoDB: a new database to be created!
 YYMMDD HH:MM:SS  InnoDB: Setting file /PATH/mysql-test/var/master-data/ibdata1 size to 10 MB
 InnoDB: Database physically writes the file full: wait...
 YYMMDD HH:MM:SS  InnoDB: Log file /PATH/mysql-test/var/master-data/ib_logfile0 did not exist: new to be created
 InnoDB: Setting log file /PATH/mysql-test/var/master-data/ib_logfile0 size to 5 MB
 InnoDB: Database physically writes the file full: wait...
 YYMMDD HH:MM:SS  InnoDB: Log file /PATH/mysql-test/var/master-data/ib_logfile1 did not exist: new to be created
 InnoDB: Setting log file /PATH/mysql-test/var/master-data/ib_logfile1 size to 5 MB
 InnoDB: Database physically writes the file full: wait...
 InnoDB: Doublewrite buffer not found: creating new
 InnoDB: Doublewrite buffer created
 InnoDB: Creating foreign key constraint system tables
 InnoDB: Foreign key constraint system tables created
 YYMMDD HH:MM:SS [Note] Recovering after a crash using /PATH/mysql-test/var/log/master-bin
 YYMMDD HH:MM:SS [Note] Starting crash recovery...
 YYMMDD HH:MM:SS [Note] Crash recovery finished.
-mysqltest returned unexpected code 139, it has probably crashed
+mysqltest returned unexpected code 138, it has probably crashed
 (the last lines may be the most important ones)

 Restoring snapshot of databases
 Resuming Tests
 ===---===---===---===---===---===--- BUGDB:
 ===---===---===---===---===---===--- BUILD-ID: 2006060117152719539
 ===---===---===---===---===---===--- OCCURRED:
-bsd60-5.1-community.log   embedded
-bsd60-64-5.1-community.log   embedded
-butch-64bit-5.1-community.log   embedded
-etpglb0-5.1-community.log   embedded
-hammer-glibc23-5.1-community.log   embedded
-intelxeon3-5.1-community.log   embedded
-nocona-icc-glibc23-5.1-community.log   embedded
-pegasos3-glibc23-5.1-community.log   embedded
-production-icc-glibc23-5.1-community.log   embedded
-rhas3-x86-glibc23-5.1-community.log   embedded
-sol10-amd64-a-5.1-community.log   embedded
-sol10-sparc-a-5.1-community.log   embedded
-sol10-x86-5.1-community.log   embedded
-sol9x86-5.1-community.log   embedded
-sunfire100a-64bit-5.1-community.log   embedded
-sunfire100b-5.1-community.log   embedded
-sunfire100c-5.1-community.log   embedded
+osx-imac-x86-5.1-community.log   embedded
+osx-tiger-ppc-5.1-community.log   embedded
+osx-tiger-ppc-64bit-5.1-community.log   embedded
+powermacg5-5.1-community.log   embedded

How to repeat:
Detected by the test suite.
[2 Jun 2006 11:12] Joerg Bruehe
Addendum:
For AIX 5.2 (32 bit), we have a similar symptom (as above) in some tests, but some of them with signal 4 (code 132) and others with 11.
Tests include "ctype_gbk", "ctype_ujis", "ctype_utf8", "index_merge_innodb2", "innodb_cache", "innodb_handler", "innodb_mysql".

There is also another type of embedded crash for AIX 5.2 (32 bit), fewer messages, signal 4 (code 132):

=====
xa                             [ fail ]

Errors are (from /PATH/mysqltest-time) :
YYMMDD HH:MM:SS [Warning] mysql_embedded: unknown variable 'loose-binlog-show-xid=0'

YYMMDD HH:MM:SS [Warning] mysql_embedded: unknown variable 'loose-binlog-show-xid=0'

mysqltest returned unexpected code 132, it has probably crashed
(the last lines may be the most important ones)
=====

SCO OSR 6, if crashing, has the same messages, but signal 11 (code 139).

Tests "archive_gis", "bench_count_distinct", and several others
show the short messages for the platforms where the typical crash is as in the first entry, more messages + signal 11.

So the only platform without this type of crashes seems to be AIX 5.2 (64 bit),
and it has the peculiariry that here InniDB is configured but does not activate at run time
(bug#17612).

So the bug seems to be that "InnoDB" does not work in "embedded".
[2 Jun 2006 13:44] Heikki Tuuri
Joerg,

can you run inside gdb, so that we see the stack trace?

Heikki
[2 Jun 2006 18:33] Joerg Bruehe
Just for the record:
The build that led to this report did _not_ yet include the fix to bug#19650 (see there).
I just started another attempt, that _does_ include that fix, and will see how that goes.
[6 Jun 2006 12:53] Joerg Bruehe
As written in my last entry, I did a new build, this time including the fix for bug#19650:
In this, the general crashes are gone.
Therefore, I close this bug.

There are still some few crashes in "embedded", but they are specific to platform or test, so I will have to report them separately.