Done
Details
Assignee
Oleksandr KachanOleksandr KachanReporter
George LorchGeorge Lorch(Deactivated)Labels
Time tracking
2h 45m loggedFix versions
Priority
Medium
Details
Details
Assignee
Oleksandr Kachan
Oleksandr KachanReporter
George Lorch
George Lorch(Deactivated)Labels
Time tracking
2h 45m logged
Fix versions
Priority
Smart Checklist
Smart Checklist
Smart Checklist
Created December 7, 2018 at 5:07 PM
Updated March 6, 2024 at 12:36 PM
Resolved December 22, 2020 at 10:05 AM
Adding comment here since I see the issue with 5.7.29 (debug and optimized) and cannot reproduce with 8.0.18, just to have a link with some bug that is open (since https://perconadev.atlassian.net/browse/PS-5027#icft=PS-5027 is closed).
Test case:
DROP DATABASE TEST; CREATE DATABASE test; USE test; create table t1(a int,b int,c int,primary key (a,c)); XA START 'second_xa_high_prio'; set log_slow_verbosity=innodb; SET GLOBAL SLOW_QUERY_LOG=ON; insert INTO t1 values(5.999,"5.9999",5.99999),(9.555,"9.5555",9.55555); INSERT INTO t1()VALUES(1,@b1,0),(2,@b1,0),(3,@b1,0); select user,host,db,info from information_schema.processlist where state='User lock' and info='select get_lock(test_bug16407,60)'; SELECT table_name FROM mysql.innodb_table_stats WHERE table_name='innodb_stats_drop_locked' FOR UPDATE; SELECT 1; SELECT SLEEP(5); SELECT SLEEP(5); SELECT SLEEP(5);
Debug GDB:
Core was generated by `/home/tomislav.plavcic/build/PS220120-percona-server-5.7.29-32-linux-x86_64-deb'. Program terminated with signal SIGSEGV, Segmentation fault. #0 __pthread_kill (threadid=<optimized out>, signo=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 57 ../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory. [Current thread is 1 (Thread 0x7feba1fff700 (LWP 26925))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x0000556e30bd1f2b in my_write_core (sig=11) at /home/tomislav.plavcic/build/percona-server_dbg/mysys/stacktrace.c:261 #2 0x0000556e30920f67 in handle_fatal_signal (sig=11) at /home/tomislav.plavcic/build/percona-server_dbg/sql/signal_handler.cc:230 #3 <signal handler called> #4 0x0000556e306a5662 in THD::innodb_slow_log_enabled (this=0x0) at /home/tomislav.plavcic/build/percona-server_dbg/sql/sql_class.h:2257 #5 0x0000556e3075b054 in THD::mark_innodb_used (this=0x0, trx_id=1804) at /home/tomislav.plavcic/build/percona-server_dbg/sql/sql_class.h:2243 #6 0x0000556e3074d295 in thd_report_innodb_stat (thd=0x0, trx_id=1804, type=MYSQL_TRX_STAT_LOCK_WAIT_USECS, value=978003) at /home/tomislav.plavcic/build/percona-server_dbg/sql/sql_class.cc:900 #7 0x0000556e30dd6b6a in trx_stats::stop_lock_wait (this=0x7febb58014e0, trx=...) at /home/tomislav.plavcic/build/percona-server_dbg/storage/innobase/include/trx0trx.h:1517 #8 0x0000556e30dd4b3a in que_thr_end_lock_wait (trx=0x7febb5800fc8) at /home/tomislav.plavcic/build/percona-server_dbg/storage/innobase/que/que0que.cc:232 #9 0x0000556e30d50bb3 in lock_cancel_waiting_and_release (lock=0x7febbabd4018) at /home/tomislav.plavcic/build/percona-server_dbg/storage/innobase/lock/lock0lock.cc:6804 #10 0x0000556e30d5a1c7 in lock_wait_check_and_cancel (slot=0x7febb8bd8290) at /home/tomislav.plavcic/build/percona-server_dbg/storage/innobase/lock/lock0wait.cc:532 #11 0x0000556e30d5a36b in lock_wait_timeout_thread (arg=0x0) at /home/tomislav.plavcic/build/percona-server_dbg/storage/innobase/lock/lock0wait.cc:592 #12 0x00007febc45066db in start_thread (arg=0x7feba1fff700) at pthread_create.c:463 #13 0x00007febc252a88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Optimized GDB:
Core was generated by `/home/tomislav.plavcic/build/PS230120-percona-server-5.7.29-32-linux-x86_64-opt'. Program terminated with signal SIGSEGV, Segmentation fault. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 57 ../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory. [Current thread is 1 (Thread 0x7f77cbfff700 (LWP 27625))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x0000559f43853017 in my_write_core (sig=sig@entry=11) at /home/tomislav.plavcic/build/release/percona-server_opt/mysys/stacktrace.c:261 #2 0x0000559f4367c285 in handle_fatal_signal (sig=11) at /home/tomislav.plavcic/build/release/percona-server_opt/sql/signal_handler.cc:230 #3 <signal handler called> #4 0x0000559f4354d429 in THD::mark_innodb_used (trx_id=1804, this=0x0) at /home/tomislav.plavcic/build/release/percona-server_opt/sql/sql_class.h:2245 #5 thd_report_innodb_stat (thd=0x0, trx_id=1804, type=type@entry=MYSQL_TRX_STAT_LOCK_WAIT_USECS, value=392335) at /home/tomislav.plavcic/build/release/percona-server_opt/sql/sql_class.cc:900 #6 0x0000559f439b6ba2 in trx_stats::stop_lock_wait (this=0x7f77df0011c0, this=0x7f77df0011c0, trx=..., trx=...) at /home/tomislav.plavcic/build/release/percona-server_opt/storage/innobase/include/trx0trx.h:1517 #7 que_thr_end_lock_wait (trx=0x7f77df000d70) at /home/tomislav.plavcic/build/release/percona-server_opt/storage/innobase/que/que0que.cc:232 #8 0x0000559f4394cb30 in lock_cancel_waiting_and_release (lock=0x7f77e3fd4018) at /home/tomislav.plavcic/build/release/percona-server_opt/storage/innobase/lock/lock0lock.cc:6804 #9 0x0000559f43952a93 in lock_wait_check_and_cancel (slot=<optimized out>) at /home/tomislav.plavcic/build/release/percona-server_opt/storage/innobase/lock/lock0wait.cc:532 #10 lock_wait_timeout_thread (arg=<optimized out>) at /home/tomislav.plavcic/build/release/percona-server_opt/storage/innobase/lock/lock0wait.cc:592 #11 0x00007f77edb7f6db in start_thread (arg=0x7f77cbfff700) at pthread_create.c:463 #12 0x00007f77ebba388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95