Bug #115994 | InnoDB: system hang because of buf flush wait flushed keeps waiting for ever | ||
---|---|---|---|
Submitted: | 4 Sep 2024 6:19 | Modified: | 4 Sep 2024 7:08 |
Reporter: | Shaohua Wang (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 5.7.41, 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[4 Sep 2024 6:19]
Shaohua Wang
[4 Sep 2024 7:05]
MySQL Verification Team
Hello Shaohua, Thank you for the report and feedback. As a side note, I would like to add here that (and I assume you are also aware) - per Oracle's Lifetime Support policy, as of October 25, 2023, MySQL 5.7 is covered under Oracle Sustaining Support. We don't fix bugs in old versions, don't backport bug fixes. So may I ask you check with the latest MySQL Server 8.0/8.4/9.0 please. Thank you. Regards, Umesh
[4 Sep 2024 7:08]
Shaohua Wang
Considering the page clean logic is almost the same, I suspect 8.0+ is also affected.
[4 Sep 2024 7:41]
MySQL Verification Team
Thank you, Shaohua for the details. regards, Umesh
[25 Nov 2024 14:16]
Marcin Babij
Posted by developer: Hello Shaohua, 8.0 is not using the `que_run_threads` in `row_create_table_for_mysql` anymore. Furthermore the usages of `que` is greatly reduced in 8.0. `log_free_check` requires to not hold any latched that could prevent page flushing from progressing. It would be great if you have callstacks from all page cleaners or all threads provided to peek who may be blocking it. If the `log_free_check` has some work to do, it means the system is not configured efficiently and suffers from redolog files capacity exhaustion. Overall, it seems this particular bug is 5.7-only.
[15 May 10:29]
Arek M
Probably the same issue. Not sure if backtrace is helpful as I run percona fork. (gdb) bt #0 0x00007f8ba9c84455 in clock_nanosleep () from /lib64/libc.so.6 #1 0x00007f8ba9c8fe57 in nanosleep () from /lib64/libc.so.6 #2 0x00000000011bdbdd in os_thread_sleep (tm=tm@entry=10000) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/os/os0thread.cc:311 #3 0x000000000133f392 in buf_flush_wait_flushed (new_oldest=new_oldest@entry=55213605454167) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/buf/buf0flu.cc:2182 #4 0x0000000001185146 in log_preflush_pool_modified_pages (new_oldest=55213605454167) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/log/log0log.cc:1946 #5 log_checkpoint_margin () at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/log/log0log.cc:2403 #6 log_check_margins () at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/log/log0log.cc:2505 #7 0x00000000011e1844 in log_free_check () at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/include/log0log.ic:533 #8 que_run_threads_low (thr=<optimized out>) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/que/que0que.cc:1115 #9 que_run_threads (thr=<optimized out>) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/que/que0que.cc:1161 #10 0x00000000011e2716 in que_eval_sql (info=info@entry=0x0, sql=sql@entry=0x174b320 <row_merge_drop_temp_indexes()::sql> "PROCEDURE DROP_TEMP_INDEXES_PROC () IS\nixid CHAR;\nfound INT;\nDECLARE CURSOR index_cur IS\n SELECT ID FROM SYS_INDEXES\n WHERE SUBSTR(NAME,0,1)='\377'\nFOR UPDATE;\nBEGIN\nfound := 1;\nOPEN index_cur;\nWHILE fou"..., reserve_dict_mutex=reserve_dict_mutex@entry=0, trx=trx@entry=0x7f8ba0901c70) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/que/que0que.cc:1238 #11 0x0000000001214d0f in row_merge_drop_temp_indexes () at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/row/row0merge.cc:3846 #12 0x0000000001195289 in recv_recovery_rollback_active () at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/log/log0recv.cc:4388 #13 0x000000000128bc39 in innobase_start_or_create_for_mysql () at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/srv/srv0start.cc:2784 #14 0x000000000111f3f4 in innobase_init (p=<optimized out>) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/storage/innobase/handler/ha_innodb.cc:4844 #15 0x000000000078af55 in ha_initialize_handlerton (plugin=0x35546b8) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/sql/handler.cc:881 #16 0x0000000000dbc034 in plugin_initialize (plugin=plugin@entry=0x35546b8) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/sql/sql_plugin.cc:1260 #17 0x0000000000dbe337 in plugin_register_builtin_and_init_core_se (argc=argc@entry=0x1d61da0 <remaining_argc>, argv=0x33c42a8) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/sql/sql_plugin.cc:1623 #18 0x0000000000e7affb in init_server_components () at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/sql/mysqld.cc:4379 #19 0x0000000000e7c843 in mysqld_main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/percona-server-5.7.44-52.1.x86_64/sql/mysqld.cc:5174 #20 0x00007f8ba9bcf17c in ?? () from /lib64/libc.so.6 #21 0x00007f8ba9bcf239 in __libc_start_main () from /lib64/libc.so.6 #22 0x000000000077d3c5 in _start () at ../sysdeps/x86_64/start.S:115
[15 May 10:30]
Arek M
thread apply all bt
Attachment: all-threads-backtrace.txt (text/plain), 28.79 KiB.