Bug #20941 mysqld seg faults during installation: ibdata1 location not correct in my.ini
Submitted: 10 Jul 2006 14:02 Modified: 5 Sep 2007 14:53
Reporter: [ name withheld ] Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.0.22 OS:Windows (XP Pro)
Assigned to: CPU Architecture:Any

[10 Jul 2006 14:02] [ name withheld ]
Description:
When trying to install v5.0.22 on Windows XP Pro (Version 2002, SP2), when the instance configuration wizard tries to start the service, it fails.  The Event log includes an Application entry saying that mysqld received a signal 11 (sigsegv).

How to repeat:
Install v5.0.22 on XP Pro and ask for instance configuration wizard to be run
[10 Jul 2006 14:11] MySQL Verification Team
Thank you for the bug report. Could you please open a DOS prompt screen,
go to \bin install directory and report the error message when issuing
the below command:

mysqld-nt --defaults-file="path_for_my.ini" --standalone --console

please use the actual path for my.ini file in the sample above.

Thanks in advance.
[10 Jul 2006 15:23] [ name withheld ]
Lots of stuff with lots of 00000000000000000000's then:

                                                      ;InnoDB: End of page dump
060710 11:22:18  InnoDB: Page checksum 1575996416, prior-to-4.0.14-form checksum
 1371122432
InnoDB: stored checksum 0, prior-to-4.0.14-form stored checksum 0
InnoDB: Page lsn 0 0, low 4 bytes of lsn at page end 0
InnoDB: Page number (if stored to page already) 0,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
060710 11:22:18 [ERROR] mysqld: Got signal 11. Aborting!

060710 11:22:18 [ERROR] Aborting

060710 11:22:18 [Note] mysqld: Shutdown complete
[14 Jul 2006 20:03] [ name withheld ]
Since this seems to be a real bug and doesn't have a quick work around, is there a way I can DL an older build of v5.0?
[18 Jul 2006 16:52] MySQL Verification Team
Thank you for the feedback. This looks like the same issue of bug
http://bugs.mysql.com/bug.php?id=21079 then I need (if you remember)
the exactly steps you did for the install process for to try to repeat
on my side. Also do you have a firewal enabled? 

Thanks in advance.
[19 Jul 2006 11:50] [ name withheld ]
Installing v5.0.22 on 'Windows XP Pro (Version 2002, SP 2).

1) Run setup.exe

2) On "MySQL Server 5.0 - Setup Wizard" welcome page, click Next.

3) On "Setup Type" accept "Typical" and click Next.

4) On "Ready to Install the Program" click "Install"

5) On "MySQL.com Sign-up", check Skip Sign-up and click Next.

6) On "Wizard completed" click Finish.

In the MySQL Server Instance Configuration Wizard:

1) On the welcome page, click Next.

2) Leave "Detailed Configuration" checked and click Next.

3) Leave "Developer Machine" checked and click Next.

4) Leave "Multifunctional Database" checked and click Next.

5) Leave InnoDB Tablespace Settings alone (put tables on installation path) and click Next.

6) Leave Decision Support (DSS)/OLAP checked and click Next.

7) Leave Enabled TCP/IP Networking check with 3306 as port.  Leave Enable Strict Mode checked.  Click Next.

8) Leave Standard Character Set checked and click Next.

9) Leave Install as Windows Service checked.  Check Include Bin Directory in Windows PATH.  Click Next.

10) Set root password.  Do not check Enable root access from remote machines.  Click Next.

11) Click Execute.

The first two steps work.  Start Service gives "Could not start the service MySQL.Error:0".
[23 Jul 2006 13:37] Valeriy Kravchuk
Please, answer Miguel's question: do you have a firewall enabled? 

Have you got any dialog boxes from OS? Please, try to start service manually, with net start command, and ifnorm about the results.
[24 Jul 2006 11:26] [ name withheld ]
Sorry.  I missed that before.  No, I don't have a firewall enabled.
[24 Jul 2006 11:27] [ name withheld ]
C:\Documents and Settings\ChrisN>net start mysql
The MySQL service is starting.
The MySQL service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

C:\Documents and Settings\ChrisN>
[24 Jul 2006 16:50] Valeriy Kravchuk
Do you have any Service Packs/antoviru software installed on your XP?
[24 Jul 2006 18:18] [ name withheld ]
Norton AntiVirus.  

The System control panel applet says, XP Pro, Version 2002, SP 2.
[25 Jul 2006 13:01] [ name withheld ]
I'm still without a usable installation

1) Is there some workaround for this issue?

2) If not, where can I get an older build of v5.0 that might work?
[25 Jul 2006 16:39] MySQL Verification Team
Thank you for the feedback. Try to start the server from a DOS prompt as
standalone for to see the error messages i.e:

mysqld-nt --defaults-file="path_my.ini" --standalone --console

and let us know them.

thanks in advance.
[25 Jul 2006 16:46] [ name withheld ]
Pages and pages of stuff, mostly 0's then:

                                                      ;InnoDB: End of page dump
060725 12:46:25  InnoDB: Page checksum 1575996416, prior-to-4.0.14-form checksum
 1371122432
InnoDB: stored checksum 0, prior-to-4.0.14-form stored checksum 0
InnoDB: Page lsn 0 0, low 4 bytes of lsn at page end 0
InnoDB: Page number (if stored to page already) 0,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
060725 12:46:25 [ERROR] mysqld-nt: Got signal 11. Aborting!

060725 12:46:25 [ERROR] Aborting

