| Bug #40621 | Innodb file locking error on startup | ||
|---|---|---|---|
| Submitted: | 10 Nov 2008 21:07 | Modified: | 11 Jan 8:18 |
| Reporter: | matthew schiros | ||
| Status: | Need Feedback | ||
| Category: | Server: InnoDB | Severity: | S1 (Critical) |
| Version: | 5.0.67_1 | OS: | FreeBSD (6.2-RELEASE kernel) |
| Assigned to: | Target Version: | ||
| Tags: | innodb, file lock | ||
[10 Nov 2008 21:07]
matthew schiros
[11 Nov 2008 15:28]
Susanne Ebrecht
Many thanks for writing a bug report. For making a deeper analysis of your problem I need to know exactly how you installed MySQL and how you upgrade from one version to the other.
[11 Nov 2008 15:32]
matthew schiros
Hi, I initially installed, and then upgraded, via the FreeBSD ports system (databases/mysql50-server). When I rolled back to 5.0.51a to avoid the problem, I compiled from source. I haven't tried compiling 5.0.67 from source, because it's a production box, and I don't want to jack customers data on accident. Let me know if there's any further information I can give you. Thanks, Matt
[11 Nov 2008 17:39]
Vasil Dimov
Matthew, somewhat unrelated advice: before upgrading your critical packages (like the database server, web server, mail server etc) you can "pkg_create -b /var/db/pkg/THAT_PACKAGE-1.2.3" which will archive the package in question so that it can be quickly restored if the new version does not work.
[11 Nov 2008 17:53]
Vasil Dimov
This looks related to ``Bug#29155 Innodb "Parallel recovery" is not prevented'' but is probably not because the fix for Bug#29155 went into MySQL 5.0.48.
[13 Jan 2009 14:48]
Tot Sergiu
Has anyone found a solution for this? I have the same problem here: FreeBSD server.com 6.2-RELEASE-p11 FreeBSD 6.2-RELEASE-p11 #0: Tue Mar 25 11:24:22 UTC 2008 root@server:/usr/obj/usr/src/sys/srv i386 mysql 5.0.75
[18 Jan 2009 8:32]
Chad Wood
Anyone? I had to file a support ticket w/ Cpanel to figure out this was a bug with MySQL. This issue was addressed a while ago! Common...do we have a fix for this?
[1 May 2009 16:54]
Mark Stosberg
This also struck us after an a cPanel upgrade. MySQL 5.0.77 FreeBSD 6.2-RELEASE
[1 May 2009 17:17]
Mark Stosberg
To the others affected by this, how have you worked around it?
[1 May 2009 23:47]
Mark Stosberg
We just successfully worked around this today by downgrading MySQL to 5.0.45.
[7 May 2009 23:21]
Mark Stosberg
I now speculate this bug is due to different options for threading libraries that are possible to use on FreeBSD. If this happened to us again, I would try adding lines like this to /etc/libmap.conf: libpthread.so.1 libthr.so.1 libpthread.so.2 libthr.so.2 libkse.so.3 libthr.so.3 Perhaps some adjustments would need to be made here depending on your FreeBSD thread library versions. I say this because whatever happened during that upgrade also caused darcs to start segfaulting, also with a lock related error: Fatal error 'Exceeded maximum lock level' at line 611 in file /usr/src/lib/libpthread/thread/thr_kern.c (errno = 0) And a libmap.conf update like the above fixed the darcs case.
[9 Jun 2009 21:28]
charlie barkin
I got the same bug when upgrading MySQL from 5.0.55 to MySQL 5.0.77 on FreeBSD 7.0-RELEASE i386, such that InnoDB no longer works. The error when starting mysqld is: 090606 22:39:34 mysqld started InnoDB: Unable to lock ./ibdata1, error: 22 090606 22:39:34 InnoDB: Retrying to lock the first data file InnoDB: Unable to lock ./ibdata1, error: 22 InnoDB: Unable to lock ./ibdata1, error: 22 InnoDB: Unable to lock ./ibdata1, error: 22 InnoDB: Unable to lock ./ibdata1, error: 22 090606 22:41:14 InnoDB: Unable to open the first data file InnoDB: Error in opening ./ibdata1 090606 22:41:14 InnoDB: Operating system error number 22 in a file operation. InnoDB: Error number 22 means 'Invalid argument'. upgrading MySQL to 5.0.81 didn't help..
[11 Jun 2009 21:42]
Andrew Pogrebennyk
I got the same bug when upgrading MySQL from 5.0.51a to MySQL 5.0.81 on FreeBSD 6.4-RELEASE i386.
[11 Jun 2009 23:32]
charlie barkin
Hmmm I contacted with Cpanel support, they did something on my server (they asked root access) and mysql started to work with innodb correctly. I don't know that they did exactly. Supporter said that I had wrong user permissions at ibdata1 file. But I'm not so stupid and checked this at first, before contacting support. I saw some commands in the "w" command output while they worked with my server, they did mysql package reinstall and sysctl changes in the kern.argmax.
[27 Jul 2009 8:48]
Sveta Smirnova
Thank you for the feedback. I can not repeat described behavior with upgrade 5.0.51a->5.0.83. Please try in your environment with current version 5.0.84 and if problem still exists describe how you did upgrade.
[20 Aug 2009 16:00]
matthew schiros
Yep, happens in 5.0.51a -> 5.0.84 too. Same issues, same upgrade method (ports).
[20 Aug 2009 23:07]
Sveta Smirnova
Thank you for the feedback. > Same issues, same upgrade method (ports). We don't provide ports, so this can be bug in ports. Please try our binaries located at http://dev.mysql.com/downloads to determine if problem exists in our version.
[21 Sep 2009 1: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".
[7 Jan 23:25]
Olivier Hubert
The same error popped up two days ago on my server after cPanel upgraded MySQL automatically from 5.0.88 to 5.0.89. I am using FREEBSD 7.0 amd64 (RELEASE) and cPanel/WHM cPanel 11.25.0-R42399. Here is an escerpt from my log file: 100105 03:43:07 mysqld started 100105 3:43:08 [Warning] option 'thread_stack': unsigned value 65536 adjusted to 131072 InnoDB: Unable to lock ./ibdata1, error: 22 100105 3:43:08 InnoDB: Retrying to lock the first data file InnoDB: Unable to lock ./ibdata1, error: 22 InnoDB: Unable to lock ./ibdata1, error: 22 ... 100105 3:44:48 InnoDB: Unable to open the first data file InnoDB: Error in opening ./ibdata1 100105 3:44:48 InnoDB: Operating system error number 22 in a file operation. InnoDB: Error number 22 means 'Invalid argument'. InnoDB: Some operating system error numbers are described at InnoDB: http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html InnoDB: Could not open or create data files. InnoDB: If you tried to add new data files, and it failed here, InnoDB: you should now edit innodb_data_file_path in my.cnf back InnoDB: to what it was, and remove the new ibdata files InnoDB created InnoDB: in this failed attempt. InnoDB only wrote those files full of InnoDB: zeros, but did not yet use them in any way. But be careful: do not InnoDB: remove old data files which contain your precious data! 100105 3:44:48 [Note] /usr/local/libexec/mysqld: ready for connections. Version: '5.0.89' socket: '/tmp/mysql.sock' port: 3306 FreeBSD port: mysql-server-5.0.89 As of yet no solution exists for this problem. It might not even be a MySQL issue proper since it might come from cPanel. The cPanel support team has been notified; if they are unable to fix the problem, I will try and reinstall MySQL fresh from the port and if that fails I will try directly from the MySQL binaries.
[11 Jan 8:18]
Sveta Smirnova
All reporters: please try our binaries available at http://dev.mysql.com/downloads/mysql/5.0.html#freebsd We don't support FreeBSD ports and this can be separate problem.
