403Webshell
Server IP : 104.21.38.3  /  Your IP : 108.162.226.10
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/src/mysql-test/suite/binlog/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/binlog/t/binlog_rotate_deadlock.test
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_binlog_format_statement.inc

--echo #
--echo # Bug #30215068	BINLOG ROTATION DEADLOCK WHEN INNODB CONCURRENCY LIMIT SETTED
--echo #

--enable_connect_log
--connect (con1, localhost, root,,)
select  @@innodb_thread_concurrency;

CREATE TABLE t1 (c1 INT) Engine=InnoDB;
CREATE TABLE t2 (c1 INT, c2 int, c3 varchar(200)) Engine=InnoDB;
SET @debug_save= @@SESSION.DEBUG;
SET SESSION DEBUG = '+d,force_rotate';
SET DEBUG_SYNC = 'stop_binlog_rotation_after_acquiring_lock_log SIGNAL rotate_stopped WAIT_FOR proceed_rotate';
--send INSERT INTO t1 VALUES (1);

# Since innodb_thread_concurrency=1, Send txn from  a different connection

--connect (con2, localhost, root,,)
SET DEBUG_SYNC= 'now WAIT_FOR rotate_stopped';
--SEND UPDATE t2 SET C2=1 WHERE C1 = 1;

--connect (con3, localhost, root,,)
# Verify that con1 is waiting in stop_binlog_rotation_after_acquiring_lock_log sync point and con 2 is waiting for con1 to commit
--let $wait_condition=SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State = 'debug sync point: stop_binlog_rotation_after_acquiring_lock_log' and info = 'INSERT INTO t1 VALUES (1)'
--source include/wait_condition.inc
--let $wait_condition=SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State = 'query end' and info = 'UPDATE t2 SET C2=1 WHERE C1 = 1'
--source include/wait_condition.inc

# Continue rotate thread (con1)
SET DEBUG_SYNC= 'now SIGNAL proceed_rotate';

--connection con1
#without fix con1 will hang because it cannot get innodb concurrency ticket
--reap
SET @@SESSION.DEBUG= @debug_save;

--connection con2
--reap

# Cleanup
connection default;

--disconnect con1
--disconnect con2
--disconnect con3
--disable_connect_log
DROP TABLE t1,t2;

Youez - 2016 - github.com/yon3zu
LinuXploit