Bug #39859 Crash in mysqltest.c (or in mysqld): RtlGetDaclSecurityDescriptor
Submitted: 4 Oct 2008 13:59 Modified: 30 Jun 2011 15:05
Reporter: Sven Sandberg Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S2 (Serious)
Version:5.1-rpl OS:Windows
Assigned to: CPU Architecture:Any
Tags: 5.1-rpl-green, crash, pushbuild, sporadic, test failure, windows

[4 Oct 2008 13:59] Sven Sandberg
Description:
Pushbuild failure started happening in random tests in all suites during September 2008, always on vm-win2003-64-b, and only in 5.1-rpl:

main.sql_log_off_func                    [ fail ]

CURRENT_TEST: main.sql_log_off_func
mysqltest got exception 0xc0000005
read_command_buf at 00000001401A4350=
conn->name at 00000000005DFA00=
conn->cur_query at 0000000000000000=
Attempting backtrace...
0000000078EFC1D5    ntdll.dll!RtlGetDaclSecurityDescriptor()
0000000078EFC2A8    ntdll.dll!RtlGetDaclSecurityDescriptor()
0000000180027FE7    LIBMYSQLD.dll!unpack_filename()
0000000180044A9F    LIBMYSQLD.dll!unpack_filename()
0000000180322467    LIBMYSQLD.dll!mysql_num_rows()
0000000180322535    LIBMYSQLD.dll!mysql_num_rows()
0000000077D6B69A    kernel32.dll!BaseThreadStart()

 - saving 'e:/var-embedded-102/log/main.sql_log_off_func/' to 'e:/var-embedded-102/log/main.sql_log_off_func/'

Retrying test, attempt(2/3)...

How to repeat:
https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-5.1-rpl&order=61 vm-win2003-64-b/n_mix

9 failures so far according to xref: http://tinyurl.com/3rxs4r
[9 Oct 2008 9:58] Sven Sandberg
Quite strange: this happens both in mysqltest and in mysqld (see xref link above).
[23 Oct 2008 12:26] Sven Sandberg
The xref link above is very slow. Here's a better one, which restricts the search to the time period starting at the first failure: http://tinyurl.com/6mqojc
[20 Jan 2009 21:53] Alfranio Tavares Correia Junior
Something similar happened in other tests. Maybe this helps to track down the problem. 

main.ctype_gb2312                        [ fail ]
        Test ended at 2008-12-06 22:02:47

CURRENT_TEST: main.ctype_gb2312
mysqltest got exception 0xc0000005
read_command_buf at 00000001401A43B0=
conn->name at 00000000005DFA00=
conn->cur_query at 0000000000000000=
Attempting backtrace...
0000000078EFC1D5    ntdll.dll!RtlGetDaclSecurityDescriptor()
0000000078EFC2A8    ntdll.dll!RtlGetDaclSecurityDescriptor()
0000000180028017    LIBMYSQLD.dll!unpack_filename()
0000000180044ADF    LIBMYSQLD.dll!unpack_filename()
0000000180324487    LIBMYSQLD.dll!mysql_debug()
0000000180324555    LIBMYSQLD.dll!mysql_debug()
0000000077D6B69A    kernel32.dll!BaseThreadStart()

 - saving 'e:/var-embedded-102/log/main.ctype_gb2312/' to 'e:/var-embedded-102/log/main.ctype_gb2312/'

Retrying test, attempt(2/3)...

main.ctype_gb2312                        [ fail ]
        Test ended at 2008-12-06 22:02:47

CURRENT_TEST: main.ctype_gb2312
mysqltest got exception 0xc0000005
read_command_buf at 00000001401A43B0=
conn->name at 00000000005DFA00=
conn->cur_query at 0000000000000000=
Attempting backtrace...
0000000078EFC1D5    ntdll.dll!RtlGetDaclSecurityDescriptor()
0000000078EFC2A8    ntdll.dll!RtlGetDaclSecurityDescriptor()
0000000180028017    LIBMYSQLD.dll!unpack_filename()
0000000180044ADF    LIBMYSQLD.dll!unpack_filename()
0000000180324487    LIBMYSQLD.dll!mysql_debug()
0000000180324555    LIBMYSQLD.dll!mysql_debug()
0000000077D6B69A    kernel32.dll!BaseThreadStart()

 - saving 'e:/var-embedded-102/log/main.ctype_gb2312/' to 'e:/var-embedded-102/log/main.ctype_gb2312/'

Retrying test, attempt(2/3)...

-----------------------------------------------------

main.rename                              [ fail ]
        Test ended at 2008-12-06 22:29:33

CURRENT_TEST: main.rename
mysqltest got exception 0xc0000005
read_command_buf at 00000001401A43B0=
conn->name at 00000000005DFA00=
conn->cur_query at 0000000000000000=
Attempting backtrace...
0000000078EFC1D5    ntdll.dll!RtlGetDaclSecurityDescriptor()
0000000078EFC2A8    ntdll.dll!RtlGetDaclSecurityDescriptor()
0000000180028017    LIBMYSQLD.dll!unpack_filename()
0000000180044ADF    LIBMYSQLD.dll!unpack_filename()
0000000180324487    LIBMYSQLD.dll!mysql_debug()
0000000180324555    LIBMYSQLD.dll!mysql_debug()
0000000077D6B69A    kernel32.dll!BaseThreadStart()

 - saving 'e:/var-embedded-102/log/main.rename/' to 'e:/var-embedded-102/log/main.rename/'

Retrying test, attempt(2/3)...

-----------------------------------------------------

https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-5.1-rpl&order=95
[1 Jul 2011 7:25] MySQL Verification Team
For what it's worth, i can confirm seeing this bug often.
Any multi-threaded workload that kills and reconnects threads will die in mysql_fetch_fields().