Bug #88265 InnoDB: Assertion failure: ha_innodb.cc:20280:0
Submitted: 28 Oct 2017 0:54 Modified: 30 Oct 2017 3:24
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.3 RC OS:Any
Assigned to: CPU Architecture:Any

[28 Oct 2017 0:54] Roel Van de Paar
Description:
2017-10-28T00:21:18.699205Z 0 [Note] /sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/bin/mysqld: ready for connections. Version: '8.0.3-rc-debug-log'  socket: '/sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/socket.sock'  port: 16654  MySQL Community Server (GPL)
2017-10-28T00:23:30.571942Z 7 [ERROR] InnoDB: Assertion failure: ha_innodb.cc:20280:0
InnoDB: thread 140380487358208
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.
00:23:30 UTC - mysqld got signal 6 ;

Core was generated by `/sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/bin/mysqld --no-defaults --sql_'.
Program terminated with signal 6, Aborted.
#0  0x00007face0baa9b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61	  val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0  0x00007face0baa9b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x000000000369e428 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.cc:291
#2  0x000000000286b8f6 in handle_fatal_signal (sig=6) at /git/mysql-server_dbg/sql/signal_handler.cc:234
#3  <signal handler called>
#4  0x00007facdeec21f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007facdeec38e8 in __GI_abort () at abort.c:90
#6  0x0000000003a8b8f9 in ut_dbg_assertion_failed (expr=0x48561f5 "0", 
    file=0x4858130 "/git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc", line=20280)
    at /git/mysql-server_dbg/storage/innobase/ut/ut0dbg.cc:60
#7  0x0000000003841397 in innodb_buffer_pool_evict_update (thd=0x7fac98419000, var=0x5371000 <mysql_sysvar_buffer_pool_evict>, 
    var_ptr=0x573ffb0 <srv_buffer_pool_evict>, save=0x7fac9842fc60)
    at /git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:20280
#8  0x00000000024f19f6 in sys_var_pluginvar::global_update (this=0x7faccdf310e8, thd=0x7fac98419000, var=0x7fac9842fc40)
    at /git/mysql-server_dbg/sql/sql_plugin_var.cc:440
#9  0x00000000023f6636 in sys_var::update (this=0x7faccdf310e8, thd=0x7fac98419000, var=0x7fac9842fc40)
    at /git/mysql-server_dbg/sql/set_var.cc:254
#10 0x00000000023f8b2b in set_var::update (this=0x7fac9842fc40, thd=0x7fac98419000) at /git/mysql-server_dbg/sql/set_var.cc:1100
#11 0x00000000023f7fe8 in sql_set_variables (thd=0x7fac98419000, var_list=0x7fac9841b4d8, opened=true)
    at /git/mysql-server_dbg/sql/set_var.cc:844
#12 0x00000000024bb2f5 in mysql_execute_command (thd=0x7fac98419000, first_level=true) at /git/mysql-server_dbg/sql/sql_parse.cc:3540
#13 0x00000000024c042b in mysql_parse (thd=0x7fac98419000, parser_state=0x7face11502f0) at /git/mysql-server_dbg/sql/sql_parse.cc:5414
#14 0x00000000024b68e7 in dispatch_command (thd=0x7fac98419000, com_data=0x7face1150b80, command=COM_QUERY)
    at /git/mysql-server_dbg/sql/sql_parse.cc:1708
#15 0x00000000024b53f5 in do_command (thd=0x7fac98419000) at /git/mysql-server_dbg/sql/sql_parse.cc:1291
#16 0x000000000285b2d6 in handle_connection (arg=0x7faccd2e33c0)
    at /git/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:328
#17 0x00000000036ec54d in pfs_spawn_thread (arg=0x7faccd385520) at /git/mysql-server_dbg/storage/perfschema/pfs.cc:2985
#18 0x00007face0ba5e25 in start_thread (arg=0x7face1151700) at pthread_create.c:308
#19 0x00007facdef8534d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
# mysqld options required for replay:  --sql_mode= --innodb-page-cleaner-disabled-debug=1
CREATE DATABASE test;
USE test;
create table t0(id int key)engine=none row_format=compressed;
SET GLOBAL innodb_buffer_pool_evict='uncompressed';  # May take a while
[28 Oct 2017 19:23] Miguel Solorzano
Thank you for the bug report. I couldn't repeat with current source server:

Your MySQL connection id is 8
Server version: 8.0.4-rc-debug-log Source distribution 2017-OCT-28

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

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 8.0 > CREATE DATABASE test;
Query OK, 1 row affected (0.11 sec)

mysql 8.0 > USE test;
Database changed
mysql 8.0 > create table t0(id int key)engine=none row_format=compressed;
Query OK, 0 rows affected, 2 warnings (0.41 sec)

mysql 8.0 > SET GLOBAL innodb_buffer_pool_evict='uncompressed'; 
Query OK, 0 rows affected (0.01 sec)

mysql 8.0 > show variables like "%cleaner%";
+------------------------------------+-------+
| Variable_name                      | Value |
+------------------------------------+-------+
| innodb_page_cleaner_disabled_debug | ON    |
| innodb_page_cleaners               | 1     |
+------------------------------------+-------+
2 rows in set (0.01 sec)

mysql 8.0 >
[30 Oct 2017 3:24] Roel Van de Paar
Thank you Miguel! To make sure all ends are checked - are you able to repeat with 8.0.3 on your system/OS? I checked again on 8.0.3 and definitely crashes there. Thank you for including param check from CLI. Interestingly also is the time it takes to process that last statement (about a minute on a loaded machine).
[30 Oct 2017 10:02] Umesh Shastry
## This seems to be fixed in latest source, couldn't locate internal bug# to confirm which fixed this but its not repeatable on 8.0.4

-- 8.0.4 - debug build - not affected

rm -rf 88262
bin/mysqld-debug --initialize-insecure --basedir=$PWD --datadir=$PWD/88262 -v
bin/mysqld-debug --no-defaults --basedir=$PWD --datadir=$PWD/88262 --core-file --socket=/tmp/mysql_ushastry.sock --port=3306 --log-error=$PWD/88262/log.err --sql_mode= --innodb-page-cleaner-disabled-debug=1 2>&1 &

cmake . -DBUILD_CONFIG=mysql_release -DWITH_DEBUG=ON -DWITH_BOOST=./boost -DDOWNLOAD_BOOST=ON -DENABLE_DOWNLOADS=ON -DCMAKE_INSTALL_PREFIX=/export/umesh/server/binaries/Trunk/bug/8.0.4
make -j16
make install

[umshastr@hod03]/export/umesh/server/binaries/Trunk/bug/8.0.4: bin/mysql -uroot -S /tmp/mysql_ushastry.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 8.0.4-rc-debug-log MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

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.

root@localhost [(none)]> CREATE DATABASE test;
Query OK, 1 row affected (0.00 sec)

root@localhost [(none)]> USE test;
Database changed
root@localhost [test]> create table t0(id int key)engine=none row_format=compressed;
Query OK, 0 rows affected, 2 warnings (0.04 sec)

root@localhost [test]> SET GLOBAL innodb_buffer_pool_evict='uncompressed';  # May take a while
Query OK, 0 rows affected (0.00 sec)

root@localhost [test]>

-- 8.0.3 - binary tarball - debug build

rm -rf 88262
bin/mysqld-debug --initialize-insecure --basedir=$PWD --datadir=$PWD/88262 -v
bin/mysqld-debug --no-defaults --basedir=$PWD --datadir=$PWD/88262 --core-file --socket=/tmp/mysql_ushastry.sock --port=3306 --log-error=$PWD/88262/log.err --sql_mode= --innodb-page-cleaner-disabled-debug=1 2>&1 &

[umshastr@hod03]/export/umesh/server/binaries/Trunk/mysql-8.0.3: bin/mysql -uroot -S /tmp/mysql_ushastry.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 8.0.3-rc-enterprise-commercial-advanced-debug-log MySQL Enterprise Server - Advanced Edition Debug (Commercial)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

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.

root@localhost [(none)]> CREATE DATABASE test;
Query OK, 1 row affected (0.01 sec)

root@localhost [(none)]> USE test;
Database changed
root@localhost [test]> create table t0(id int key)engine=none row_format=compressed;
Query OK, 0 rows affected, 2 warnings (0.03 sec)

root@localhost [test]> SET GLOBAL innodb_buffer_pool_evict='uncompressed';  # May take a while
ERROR 2013 (HY000): Lost connection to MySQL server during query
root@localhost [test]>

#0  0x00007f1998627771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000034fb0bb in my_write_core (sig=6) at ../../mysqlcom-pro-8.0.3-rc/mysys/stacktrace.cc:291
#2  0x00000000026d704a in handle_fatal_signal (sig=6) at ../../mysqlcom-pro-8.0.3-rc/sql/signal_handler.cc:234
#3  <signal handler called>
#4  0x00007f19970215d7 in raise () from /lib64/libc.so.6
#5  0x00007f1997022cc8 in abort () from /lib64/libc.so.6
#6  0x00000000038e97f3 in ut_dbg_assertion_failed (expr=0x48dca7d "0", file=0x48df068 "../../../mysqlcom-pro-8.0.3-rc/storage/innobase/handler/ha_innodb.cc", line=20280)
    at ../../../mysqlcom-pro-8.0.3-rc/storage/innobase/ut/ut0dbg.cc:60
#7  0x000000000369b62e in innodb_buffer_pool_evict_update (thd=0x7f1908000be0, var=0x55c3620 <mysql_sysvar_buffer_pool_evict>, var_ptr=0x5865378 <srv_buffer_pool_evict>,
    save=0x7f1908009e88) at ../../../mysqlcom-pro-8.0.3-rc/storage/innobase/handler/ha_innodb.cc:20280
#8  0x0000000002359c77 in sys_var_pluginvar::global_update (this=0x9515788, thd=0x7f1908000be0, var=0x7f1908009e68)
    at ../../mysqlcom-pro-8.0.3-rc/sql/sql_plugin_var.cc:440
#9  0x000000000225a524 in sys_var::update (this=0x9515788, thd=0x7f1908000be0, var=0x7f1908009e68) at ../../mysqlcom-pro-8.0.3-rc/sql/set_var.cc:254
#10 0x000000000225ca55 in set_var::update (this=0x7f1908009e68, thd=0x7f1908000be0) at ../../mysqlcom-pro-8.0.3-rc/sql/set_var.cc:1100
#11 0x000000000225bf27 in sql_set_variables (thd=0x7f1908000be0, var_list=0x7f19080030e0, opened=true) at ../../mysqlcom-pro-8.0.3-rc/sql/set_var.cc:844
#12 0x00000000023228fa in mysql_execute_command (thd=0x7f1908000be0, first_level=true) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_parse.cc:3540
#13 0x0000000002327c0e in mysql_parse (thd=0x7f1908000be0, parser_state=0x7f198847c420) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_parse.cc:5414
#14 0x000000000231dead in dispatch_command (thd=0x7f1908000be0, com_data=0x7f198847cd10, command=COM_QUERY) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_parse.cc:1708
#15 0x000000000231c9ac in do_command (thd=0x7f1908000be0) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_parse.cc:1291
#16 0x00000000026c69c3 in handle_connection (arg=0x976a760) at ../../mysqlcom-pro-8.0.3-rc/sql/conn_handler/connection_handler_per_thread.cc:328
#17 0x000000000352d230 in pfs_spawn_thread (arg=0x97fd760) at ../../../mysqlcom-pro-8.0.3-rc/storage/perfschema/pfs.cc:2985
#18 0x00007f1998622df5 in start_thread () from /lib64/libpthread.so.0
#19 0x00007f19970e260d in clone () from /lib64/libc.so.6
(gdb)