Bug #90523 [MySQL 8.0 GA Release Build] InnoDB Assertion: (capacity & (capacity - 1)) == 0
Submitted: 20 Apr 6:20 Modified: 30 Apr 18:13
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S1 (Critical)
Version:8.0.11 GA OS:Any
Assigned to: CPU Architecture:Any
Tags: Release Build

[20 Apr 6:20] Roel Van de Paar
Description:
2018-04-20T06:18:37.506541Z 0 [System] [MY-010116] [Server] /sda/mysql-8.0.11-linux-glibc2.12-x86_64/bin/mysqld (mysqld 8.0.11) starting as process 31149
2018-04-20T06:18:37.538525Z 1 [ERROR] [MY-000000] [InnoDB] InnoDB: Assertion failure: ut0link_buf.h:191:(capacity & (capacity - 1)) == 0
InnoDB: thread 139725981611776

(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1  0x00000000019fc317 in my_write_core (sig=sig@entry=6) at ../../mysql-8.0.11/mysys/stacktrace.cc:278
#2  0x0000000000ccc895 in handle_fatal_signal (sig=6) at ../../mysql-8.0.11/sql/signal_handler.cc:249
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#5  0x00007f1490e54801 in __GI_abort () at abort.c:79
#6  0x0000000000ac6ea8 in ut_dbg_assertion_failed (expr=expr@entry=0x27b35a0 "(capacity & (capacity - 1)) == 0", 
    file=file@entry=0x27b2660 "../../../mysql-8.0.11/storage/innobase/include/ut0link_buf.h", line=line@entry=191)
    at ../../../mysql-8.0.11/storage/innobase/ut/ut0dbg.cc:90
#7  0x0000000001be25d0 in Link_buf<unsigned long>::Link_buf (this=0x7f147d7f0ac0, capacity=1023)
    at ../../../mysql-8.0.11/storage/innobase/include/ut0link_buf.h:191
#8  0x0000000001be381e in log_allocate_recent_written (log=...) at ../../../mysql-8.0.11/storage/innobase/log/log0log.cc:1057
#9  log_sys_init (n_files=n_files@entry=2, file_size=<optimized out>, space_id=space_id@entry=4294967280)
    at ../../../mysql-8.0.11/storage/innobase/log/log0log.cc:534
#10 0x0000000001cc71b6 in srv_start (create_new_db=create_new_db@entry=false, scan_directories="./;./;./")
    at ../../../mysql-8.0.11/storage/innobase/srv/srv0start.cc:2032
#11 0x0000000001b6fd25 in innobase_init_files (tablespaces=0x7f147d7fd6e0, dict_init_mode=<optimized out>)
    at ../../../mysql-8.0.11/storage/innobase/handler/ha_innodb.cc:4413
#12 innobase_ddse_dict_init (dict_init_mode=<optimized out>, version=<optimized out>, tables=0x7f147d7fd6c0, 
    tablespaces=0x7f147d7fd6e0) at ../../../mysql-8.0.11/storage/innobase/handler/ha_innodb.cc:10823
#13 0x000000000199cc97 in dd::bootstrap::DDSE_dict_init (thd=<optimized out>, dict_init_mode=DICT_INIT_CHECK_FILES, version=80011)
    at ../../mysql-8.0.11/sql/dd/impl/bootstrapper.cc:2079
#14 0x0000000001994c76 in dd::upgrade_57::do_pre_checks_and_initialize_dd (thd=0x7f147eb6c000)
    at ../../mysql-8.0.11/sql/dd/upgrade/upgrade.cc:891
#15 0x0000000000d70f06 in bootstrap::handle_bootstrap (arg=arg@entry=0x7f147eb6c000) at ../../mysql-8.0.11/sql/bootstrap.cc:346
#16 0x0000000001aa5f5f in pfs_spawn_thread (arg=0x7f14857fc520) at ../../../mysql-8.0.11/storage/perfschema/pfs.cc:2814
#17 0x00007f1492bf66db in start_thread (arg=0x7f147d7ff700) at pthread_create.c:463
#18 0x00007f1490f3588f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

How to repeat:
Start mysqld with --innodb-log-recent-written-size=1023
[20 Apr 6:21] Roel Van de Paar
Potentially related to bug 90522
[20 Apr 6:34] Umesh Shastry
Hello Roel,

Thank you for the report and feedback.

Thanks,
Umesh
[20 Apr 10:15] Pawel Olchawa
Thank you for the report.

This is one of new variables, which were not supposed to be exposed. The fix is to hide them in normal builds. During our tests we have not encountered any situation in which it would make sense to change their values.
[20 Apr 22:00] Roel Van de Paar
> This is one of new variables, which were not supposed to be exposed. 
But it is;

$ ./bin/mysqld --no-defaults --help --verbose | grep "innodb-log-recent-written-size"
2018-04-20T21:49:57.995417Z 0 [System] [MY-010116] [Server] /sda/mysql-8.0.11-linux-glibc2.12-x86_64/bin/mysqld (mysqld 8.0.11) starting as process 8141
  --innodb-log-recent-written-size=# 
innodb-log-recent-written-size                               1048576

> The fix is to hide them in normal builds.
Is this a statement or a proposed fix?
If it is a proposed fix, then why was this bug closed?
If it is a statement, then it is not accurate; as per the above (this is release build downloaded from mysql.com) 

> During our tests we have not encountered any situation in which it would make sense to change their values.
I do not see how this is relevant to this report.
[30 Apr 18:13] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 8.0.12 release, and here's the changelog entry:

An assertion failure occurred when starting the server with experimental
system variables that were unintentionally exposed in normal MySQL builds.