Bug #29385 crash if ctrl-c too quick after startup
Submitted: 27 Jun 2007 12:35 Modified: 26 Feb 2008 0:33
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0.44-debug, 5.0.56-debug OS:Windows (xp64)
Assigned to: Assigned Account CPU Architecture:Any

[27 Jun 2007 12:35] Shane Bester
Description:
After starting mysqld-debug.exe and hitting ctrl-c soon afterwards (before startup has completed), a crash can occur:

mysqld-debug.exe!memcpy
mysqld-debug.exe!date_time_format_copy
mysqld-debug.exe!THD::init
mysqld-debug.exe!THD::THD
mysqld-debug.exe!mysql_rm_tmp_tables
mysqld-debug.exe!win_main
mysqld-debug.exe!mysql_service
mysqld-debug.exe!main
mysqld-debug.exe!__tmainCRTStartup
mysqld-debug.exe!mainCRTStartup
kernel32.dll!BaseProcessInitPostImport

It appears that variables.time_format is not yet initialized or contains invalid length, causing memcpy to access invalid memory.

How to repeat:
mysqld-debug --console --skip-grant-tables --skip-name-resolve --innodb_buffer_pool_size=2G

before it's started completely, hit ctrl-c

crash may happen after this error is printed:

070627 14:24:43 [ERROR] mysqld-debug: Got signal 2. Aborting!

Suggested fix:
.
[27 Jun 2007 12:36] MySQL Verification Team
full stack trace and some debugger outputs

Attachment: bug29385_info.txt (text/plain), 1.58 KiB.

[27 Jun 2007 12:46] MySQL Verification Team
might get this stack trace too:

mysqld-debug.exe!my_tmpdir
mysqld-debug.exe!innobase_mysql_tmpfile
mysqld-debug.exe!os_file_create_tmpfile
mysqld-debug.exe!dict_init
mysqld-debug.exe!dict_boot
mysqld-debug.exe!innobase_start_or_create_for_mysql
mysqld-debug.exe!innobase_init
mysqld-debug.exe!ha_init
mysqld-debug.exe!init_server_components
mysqld-debug.exe!win_main
mysqld-debug.exe!mysql_service
mysqld-debug.exe!main
mysqld-debug.exe!__tmainCRTStartup
mysqld-debug.exe!mainCRTStartup
[27 Jun 2007 12:46] MySQL Verification Team
full stack of the second crash

Attachment: bug29385_stack2_info.txt (text/plain), 1.43 KiB.

[26 Nov 2007 16:16] MySQL Verification Team
I used this command line: mysqld-debug --console --skip-grant-tables --skip-name-resolve --innodb_buffer_pool_size=2G

no my.cnf or my.ini exists.  default datadir from the -noinstall.zip package.

You gotta be fast to do ctrl-c :)  Try a few times at least. do that stack traces give any hint?
[8 Dec 2007 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".
[29 Jan 2008 12:24] MySQL Verification Team
Bug still exists exactly as described in 5.0.56

mysqld-debug.exe!my_tmpdir(st_my_tmpdir * tmpdir=0x0000000001019070)
mysqld-debug.exe!innobase_mysql_tmpfile()Line 727
mysqld-debug.exe!os_file_create_tmpfile()Line 545
mysqld-debug.exe!lock_sys_create(unsigned __int64 n_cells=655360)Line 591
mysqld-debug.exe!innobase_start_or_create_for_mysql()Line 1262
mysqld-debug.exe!innobase_init()  Line 1424
mysqld-debug.exe!ha_init()  Line 481
mysqld-debug.exe!init_server_components()  Line 3288
mysqld-debug.exe!win_main
mysqld-debug.exe!mysql_service
mysqld-debug.exe!main
[26 Feb 2008 0:33] Iggy Galarza
Marking this a duplicate of Bug#31745.