Bug #28799 Using InnoDB, this will stop MySQL from starting at all, Signal 11
Submitted: 31 May 2007 8:31 Modified: 4 Jul 2007 11:04
Reporter: Niklas Saers Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:5.1.14 - 5.1.18 OS:MacOS (10.4.9)
Assigned to: Assigned Account CPU Architecture:Any
Tags: ALTER TABLE, innodb, Signal 11

[31 May 2007 8:31] Niklas Saers
Description:
This bug report is based on a forum thread that no-one seems to be able to answer: http://forums.mysql.com/read.php?20,155460,155460#msg-155460

During an ALTER TABLE ADD CONSTRAINT UNIQUE(url(200)); the MySQLd server crashed. Now it refuses to come up. All my tables are in InnoDB because I need transactions, and the URL table (surprisingly) contains a list of URLs. :-)

When starting MySQLd I get this:

070530 10:23:35 [Warning] Although a path was specified for the --log-slow-queries option, log tables are used. To enable logging to files use the --log-output option.
070530 10:23:35 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
070530 10:23:35 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 55 2298961504.
070530 10:23:35 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
070530 10:23:37 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: Doing recovery: scanned up to log sequence number 55 2304204288
070530 10:23:39 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: Doing recovery: scanned up to log sequence number 55 2305504495
InnoDB: 2 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 196 row operations to undo
InnoDB: Trx id counter is 0 67742464
070530 10:23:42 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 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.

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

070530 10:23:42 mysqld ended

Just for the record, this is MySQL 5.1.14 on OS X, running on a Mac Mini Core Duo

How to repeat:
I upgraded from 5.1.14 to 5.1.18, problem still persists. I created a new database from a mysqldump and did the same query, the databased crashed in the same way. I have the dump, I can make it crash. Only problem is, it's 6Gb, filled with data I'm contractually bound not to share with a third party. Please advice on how I can be of assistance.

Suggested fix:
No known fix
[31 May 2007 9:05] Sveta Smirnova
Thank you for the report.

Please provide output of SHOW CREATE TABLE and SHOW TABLE STATUS for table you alter.
[31 May 2007 17:19] Niklas Saers
mysql> show create table url;
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                                                                |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| url   | CREATE TABLE `url` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `url` varchar(900) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idxUrl` (`url`(100)) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1739182 DEFAULT CHARSET=latin1 | 
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.02 sec)

From table status:
| url                     | InnoDB |      10 | Compact    |   154035 |            133 |    20496384 |                0 |     23691264 |         0 |        1739182 | 2007-05-31 11:02:42 | NULL                | NULL                | latin1_swedish_ci |     NULL |                | InnoDB free: 3304448 kB                                                          | 

Cheers

   Nik
[1 Jun 2007 11:11] Sveta Smirnova
Thank you for the report.

I can not repeat described behaviour with test data.

Please provide your configuration file and indicate how much physical RAM do you have.
[1 Jun 2007 22:40] Niklas Saers
It's a Mac Mini with 2GB RAM. Below follows the config file

[mysql]
max_allowed_packet=512M

[mysqld]
server-id=1
replicate-same-server-id = 0
auto-increment-increment = 10
auto-increment-offset = 1
log-slave-updates

log-bin=/usr/local/mysql/log/bin.log
log-bin-index = /usr/local/mysql/log/log-bin.index
log-error = /usr/local/mysql/log/error.log
binlog-do-db=timeattask
binlog-do-db=mysql

relay-log=/usr/local/mysql/log/datacentre-relay-bin
relay-log-info-file=/usr/local/mysql/log/datacentre-relay-log.info
relay-log-index=/usr/local/mysql/log/datacentre-relay-log.index
relay-log-space-limit=2G

lower_case_table_names=1
slave_compressed_protocol=1
log-warnings
key_buffer_size=512M
slave-net-timeout = 5
master-connect-retry = 5

log-slow-queries
log-queries-not-using-indexes
long_query_time=5

set-variable=innodb_buffer_pool_size=256M
set-variable = sort_buffer_size=2000M
set-variable = read_buffer_size=640M
set-variable = max_allowed_packet=1M
set-variable = max_connections=400
[4 Jun 2007 11:04] Sveta Smirnova
Thank you for the feeback.

I still can not repeat the issue with development sources. Please download current 5.1.19-beta version, try with it and say us result.
[4 Jul 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".