Bug #102051 mysql.exe silently crashed on WIndows 10 zipped archive
Submitted: 22 Dec 2020 14:56 Modified: 22 Jan 2021 19:26
Reporter: Tsubasa Tanaka (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:8.0.22 OS:Windows (10.0.19042)
Assigned to: CPU Architecture:x86

[22 Dec 2020 14:56] Tsubasa Tanaka
Description:
mysql.exe (command-line client) on Windows 10 crashes when query-resultset is large.
See "How to repeat".

---

This is an event on Windows EventViewer in my environment.

- System 

  - Provider 

   [ Name]  Application Error 
 
  - EventID 1000 

   [ Qualifiers]  0 
 
   Version 0 
 
   Level 2 
 
   Task 100 
 
   Opcode 0 
 
   Keywords 0x80000000000000 
 
  - TimeCreated 

   [ SystemTime]  2020-12-22T14:39:53.4288646Z 
 
   EventRecordID 52065 
 
   Correlation 
 
  - Execution 

   [ ProcessID]  0 
   [ ThreadID]  0 
 
   Channel Application 
 
   Computer MY-COREi5 
 
   Security 
 

- EventData 

   mysql.exe 
   8.0.22.0 
   5f6b5d36 
   mysql.exe 
   8.0.22.0 
   5f6b5d36 
   c0000005 
   0000000000036aa4 
   6378 
   01d6d8704b380eb8 
   C:\Users\yoku0825\Downloads\mysql-8.0.22-winx64\mysql-8.0.22-winx64\bin\mysql.exe 
   C:\Users\yoku0825\Downloads\mysql-8.0.22-winx64\mysql-8.0.22-winx64\bin\mysql.exe 
   a69bb64e-5f75-4575-a84d-7c4d0e398b2f 

How to repeat:
1. Download MySQL from https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.22-winx64.zip

2. Extract it.

3. Initialize datadir & start server

> bin\mysqld.exe --initialize-insecure
> bin\mysqld.exe --console

4. Start mysql.exe on another terminal.

> bin\mysql.exe -uroot

5. Execute statement "SELECT REPEAT('a', 1000000)"

mysql> SELECT REPEAT('a', 1000000);

6. You can see your prompt comes back immediately, without any error message.
[23 Dec 2020 12:37] MySQL Verification Team
stack trace for searching purposes:

000> k
 # Child-SP          RetAddr           Call Site
00 000000cb`70bcf238 00007ff6`9aa16063 mysql!my_uni_utf16le+0x24 [C:\build\sb_1-410081-1600870330.78\mysql-8.0.22\strings\ctype-ucs2.cc @ 1511] 
01 000000cb`70bcf240 00007ff6`9aa162fb mysql!my_mbstou16s+0xb3 [C:\build\sb_1-410081-1600870330.78\mysql-8.0.22\mysys\my_conio.cc @ 170] 
02 000000cb`70bcf290 00007ff6`9a9f8d79 mysql!my_win_console_write+0x1b [C:\build\sb_1-410081-1600870330.78\mysql-8.0.22\mysys\my_conio.cc @ 202] 
03 000000cb`70bcf2d0 00007ff6`9a9f8ede mysql!tee_fputs+0x39 [C:\build\sb_1-410081-1600870330.78\mysql-8.0.22\client\mysql.cc @ 4955] 
04 000000cb`70bcf300 00007ff6`9a9f7303 mysql!tee_puts+0xe [C:\build\sb_1-410081-1600870330.78\mysql-8.0.22\client\mysql.cc @ 4964] 
05 000000cb`70bcf330 00007ff6`9a9f1c30 mysql!print_table_data+0x223 [C:\build\sb_1-410081-1600870330.78\mysql-8.0.22\client\mysql.cc @ 3565] 
06 000000cb`70bcf3e0 00007ff6`9a9f40ee mysql!com_go+0x380 [C:\build\sb_1-410081-1600870330.78\mysql-8.0.22\client\mysql.cc @ 3350] 
07 000000cb`70bcf560 00007ff6`9a9f8215 mysql!add_line+0x4de [C:\build\sb_1-410081-1600870330.78\mysql-8.0.22\client\mysql.cc @ 2552] 
08 000000cb`70bcf660 00007ff6`9a9fa075 mysql!read_and_execute+0x325 [C:\build\sb_1-410081-1600870330.78\mysql-8.0.22\client\mysql.cc @ 2304] 
09 000000cb`70bcf730 00007ff6`9aabf2b0 mysql!main+0x605 [C:\build\sb_1-410081-1600870330.78\mysql-8.0.22\client\mysql.cc @ 1434] 
0a (Inline Function) --------`-------- mysql!invoke_main+0x22 [D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 78] 
0b 000000cb`70bcf820 00007ffc`64387c24 mysql!__scrt_common_main_seh+0x10c [D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 
0c 000000cb`70bcf860 00007ffc`6484d4d1 KERNEL32!BaseThreadInitThunk+0x14
0d 000000cb`70bcf890 00000000`00000000 ntdll!RtlUserThreadStart+0x21
[24 Dec 2020 8:59] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=102062 marked as duplicate of this one.
[22 Jan 2021 19:26] Paul DuBois
Posted by developer:
 
Fixed in 5.7.34, 8.0.24.

On Windows, large result sets could cause the mysql client to exit
unexpectedly.