Bug #10863 Unrecoverable failure on system reboot
Submitted: 25 May 2005 17:45 Modified: 25 May 2005 18:01
Reporter: Anker Berg-Sonne Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:4.1.11 OS:Windows (Windows XP SP2)
Assigned to: CPU Architecture:Any

[25 May 2005 17:45] Anker Berg-Sonne
Description:
On a reboot MySQL failed to start. When running the server with --console the following was listed. A forced recovery was unable to restore the database which I finally deleted and restored from a backup.

C:\>"C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld-max-nt" --defaults-file=
"C:\Program Files\MySQL\MySQL Server 4.1\my.ini" --console
050516 16:35:30  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Error: trying to add tablespace 48 of name '.\rulesengine\repository_que
ue.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 48 of name '.\mysql\repository_nodestats.ibd' already exists in the tabl
espace
InnoDB: memory cache!
InnoDB: Error: trying to add tablespace 49 of name '.\rulesengine\repository_sch
ema_template.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 49 of name '.\mysql\repository_queries.ibd' already exists in the tables
pace
InnoDB: memory cache!
InnoDB: Error: trying to add tablespace 50 of name '.\rulesengine\repository_ses
sion.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 50 of name '.\mysql\repository_querystats.ibd' already exists in the tab
lespace
InnoDB: memory cache!
InnoDB: Error: trying to add tablespace 51 of name '.\rulesengine\repository_sta
tes.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 51 of name '.\mysql\repository_queue.ibd' already exists in the tablespa
ce
InnoDB: memory cache!
InnoDB: Error: trying to add tablespace 52 of name '.\rulesengine\repository_tab
lesandviews.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 52 of name '.\mysql\repository_schema_template.ibd' already exists in th
e tablespace
InnoDB: memory cache!
InnoDB: Error: trying to add tablespace 53 of name '.\rulesengine\repository_tem
plates.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 53 of name '.\mysql\repository_session.ibd' already exists in the tables
pace
InnoDB: memory cache!
InnoDB: Error: trying to add tablespace 54 of name '.\rulesengine\repository_use
rs.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 54 of name '.\mysql\repository_states.ibd' already exists in the tablesp
ace
InnoDB: memory cache!
InnoDB: Error: trying to add tablespace 56 of name '.\rulesengine\scales_definit
ions_schema.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 56 of name '.\mysql\repository_templates.ibd' already exists in the tabl
espace
InnoDB: memory cache!
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
050516 16:35:31  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 1 3350344859.
InnoDB: Doing recovery: scanned up to log sequence number 1 3350435491
050516 16:35:31  InnoDB: Error: table 'rulesengine/repository_queue'
InnoDB: in InnoDB data dictionary has tablespace id 48,
InnoDB: but tablespace with that id has name .\mysql\repository_nodestats.ibd.
InnoDB: Have you deleted or moved .ibd files?
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html
InnoDB: how to resolve the issue.
050516 16:35:31  InnoDB: Error: table 'rulesengine/repository_schema_template'
InnoDB: in InnoDB data dictionary has tablespace id 49,
InnoDB: but tablespace with that id has name .\mysql\repository_queries.ibd.
InnoDB: Have you deleted or moved .ibd files?
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html
InnoDB: how to resolve the issue.
050516 16:35:31  InnoDB: Error: table 'rulesengine/repository_session'
InnoDB: in InnoDB data dictionary has tablespace id 50,
InnoDB: but tablespace with that id has name .\mysql\repository_querystats.ibd.
InnoDB: Have you deleted or moved .ibd files?
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html
InnoDB: how to resolve the issue.
050516 16:35:31  InnoDB: Error: table 'rulesengine/repository_states'
InnoDB: in InnoDB data dictionary has tablespace id 51,
InnoDB: but tablespace with that id has name .\mysql\repository_queue.ibd.
InnoDB: Have you deleted or moved .ibd files?
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html
InnoDB: how to resolve the issue.
050516 16:35:31  InnoDB: Error: table 'rulesengine/repository_tablesandviews'
InnoDB: in InnoDB data dictionary has tablespace id 52,
InnoDB: but tablespace with that id has name .\mysql\repository_schema_template.
ibd.
InnoDB: Have you deleted or moved .ibd files?
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html
InnoDB: how to resolve the issue.
050516 16:35:31  InnoDB: Error: table 'rulesengine/repository_templates'
InnoDB: in InnoDB data dictionary has tablespace id 53,
InnoDB: but tablespace with that id has name .\mysql\repository_session.ibd.
InnoDB: Have you deleted or moved .ibd files?
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html
InnoDB: how to resolve the issue.
050516 16:35:31  InnoDB: Error: table 'rulesengine/repository_users'
InnoDB: in InnoDB data dictionary has tablespace id 54,
InnoDB: but tablespace with that id has name .\mysql\repository_states.ibd.
InnoDB: Have you deleted or moved .ibd files?
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html
InnoDB: how to resolve the issue.
050516 16:35:31  InnoDB: Error: table 'rulesengine/scales_definitions_schema'
InnoDB: in InnoDB data dictionary has tablespace id 56,
InnoDB: but tablespace with that id has name .\mysql\repository_templates.ibd.
InnoDB: Have you deleted or moved .ibd files?
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html
InnoDB: how to resolve the issue.
050516 16:35:31  InnoDB: Starting an apply batch of log records to the database.
..
InnoDB: Progress in percents: 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 InnoDB: Error: tr
ying to access page number 0 in space 48,
InnoDB: space name .\mysql\repository_nodestats.ibd,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10
Is short 0, info_bits 0, offset 11928, o_offset 6
mismatch index 4294967289, end_seg_len 13
parsed len 3
050516 16:35:31Dump of 300 bytes of log:
InnoDB: Assertion failure in thread 4072 in file C:\cygwin\home\mysqldev\build\m
ysql-4.1.11-build\mysql-4.1.11\innobase\fil\fil0fil.c line 3813
 len 300; hex InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html