060725 12:46:25 [Note] mysqld-nt: Shutdown complete
[25 Jul 2006 16:48] [ name withheld ]
My.ini for last failuer

Attachment: my.ini (application/octet-stream, text), 9.03 KiB.

[28 Jul 2006 13:12] [ name withheld ]
Perhaps unsurprisingly, this problem is unchanged in v5.0.23.
[1 Aug 2006 15:04] Heikki Tuuri
Hi!

Please post the COMPLETE .err file.

Have you already stored data into your database, or did this occur in the first installation?

The problem apparently is that the ibdata1 file contains garbage. Maybe mysqld crashed or was terminated just after creating the ibdata1 file?

If you DO NOT have valuable information in the database, then this manual section tells how you can delete ibdata1 and ib_logfile1 and ib_logfile2, and try a new installation:
http://dev.mysql.com/doc/refman/5.0/en/error-creating-innodb.html

Regards,

Heikki
[1 Aug 2006 15:47] [ name withheld ]
Where do I find a .err file?

No, I haven't stored any data.  As described in the bug report, I'm trying to install MySQL.

I'll try the procedure in that manual section shortly.  Thank you.
[1 Aug 2006 15:59] Heikki Tuuri
Hi!

The .err file of mysqld is usually in the 'datadir', i.e., the same directory where ibdata1 is created by default. Under the datadir there are the database directories, mysql, test, etc.

--Heikki
[1 Aug 2006 16:43] [ name withheld ]
After following the steps in the referenced manual section, I was able to run the instance configuration wizard and get the service started.  Thank you.  I've lowered the severity from Critical to Serious because there is a workaround.
[1 Aug 2006 17:28] Heikki Tuuri
Changing this to a feature request.

How can we give better error messages in installation?

We CANNOT just delete the ibdata1 file, since there MIGHT be valuable data there. A human being must decide what to do. We should better communicate to him what the problem is.
[1 Aug 2006 17:42] [ name withheld ]
When I DL MySQL to a system that has never seen MySQL before and it fails to install on the very first try, this is not a missing feature, it's a bug.  (When the bug shows up, better messages would be helpful but it's still a bug.)
[2 Aug 2006 7:11] Heikki Tuuri
Hi!

Do you remember how exactly you installed MySQL for the first time?

Does your computer have D: as the system disk, or is there anything else that differs from a standard Windows XP computer?

Regards,

Heikki
[2 Aug 2006 7:23] Heikki Tuuri
Hi!

Ok, the .err file shows what went wrong. mysqld first created the ibdata file to directory C:\MySQL Datafiles\

But at the NEXT STARTUP, mysqld thought that ibdata1 is in another directory (the datadir). Since there was no ibdata1 file there, it created a new file. But then it noticed that ib_logfiles already exist, and concluded that something is wrong. This left the all-zeroed ibdata1 into the the datadir.

I believe you did not edit my.ini? And you never had installed MySQL your into your computer before?

How did you get MySQL to use C:\MySQL Datafiles\?

This clearly looks like a bug in the installation program. If the installer creates the ibdata1 file to C:\MySQL Datafiles\ then it should store the location to my.ini so that mysqld knows where the data file is!

Regards,

Heikki

InnoDB: The first specified data file C:\MySQL Datafiles\ibdata1 did not exist:
InnoDB: a new database to be created!
060707 10:10:15  InnoDB: Setting file C:\MySQL Datafiles\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
060707 10:10:16  InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 10 MB
InnoDB: Database physically writes the file full: wait...
060707 10:10:16  InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 10 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
060707 10:10:18  InnoDB: Started; log sequence number 0 0
060707 10:10:18 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: ready for connections.
Version: '5.0.22-community-nt'  socket: ''  port: 0  MySQL Community Edition (GPL)
060707 10:11:15 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Normal shutdown

060707 10:11:16  InnoDB: Starting shutdown...
060707 10:11:18  InnoDB: Shutdown completed; log sequence number 0 43655
060707 10:11:18 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete

InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
060707 11:05:36  InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Error: all log files must be created at the same time.
InnoDB: All log files must be created also in database creation.
InnoDB: If you want bigger or smaller log files, shut down the
InnoDB: database and make sure there were no errors in shutdown.
InnoDB: Then delete the existing log files. Edit the .cnf file
InnoDB: and start the database again.
[2 Aug 2006 11:16] [ name withheld ]
I followed the process described in one of my earlier comments to this bug.  D: is a CD-ROM.
[2 Aug 2006 11:19] [ name withheld ]
I may very well have selected a non-default location for my data the first time I tried to install MySQL.  (I have a philosophical objection to _data_ under "*Program* Files".)  That could explain how it thought that the files were somewhere else.
[2 Aug 2006 12:55] Heikki Tuuri
Ok, thank you. I hope that installer developers can repeat this. My guess is that in the first installation attempt you chose some non-standard option and that caused ibdata1 to be created in a non-standard location. But then the installer should make my.ini consistent with that location.
[21 Nov 2006 19:12] Donna Molinari
I still haven't seen any resolution to this error. I am getting it on my Windows XP and I do not know why it is happening.
[21 Nov 2006 19:19] Donna Molinari
O.K. Here is what I did to resolve it:
1. I did have an earlier install of MySQL on my machine.
2. I deleted the directory for MySql
3. I removed all references in the registry
4. Re-installed and allowed exceptions for the port in Windows Firewall
5. Installed successfully with no errors.
[5 Sep 2007 14:53] MySQL Verification Team
I wasn't able to repeat this issue with latest released version.