Bug #120933 mysqld crash during shutdown

Submitted: 15 Jul 9:54 Modified: 20 Jul 8:01
Reporter: alex xing (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S6 (Debug Builds)
Version:8.4.7-7 OS:Any
Assigned to: CPU Architecture:Any

[15 Jul 9:54] alex xing
Description:
  If the purge subsystem is stopped through innodb_purge_stop_now and the
  server is then shut down gracefully, the purge coordinator thread hits
  an assertion and mysqld terminates with SIGABRT.

How to repeat:
Create the following MTR test:

  --source include/have_innodb.inc
  --source include/have_debug.inc

  SET GLOBAL innodb_purge_stop_now=ON;
  --source include/restart_mysqld.inc

  Run it with:

  ./mtr innodb.purge_stop_shutdown_crash

  Actual Result
  =============

  mysqld aborts during shutdown:

  [ERROR] [MY-013183] [InnoDB] Assertion failure:
  srv0srv.cc:3520:purge_sys->n_stop == 0

  mysqld got signal 6

  The relevant backtrace contains:

  ut_dbg_assertion_failed()
  srv_purge_coordinator_thread()

Suggested fix:
remove assert
[20 Jul 8:01] Shane Bester
Thanks for the report,  verified on debug build:

mysqld-debug: Version: '26.10.0-debug' (Built on 19 July 2026, 
commit 956282494fbd13f3253c5250f56d284bbe130395 
with gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11.0.2)).
[Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 26.10.0-debug).

Thread 1 "mysqld-debug" received signal SIGALRM, Alarm clock.
[ERROR] [MY-013183] [InnoDB] Assertion failure: srv0srv.cc:3030:purge_sys->n_stop == 0 thread 140027870312000
mysqld got signal 6 ;

Thread 44 "ib_srv_purge" received signal SIGABRT, Aborted.
(gdb) bt
#0  in __pthread_kill_implementation () from /lib64/libc.so.6
#1  in raise () from /lib64/libc.so.6
#2  in abort () from /lib64/libc.so.6
#3  in my_server_abort () at ./sql/signal_handler.cc:467
#4  in my_abort () at ./mysys/my_init.cc:264
#5  in ut_fatal_error () at ./storage/innobase/ut/ut0dbg.cc:108
#6  in ut_dbg_assertion_failed 
#7  in srv_purge_coordinator_suspend 
#8  in srv_purge_coordinator_thread ()

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.057 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.