InnoDB: about forcing recovery.
2e050516 16:35:31 [ERROR] C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld-max
-nt: Got signal 11. Aborting!

981a323b3b342e32352e3180167ea50000000009000000040000001055fa05010000002b55b2c701
0000003255b2c700347c052857fa0500000000000000001e3502a509000000040000004055fa0501
0000003255b2c7010000003955b2c73034050516 16:35:31 [ERROR] Aborting

7c055857fa05000000000000000029c502a509000000040000007055fa05010000003955b2c70100
00004055b2c7c8387c058857fa0500000000050516 16:35:31 [Note] C:\Program Files\MySQ
L\MySQL Server 4.1\bin\mysqld-max-nt: Shutdown complete

000000002ffd02a50200000003000000a055fa05010000004055b2c7010000005055b2c7c853fa05
5066fa050000000000000000InnoDB: Thread 436 stopped in file C:\cygwin\home\mysqld
ev\build\mysql-4.1.11-build\mysql-4.1.11\innobase\os\os0sync.c line 309
003802000400000006000000d055fa05010000004655b2c7010000005055b2c75853fa05d859fa05
00000000000000003c46e047892000000000000019000000050000000856fa05010000005055b2c7
010000005955b2c72853fa05; asc .  2;;4.25.1  ~Ñ                  U·     +U¦¦    2

How to repeat:
Unable to repeat
[25 May 2005 18:01] Heikki Tuuri
Anker,

my guess is that you have forgotten old .ibd files to the /mysql database directory from an earlier MySQL/InnoDB instance. In a crash recovery, InnoDB scans all database directories and looks at the space id stamped to each .ibd file. Looks like the id's in the /mysql database directory overlap with the id's in another database directory.

InnoDB keeps the global id counter in ibdata1. Still another explanation would be that you have mixed the ibdata1 file, from a backup, for example.

If this is an InnoDB bug, then InnoDB has for some reason forgotten that it had used those id's, and created tables with same id's again. But I do not recall any other bug report that would indicate that.

Note that you would be able to recover the tables if you delete the .ibd files with conflicting id's. When InnoDB scans, it takes the first .ibd file with a given id I, and disregards subsequent .ibd files with the same id I.

Regards,

Heikki