Bug #114220 Server crashes after an attempt to set innodb_interpreter_output system variable
Submitted: 5 Mar 2024 8:47 Modified: 14 Jun 2024 5:13
Reporter: Oleksandr Kachan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S6 (Debug Builds)
Version:8.0.36 OS:Any
Assigned to: CPU Architecture:Any

[5 Mar 2024 8:47] Oleksandr Kachan
Description:
Server crashes after an attempt to set innodb_interpreter_output system variable.

How to repeat:
SET @@SESSION.innodb_interpreter='init';
SET @@SESSION.innodb_interpreter_output='';

Suggested fix:
Not sure if there is any sense in allowing innodb_interpreter_output value to be changed. Probably it could be made a readonly variable.
[5 Mar 2024 9:05] MySQL Verification Team
Hello Oleksandr Kachan,

Thank you for the report and feedback.
Could you please confirm whether you are seeing this in release or debug build? Thank you.

-- release build

 bin/mysql -uroot -S /tmp/mysql.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 8.0.36 MySQL Community Server - GPL

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SET @@SESSION.innodb_interpreter='init';
ERROR 1193 (HY000): Unknown system variable 'innodb_interpreter'
mysql> SET @@SESSION.innodb_interpreter_output='';
ERROR 1193 (HY000): Unknown system variable 'innodb_interpreter_output'
mysql>

-- debug build affected

bin/mysql -uroot -S /tmp/mysql.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 8.0.36-debug MySQL Community Server - GPL - Debug

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SET @@SESSION.innodb_interpreter='init';
Query OK, 0 rows affected (0.00 sec)

mysql> SET @@SESSION.innodb_interpreter_output='';
ERROR 2013 (HY000): Lost connection to MySQL server during query
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
ERROR:
Can't connect to the server

bin/mysqld_safe: line 199: 29205 Segmentation fault      (core dumped) env MYSQLD_PARENT_PID=28969 nohup /export/home/tmp/ushastry/mysql-8.0.36/bin/mysqld-debug --no-defaults --basedir=/export/home/tmp/ushastry/mysql-8.0.36 --datadir=/export/home/tmp/ushastry/mysql-8.0.36/114216 --plugin-dir=/export/home/tmp/ushastry/mysql-8.0.36/lib/plugin/debug --core-file --mysqlx-port=33330 --mysqlx-socket=/tmp/mysql_x_ushastry.sock --log-error-verbosity=3 --secure-file-priv= --local-infile=1 --log-error=/export/home/tmp/ushastry/mysql-8.0.36/114216/log.err --pid-file=support-cluster03.pid --socket=/tmp/mysql.sock --port=3306 < /dev/null >> /export/home/tmp/ushastry/mysql-8.0.36/114216/log.err 2>&1
mysql> 2024-03-05T09:01:21.025632Z mysqld_safe Number of processes running now: 0
2024-03-05T09:01:21.028085Z mysqld_safe mysqld restarted

regards,
Umesh
[5 Mar 2024 9:10] Oleksandr Kachan
Hello,

> Could you please confirm whether you are seeing this in release or debug build?
Debug only
[5 Mar 2024 9:11] MySQL Verification Team
Thank you for confirming that this is debug only.

-- release build

 bin/mysql -uroot -S /tmp/mysql.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 8.0.36 MySQL Community Server - GPL

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show variables like 'innodb_interpreter%';
Empty set (0.00 sec)

-- debug build

bin/mysql -uroot -S /tmp/mysql.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 8.0.36-debug MySQL Community Server - GPL - Debug

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show variables like 'innodb_interpreter%';
+---------------------------+-------------------+
| Variable_name             | Value             |
+---------------------------+-------------------+
| innodb_interpreter        | init              |
| innodb_interpreter_output | The Default Value |
+---------------------------+-------------------+
2 rows in set (0.02 sec)
[14 Jun 2024 5:13] MySQL Verification Team
This is fixed internally as part of Bug 36041032 - Setting (debug only) InnoDB system variables causes crash on Debug Server build 

Fixed as of the upcoming MySQL Server 8.0.38, 8.4.1, and 9.0.0 releases, and here's the proposed changelog entry from the documentation team:

In debug builds, setting the innodb_interpreter_output debug variable
would cause the server to unexpectedly halt. This is now a read-only
variable.

Thank you for the bug report.