Bug #94100 setting innodb-log-checkpoint-now with innodb-read-only enabled leads to a crash
Submitted: 28 Jan 14:59 Modified: 29 Jan 5:57
Reporter: Hrvoje Matijakovic Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S6 (Debug Builds)
Version:5.6.43, 5.7.25, 8.0.13, 8.0.14 OS:Linux
Assigned to: CPU Architecture:x86

[28 Jan 14:59] Hrvoje Matijakovic
Description:
gdb:
(gdb) bt
+bt
#0  0x00007f772bd5c9d1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:59
#1  0x0000000000aabb5a in my_write_core (sig=6) at /home/hrvoje/worktable/MS-5.6.43_dbg/mysys/stacktrace.c:424
#2  0x000000000073b7da in handle_fatal_signal (sig=6) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/signal_handler.cc:230
#3  <signal handler called>
#4  0x00007f772a068207 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:55
#5  0x00007f772a0698f8 in __GI_abort () at abort.c:90
#6  0x0000000000da77ef in fil_write (sync=true, space_id=0, zip_size=0, block_offset=0, byte_offset=0, len=16384, buf=0x7f76fc4d0000, message=0x0) at /home/hrvoje/worktable/MS-5.6.43_dbg/storage/innobase/fil/fil0fil.cc:467
#7  0x0000000000daa78d in fil_write_lsn_and_arch_no_to_file (space=0, sum_of_sizes=0, lsn=1625987, arch_log_no=0) at /home/hrvoje/worktable/MS-5.6.43_dbg/storage/innobase/fil/fil0fil.cc:1903
#8  0x0000000000daa884 in fil_write_flushed_lsn_to_data_files (lsn=1625987, arch_log_no=0) at /home/hrvoje/worktable/MS-5.6.43_dbg/storage/innobase/fil/fil0fil.cc:1950
#9  0x0000000000b9ed5d in checkpoint_now_set (thd=0x7f7703375000, var=0x1477240 <mysql_sysvar_log_checkpoint_now>, var_ptr=0x1476d42 <innodb_log_checkpoint_now>, save=0x7f76fc41f1b8) at /home/hrvoje/worktable/MS-5.6.43_dbg/storage/innobase/handler/ha_innodb.cc:15753
#10 0x00000000007fee30 in sys_var_pluginvar::global_update (this=0x7f770f7ed8a0, thd=0x7f7703375000, var=0x7f76fc41f198) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/sql_plugin.cc:3268
#11 0x00000000007392eb in sys_var::update (this=0x7f770f7ed8a0, thd=0x7f7703375000, var=0x7f76fc41f198) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/set_var.cc:193
#12 0x000000000073a3c6 in set_var::update (this=0x7f76fc41f198, thd=0x7f7703375000) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/set_var.cc:670
#13 0x0000000000739fbb in sql_set_variables (thd=0x7f7703375000, var_list=0x7f7703377a68) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/set_var.cc:573
#14 0x00000000007ea7ec in mysql_execute_command (thd=0x7f7703375000) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/sql_parse.cc:3789
#15 0x00000000007f1737 in mysql_parse (thd=0x7f7703375000, rawbuf=0x7f76fc41f010 "SET GLOBAL innodb_log_checkpoint_now=ON", length=39, parser_state=0x7f772c364530) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/sql_parse.cc:6422
#16 0x00000000007e4a0e in dispatch_command (command=COM_QUERY, thd=0x7f7703375000, packet=0x7f76fda84001 "SET GLOBAL innodb_log_checkpoint_now=ON", packet_length=39) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/sql_parse.cc:1399
#17 0x00000000007e3abf in do_command (thd=0x7f7703375000) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/sql_parse.cc:1064
#18 0x00000000007ac2e3 in do_handle_one_connection (thd_arg=0x7f7703327000) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/sql_connect.cc:982
#19 0x00000000007ac06d in handle_one_connection (arg=0x7f7703327000) at /home/hrvoje/worktable/MS-5.6.43_dbg/sql/sql_connect.cc:899
#20 0x0000000000b6f2a1 in pfs_spawn_thread (arg=0x7f77283f5d40) at /home/hrvoje/worktable/MS-5.6.43_dbg/storage/perfschema/pfs.cc:1861
#21 0x00007f772bd57dd5 in start_thread (arg=0x7f772c365700) at pthread_create.c:307
#22 0x00007f772a12fead in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

How to repeat:
SQL:
# mysqld options required for replay:  --innodb-read-only=1
SET GLOBAL innodb_log_checkpoint_now=ON;

Reproduced with debug build of 5.6.43, 5.7.25, and 8.0.13.
[29 Jan 5:57] Umesh Shastry
Hello Hrvoje,

Thank you for the report.
Verified as described with 8.0.14 debug build.

regards,
Umesh