Bug #17114 MySQL crash (mysqld.nt.exe application error)
Submitted: 4 Feb 2006 11:05 Modified: 6 Mar 2006 14:01
Reporter: Stefano Ricci Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.18 OS:Windows (windows xp sp 2)
Assigned to: MySQL Verification Team CPU Architecture:Any

[4 Feb 2006 11:05] Stefano Ricci
Description:
windows XP sp2
mysql 5.0.18

MySQL crashes (from time to time, twice or more time a day) with the following error (sorry if translating the event log from Italian, I missed something)

Error Type: Error
Event Source: Application Error
Event Category: (100)
Event ID: 1000
Date:  03/02/2006
Time:  18.52.22
User:  N/D
Computer: xxx
Description:
Application causing error mysqld-nt.exe, version 0.0.0.0, module mysqld-nt.exe, version 0.0.0.0, error address 0x001fa173.

Data:
0000: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 6d 79 73   ure  mys
0018: 71 6c 64 2d 6e 74 2e 65   qld-nt.e
0020: 78 65 20 30 2e 30 2e 30   xe 0.0.0
0028: 2e 30 20 69 6e 20 6d 79   .0 in my
0030: 73 71 6c 64 2d 6e 74 2e   sqld-nt.
0038: 65 78 65 20 30 2e 30 2e   exe 0.0.
0040: 30 2e 30 20 61 74 20 6f   0.0 at o
0048: 66 66 73 65 74 20 30 30   ffset 00
0050: 31 66 61 31 37 33         1fa173  

this is part of MySQL error log 
060203 18:56:14 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...
060203 18:56:16 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 40069196.
InnoDB: Doing recovery: scanned up to log sequence number 0 40069196
InnoDB: Last MySQL binlog file position 0 0, file name 
060203 18:56:16 InnoDB: Started; log sequence number 0 40069196
060203 18:56:16 [Note] C:\Programmi\MySQL\MySQL Server 5.0\bin\mysqld-nt: ready for connections.
Version: '5.0.18-nt' socket: '' port: 13306 MySQL Community Edition (GPL)

can you give me any hints on this?
the error does not appear on 5.0.15 and 5.0.13

thanks
stefano

How to repeat:
not able to reproduce it on regular basis
the only application accessing MySQL uses ODBC 3.5.1
[4 Feb 2006 11:24] MySQL Verification Team
If your tables were created with version older than 5.0.18, could
you please try to create a dump and then with a 5.0.18 fresh
install restore them. Verify if the issue continues.

Thank you in advance.
[4 Feb 2006 11:27] Stefano Ricci
thank you for your prompt reply, but unfortunely the database was created from scratch on 5.0.18

kind regards
stefano
[4 Feb 2006 11:39] MySQL Verification Team
Thank you for the feedback. Could you please star the server with
the option --log if you are using as standalone or to add the
key log to your my.ini file.
That option will create on your \mysql\data directory a file like
your_computer_name.log and it will be filled with the queries send to
the server, when the server crashes again take a look in the last
queries and try to repeat the crash with those queries. If you able
to identify the query which cause the crash then report it for us
together with a dump of the table(s).

Thanks in advance.
[6 Feb 2006 13:48] Stefano Ricci
Hi Miguel,
could you please tell me how to add the log option to my.ini
sorry fo r the silly question, but I added [log] at the end of the file and then restarted the server, but nothing changes.

thanks
stefano
[6 Feb 2006 14:01] MySQL Verification Team
Hi,

You need to add a line with the word log under the group [mysqld]
like showed below:

