Multiple issues with percona_innodb_kill_idle_trx test

Bug #901060 reported by Laurynas Biveinis on 2011-12-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
High
Laurynas Biveinis
5.1
Fix Released
High
Laurynas Biveinis
5.5
Fix Released
High
Laurynas Biveinis

Bug Description

This test

1) Is inherently unstable due to SLEEP 3; and main thread doing the killing. See below for example failure.
2) Is in the wrong suite (main), should be in innodb_plugin in 5.1 and innodb in 5.5.
3) On 5.1, it checks the wrong InnoDB flavour, i.e. it includes have_innodb.inc instead of have_innodb_plugin.inc.
4) The purpose of the duplicated last "SELECT * FROM t1;" is not clear.

http://jenkins.percona.com/job/percona-server-5.1-param/209/BUILD_TYPE=release,Host=centos5-32/testReport/junit/%28root%29/main/percona_innodb_kill_idle_trx/ :

_StringException: Text attachment: traceback
------------
Comment:

Logfile:
CURRENT_TEST: main.percona_innodb_kill_idle_trx
mysqltest: At line 24: query 'SELECT * FROM t1' failed with wrong errno 2013: 'Lost connection to MySQL server during query', instead of 2006...

The result from queries just before the failure was:
< snip >
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction';
VARIABLE_NAME VARIABLE_VALUE
INNODB_KILL_IDLE_TRANSACTION 0
SET GLOBAL innodb_kill_idle_transaction=1;
SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction';
Variable_name Value
innodb_kill_idle_transaction 1
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction';
VARIABLE_NAME VARIABLE_VALUE
INNODB_KILL_IDLE_TRANSACTION 1
BEGIN;
INSERT INTO t1 VALUES (1),(2),(3);
COMMIT;
SELECT * FROM t1;
a
1
2
3
BEGIN;
INSERT INTO t1 VALUES (4),(5),(6);

More results from queries before failure can be found in /home/jenkins/workspace/percona-server-5.1-param/BUILD_TYPE/release/Host/centos5-32/Percona-Server/mysql-test/var/1/log/percona_innodb_kill_idle_trx.log
------------

Might be related to bug 871722.

Related branches

Lixun Peng (P.Linux) (plx) wrote :

Maybe this function can implement in Server-Level, I think InnoDB master thread kill connection thread maybe unsafe.

I think we can implement it like this:

Every query send to server will process in function do_command(),
after call do_command, it will read a package from network and process it,
if no package can received, my_net_read() will block this thread until wait_timeout.
" if ((packet_length= my_net_read(net)) == packet_error) "
so can we add idle transaction judgement in it, if thd->active_transaction() and thd->current_utime() - thd->last_stmt_end_time(add to THD, means the last query end time) >= idle_transaction_timeout , then kill the thread,
this is maybe safe.

Stewart Smith (stewart) on 2012-02-07
Changed in percona-server:
importance: Undecided → High
summary: - Sporadic percona_innodb_kill_idle_trx failure
+ Multiple issues with percona_innodb_kill_idle_trx test
description: updated

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-518

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers