Bug #108304 mysqld.exe crashes --skip-grant-tables without --shared-memory or --named-pipe
Submitted: 26 Aug 2022 16:16 Modified: 30 Aug 2022 2:15
Reporter: Tsubasa Tanaka (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.20, 8.0.30 OS:Windows (11 Pro(Japanese))
Assigned to: CPU Architecture:x86

[26 Aug 2022 16:16] Tsubasa Tanaka
Description:
When starting mysqld.exe with --skip-grant-tables but without --shared-memory or --named-pipe, mysqld.exe is not able to start.

2022-08-26T16:11:23.137232Z 0 [ERROR] [MY-010131] [Server] TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS
2022-08-26T16:11:23.137332Z 0 [ERROR] [MY-010119] [Server] Aborting

This is expected behavior, but after MY-010119, mysqld.exe crashes by InnoDB Assertion failure.

2022-08-26T16:11:25.018791Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: trx0sys.cc:643:UT_LIST_GET_LEN(trx_sys->mysql_trx_list) == 0 thread 8748

How to repeat:
PS C:\Users\yoku0\Downloads\mysql-8.0.30-winx64\mysql-8.0.30-winx64> bin\mysqld --initialize-insecure
PS C:\Users\yoku0\Downloads\mysql-8.0.30-winx64\mysql-8.0.30-winx64> bin\mysqld --console --skip-grant-tables

2022-08-26T16:11:22.498164Z 0 [System] [MY-010116] [Server] C:\Users\yoku0\Downloads\mysql-8.0.30-winx64\mysql-8.0.30-winx64\bin\mysqld.exe (mysqld 8.0.30) starting as process 20292
2022-08-26T16:11:22.519344Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-26T16:11:22.803359Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-08-26T16:11:22.970565Z 0 [Warning] [MY-011311] [Server] Plugin mysqlx reported: 'All I/O interfaces are disabled, X Protocol won't be accessible'
2022-08-26T16:11:23.124791Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-08-26T16:11:23.125007Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-08-26T16:11:23.137076Z 0 [System] [MY-010931] [Server] C:\Users\yoku0\Downloads\mysql-8.0.30-winx64\mysql-8.0.30-winx64\bin\mysqld.exe: ready for connections. Version: '8.0.30'  socket: ''  port: 0  MySQL Community Server - GPL.
2022-08-26T16:11:23.137232Z 0 [ERROR] [MY-010131] [Server] TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS
2022-08-26T16:11:23.137332Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-26T16:11:25.018791Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: trx0sys.cc:643:UT_LIST_GET_LEN(trx_sys->mysql_trx_list) == 0 thread 8748
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
16:11:25 UTC - mysqld got exception 0x16 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
7ff752740858    mysqld.exe!my_print_stacktrace()[stacktrace.cc:429]
7ff7518de92b    mysqld.exe!print_fatal_signal()[signal_handler.cc:130]
7ff7518de6f3    mysqld.exe!my_server_abort()[signal_handler.cc:241]
7ff7527247fa    mysqld.exe!my_abort()[my_init.cc:263]
7ff75296ca99    mysqld.exe!ut_dbg_assertion_failed()[ut0dbg.cc:99]
7ff752951d0e    mysqld.exe!trx_sys_close()[trx0sys.cc:643]
7ff752903f81    mysqld.exe!srv_shutdown()[srv0start.cc:3240]
7ff75281cb6a    mysqld.exe!innodb_shutdown()[ha_innodb.cc:1603]
7ff7516add5b    mysqld.exe!ha_finalize_handlerton()[handler.cc:726]
7ff7516e9754    mysqld.exe!plugin_deinitialize()[sql_plugin.cc:1121]
7ff7516ef199    mysqld.exe!reap_plugins()[sql_plugin.cc:1190]
7ff7516ede10    mysqld.exe!plugin_shutdown()[sql_plugin.cc:2090]
7ff7516866b9    mysqld.exe!clean_up()[mysqld.cc:2581]
7ff75169aa5a    mysqld.exe!unireg_abort()[mysqld.cc:2444]
7ff75169941f    mysqld.exe!setup_conn_event_handler_threads()[mysqld.cc:3280]
7ff75169d196    mysqld.exe!win_main()[mysqld.cc:8120]
7ff7516954b5    mysqld.exe!mysql_service()[mysqld.cc:8215]
7ff751695adb    mysqld.exe!mysqld_main()[mysqld.cc:8431]
7ff752de4cb4    mysqld.exe!__scrt_common_main_seh()[exe_common.inl:288]
7ffa9f2554e0    KERNEL32.DLL!BaseThreadInitThunk()
7ffa9fee485b    ntdll.dll!RtlUserThreadStart()
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains

Suggested fix:
Do not crash, aborting startup successfully.
[29 Aug 2022 12:12] MySQL Verification Team
Hi Mr. Tanaka,

Thank you for your bug report.

However, it is evident what is wrong with your setup. You must have TCP/IP, --shared-memory, or --named-pipe properly configured on your Windows 11 Pro operating system. From the output that you have sent us, this problem is glaringly obvious.

Simply, Windows do not have localhost sockets, so please, start by re-checking your TCP/IP setup for our server. 

There are millions of users and customers who use 8.0.30 on their Windows operating system and have no problems with TCP/IP setup, or other methods for communicating with the server.

Not a bug.
[29 Aug 2022 12:50] Tsubasa Tanaka
I see.
But what I would like say is,

> This is expected behavior, but after MY-010119, mysqld.exe crashes by InnoDB Assertion failure.

> Do not crash, aborting startup successfully.

Please abort it without crash.
[29 Aug 2022 12:56] MySQL Verification Team
Hi Mr. Tanaka,

We fully understand your request.

However, we have to abort with a crash, in order to get a stacktrace. There are, simply, too many  cases when there is a true bug, where the stacktrace is absolutely necessary in order to understand what has gone wrong. Next, aborting without crash could lead to the undesirable consequences. We have experienced that situation too many times and it is best not to risk any kind of corruption on the system.

Sorry that we can not meet your expectations ......
[29 Aug 2022 14:11] Tsubasa Tanaka
Thank you for your comment.
I understand the reason.

I hope this report would be someone's help(yes, this behavior is a crash but we just mistake a combination of parameters, don't worry)

Regards,
[29 Aug 2022 14:20] MySQL Verification Team
Thank you Mr. Tanaka ........
[30 Aug 2022 2:15] Tsubasa Tanaka
Just information, I found the border is between 8.0.19 and 8.0.20.

C:\Users\yoku0825\Downloads\mysql-8.0.19-winx64\mysql-8.0.19-winx64>bin\mysqld --console --skip-grant-tables
2022-08-30T02:13:13.537027Z 0 [System] [MY-010116] [Server] C:\Users\yoku0825\Downloads\mysql-8.0.19-winx64\mysql-8.0.19-winx64\bin\mysqld.exe (mysqld 8.0.19) starting as process 11792
2022-08-30T02:13:14.070774Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-08-30T02:13:14.086299Z 0 [System] [MY-010931] [Server] C:\Users\yoku0825\Downloads\mysql-8.0.19-winx64\mysql-8.0.19-winx64\bin\mysqld.exe: ready for connections. Version: '8.0.19'  socket: ''  port: 0  MySQL Community Server - GPL.
2022-08-30T02:13:14.086409Z 0 [ERROR] [MY-010131] [Server] TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS
2022-08-30T02:13:14.086814Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-30T02:13:14.271648Z 0 [Warning] [MY-011311] [Server] Plugin mysqlx reported: 'All I/O interfaces are disabled, X Protocol won't be accessible'
2022-08-30T02:13:15.239054Z 0 [System] [MY-010910] [Server] C:\Users\yoku0825\Downloads\mysql-8.0.19-winx64\mysql-8.0.19-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.19)  MySQL Community Server - GPL.

C:\Users\yoku0825\Downloads\mysql-8.0.20-winx64\mysql-8.0.20-winx64>bin\mysqld --console --skip-grant-tables
2022-08-30T02:12:27.176321Z 0 [System] [MY-010116] [Server] C:\Users\yoku0825\Downloads\mysql-8.0.20-winx64\mysql-8.0.20-winx64\bin\mysqld.exe (mysqld 8.0.20) starting as process 12512
2022-08-30T02:12:27.185718Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-30T02:12:27.523916Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-08-30T02:12:27.633868Z 0 [Warning] [MY-011311] [Server] Plugin mysqlx reported: 'All I/O interfaces are disabled, X Protocol won't be accessible'
2022-08-30T02:12:27.759505Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-08-30T02:12:27.776254Z 0 [System] [MY-010931] [Server] C:\Users\yoku0825\Downloads\mysql-8.0.20-winx64\mysql-8.0.20-winx64\bin\mysqld.exe: ready for connections. Version: '8.0.20'  socket: ''  port: 0  MySQL Community Server - GPL.
2022-08-30T02:12:27.776475Z 0 [ERROR] [MY-010131] [Server] TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS
2022-08-30T02:12:27.776585Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-30T02:12:28.792697Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: srv0start.cc:3205:trx_sys_any_active_transactions() == 0 thread 4996
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
02:12:28 UTC - mysqld got exception 0x80000003 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
7ff6745dde82    mysqld.exe!my_sigabrt_handler()[my_thr_init.cc:372]
7ffd1e451881    ucrtbase.dll!raise()
7ffd1e452851    ucrtbase.dll!abort()
7ff6747dfc60    mysqld.exe!ut_dbg_assertion_failed()[ut0dbg.cc:98]
7ff674760cb5    mysqld.exe!srv_pre_dd_shutdown()[srv0start.cc:3205]
7ff673778ad8    mysqld.exe!pre_dd_shutdown_handlerton()[handler.cc:954]
7ff6737958e4    mysqld.exe!plugin_foreach_with_mask()[sql_plugin.cc:2688]
7ff6737955c6    mysqld.exe!plugin_foreach_with_mask()[sql_plugin.cc:2702]
7ff6737748e5    mysqld.exe!ha_pre_dd_shutdown()[handler.cc:960]
7ff67373652e    mysqld.exe!clean_up()[mysqld.cc:2274]
7ff6737477f6    mysqld.exe!unireg_abort()[mysqld.cc:2169]
7ff673746a34    mysqld.exe!setup_conn_event_handler_threads()[mysqld.cc:2995]
7ff673749749    mysqld.exe!win_main()[mysqld.cc:7200]
7ff673743ca5    mysqld.exe!mysql_service()[mysqld.cc:7296]
7ff6737442e1    mysqld.exe!mysqld_main()[mysqld.cc:7512]
7ff674bc3a38    mysqld.exe!__scrt_common_main_seh()[exe_common.inl:288]
7ffd207f7034    KERNEL32.DLL!BaseThreadInitThunk()
7ffd20ce2651    ntdll.dll!RtlUserThreadStart()
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.