Microsoft Windows XP [versão 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

c:\mysql\bin>type c:\my.ini
[mysqld]
log
c:\mysql\bin>mysql -uroot -e"select 1+1;"
+-----+
| 1+1 |
+-----+
|   2 |
+-----+

c:\mysql\bin>type c:\mysql\data\light.log
mysqld-nt, Version: 5.0.18-nt-log. started with:
TCP Port: 0, Named Pipe: (null)
Time                 Id Command    Argument
060206 11:57:14       1 Connect     root@localhost on
                      1 Query       select 1+1
                      1 Quit

In the above sample my computer_name is light and it was
created the file \mysql\data\light.log and you can see was
recorded the query I did with the mysql client.

Thank you in advance.
[7 Mar 2006 0: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".
[27 Mar 2006 0:53] Ian Moore
I had been receiving the same error except the fault address was 0x00027e6e.
MySql ver. 5.0.18, OS: Windows 2003 Server.

I added the log key to my.ini, and logged the following:

C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt, Version: 5.0.18-nt-log. started with:
TCP Port: 3306, Named Pipe: (null)
Time                 Id Command    Argument
060327 11:05:24	      1 Connect     bpxwriter@saturn.osp.local on bpx
		      2 Connect     bpxwriter@saturn.osp.local on bpx
		      1 Init DB     bpx
		      1 Query       INSERT DELAYED INTO OperatorStats(Operator, JobID, OrderDuration) VALUES('alaina', 155435, 60)
		      2 Init DB     bpx
		      2 Query       SELECT RunNumber, Name FROM Drivers WHERE RunStatus <> 3 ORDER BY RunNumber
060327 11:05:34	      1 Init DB     bpx
		      1 Query       SELECT OrderID, PickupRunNumber, OrderType, CustomerAddress, OtherAddress, DATE_FORMAT(OrderTime, '%H:%i %d/%m') AS OrderTS, DATE_FORMAT(ConfirmationTime, '%H:%i') AS ConfirmationTS, PickupTime, OrderStatus, Operator, SMSMessageID, DATE_FORMAT(LastUpdated, '%H:%i') AS OrderLastUpdated, SMSMessages.Status AS SMSStatus FROM Orders LEFT JOIN SMSMessages ON SMSMessageID=SMSMessages.ID WHERE OrderID > 142500 AND (OrderStatus <> 100) AND ((OrderStatus = 1) OR (TO_DAYS(NOW()) = TO_DAYS(LastUpdated))) ORDER BY (OrderStatus=1) DESC, OrderID DESC
		      1 Init DB     bpx
		      1 Query       SELECT RunNumber, Name FROM Drivers WHERE RunStatus <> 3 ORDER BY RunNumber
060327 11:05:39	      2 Init DB     bpx
		      2 Query       SELECT OrderID FROM Orders WHERE SMSMessageID=195859
		      2 Query       UPDATE SMSMessages SET Status=2, ConfirmationTime=DATE_SUB(NOW(), INTERVAL 0 SECOND) WHERE ID=195859 AND Status <> 3
		      2 Init DB     bpx
		      2 Query       INSERT DELAYED INTO JobLog(JobID, LogMessage) VALUES(155435, 'SMS Gateway Reply: Status update (sms id: 195859). Delivery pending, attempt made.')
060327 11:05:54	      5 Connect     bpxwriter@saturn.osp.local on 
		      5 Init DB     bpx
		      5 Query       SELECT OrderID FROM Orders WHERE SMSMessageID=195859
		      5 Query       UPDATE SMSMessages SET Status=3, ConfirmationTime=DATE_SUB(NOW(), INTERVAL 0 SECOND) WHERE ID=195859 AND Status <> 3
		      5 Init DB     bpx
		      5 Query       INSERT DELAYED INTO JobLog(JobID, LogMessage) VALUES(155435, 'SMS Gateway Reply: Status update (sms id: 195859). Delivery confirmed.')
C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt, Version: 5.0.18-nt-log. started with:
TCP Port: 3306, Named Pipe: (null)
Time                 Id Command    Argument

The service always stopped after the second INSERT DELAYED INTO JobLog...

I changed this statement to INSERT INTO JobLog..., and so far the service is continuing to run.