Bug #16827 | Better InnoDB error message if ibdata files omitted from my.cnf | ||
---|---|---|---|
Submitted: | 27 Jan 2006 5:53 | Modified: | 19 Jun 2010 17:44 |
Reporter: | MICHAEL LOFTIS | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 4.1.11 | OS: | Linux (Debian 3.0 Woody) |
Assigned to: | CPU Architecture: | Any |
[27 Jan 2006 5:53]
MICHAEL LOFTIS
[27 Jan 2006 13:01]
Heikki Tuuri
Michael, the error means serious corruption of the InnoDB tablespace. It is trying to initialize the undo log lists at the server startup, but a pointer points outside of the tablespace. Please post the COMPLETE UNEDITED .err log from the server, both before and after the upgrade. Please explain in detail how did you make the upgrade. I have never before seen this error in an upgrade. Regards, Heikki
[27 Jan 2006 20:38]
MICHAEL LOFTIS
That's it, that's the whole error log. What happened was that for some reason the particular package I was using silently overwrote the my.cnf file. It then didn't have the complete list of data files that it was supposed to use. When it started up it was totally unable to detect this condition and instead of giving an error message that might help one to quickly diagnose the issue, it gave that rather worrying, and unhelpful message instead. I'll be contacting the package maintainers once I figure out why it overwrote the my.cnf file which it should never do in Debian, atleast not w/o leaving a .dpkg-old file which it didn't do, that tells me it's broken. The snippet I gave is *all* that it logs. I can try to go back to before the upgrade but the shutdown was error free and clean, and the issue really is that when an ibdata area was removed accidentally from the configuration, innodb essentially stopped the whole thing from coming up with the given traceback and messages.
[28 Jan 2006 10:04]
Heikki Tuuri
Michael, ok, the problem was that the new my.cnf was unaware of ibdata2 etc. that you had. Hmm... the solution to situations like this would be to keep information of all ibdata files and ib_logfiles in ibdata1. Then InnoDB would detect that my.cnf is wrong. But a problem is that people can edit my.cnf and move ibdata files to different directories, split ibdata files etc., and that will not get reflected in ibdata1! But in this particular case we COULD detect that the combined size of ibdata files that are specified in my.cnf is smaller than the tablespace size that InnoDB has stored internally. That is always a very serious error. I will look if we can easily notice this and print a warning to the .err log. Thank you, Heikki
[6 Feb 2006 17:42]
Heikki Tuuri
Michael, I tested 4.1.16. It does detect if the combined size of ibdata files is smaller than the tablespace size that is stamped in ibdata1. I cannot explain why in your case mysqld did start up. Do you have any theory? Regards, Heikki heikki@127:~/mysql-4.1.16/sql$ ./mysqld InnoDB: Error: tablespace size stored in header is 1920 pages, but InnoDB: the sum of data file sizes is 640 pages InnoDB: Cannot start InnoDB. The tail of the system tablespace is InnoDB: missing. Have you edited innodb_data_file_path in my.cnf in an InnoDB: inappropriate way, removing ibdata files from there? InnoDB: You can set innodb_force_recovery=1 in my.cnf to force InnoDB: a startup if you are trying to recover a badly corrupt database. 060206 19:38:56 [ERROR] Can't init databases 060206 19:38:56 [ERROR] Aborting 060206 19:38:56 [Note] ./mysqld: Shutdown complete
[6 Feb 2006 17:52]
Heikki Tuuri
Michael, ok, I found the explanation. InnoDB does the check of the tablespace size only at the end of its startup. In your case mysqld crashed before that. Hmm... maybe the easiest thing is to change the error message that InnoDB DID print in your case. Assigning this to Osku. He should add: "InnoDB: If you get this error at mysqld startup, please check that your my.cnf\n" "InnoDB: matches the ibdata files that you have in the MySQL server.\n" This should be fixed in 5.0 and 5.1. Thank you, Heikki
[9 Feb 2006 21:23]
MICHAEL LOFTIS
Thanks sorry about not responding immediately, but yes this is exactly what I was hoping for. I/we here probabyl won't get caught by it again, but this will help reduce confustion for others. I have yet to open a debian bug ticket though to fix the root of this cause (dpkg being told by install scripts to blow a way a .cnf file) Thanks!
[5 Apr 2006 19:15]
Elliot Murphy
Fixed in InnoDB snapshot368; fixes are in 5.0.20.
[8 Apr 2006 13:37]
Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html Additional info: Documented bugfix in 5.0.20 changelog. Closed.
[5 May 2010 15:02]
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)
[6 May 2010 1:52]
Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug. Re-closing.
[28 May 2010 6:14]
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:42]
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 7:09]
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)
[29 May 2010 22:33]
Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug. Re-closing.
[17 Jun 2010 12:20]
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 13:07]
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:48]
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)