[MDEV-14597] innodb.innodb_defragment, innodb.innodb_defrag_concurrent, innodb.innodb_defrag_stats failed in buildbot, timeout, can't connect to local MySQL server Created: 2017-12-06  Updated: 2017-12-20  Resolved: 2017-12-20

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.1
Fix Version/s: 10.1.30

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None


 Description   

http://buildbot.askmonty.org/buildbot/builders/kvm-fulltest-big/builds/1393/steps/mtr_nm/logs/stdio

innodb.innodb_defragment 'innodb_plugin' w1 [ fail ]  timeout after 7200 seconds
        Test ended at 2017-12-05 18:52:06
 
Test case timeout after 7200 seconds
 
== /mnt/buildbot/build/mariadb-10.1.30/mysql-test/var/1/log/innodb_defragment.log == 
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARCHAR(256), KEY SECOND(a, b)) ENGINE=INNODB;
optimize table t1;
Table	Op	Msg_type	Msg_text
test.t1	optimize	status	OK
INSERT INTO t1 VALUES (100000, REPEAT('A', 256));
INSERT INTO t1 VALUES (200000, REPEAT('A', 256));
INSERT INTO t1 VALUES (300000, REPEAT('A', 256));
INSERT INTO t1 VALUES (400000, REPEAT('A', 256));
optimize table t1;
Table	Op	Msg_type	Msg_text
test.t1	optimize	status	OK
create procedure defragment()
begin
set @i = 0;
repeat
set @i = @i + 1;
optimize table t1;
until @i = 3 end repeat;
end //
select count(stat_value) from mysql.innodb_index_stats where table_name like '%t1%' and  stat_name  in ('n_pages_freed');
 
 == /mnt/buildbot/build/mariadb-10.1.30/mysql-test/var/1/tmp/analyze-timeout-mysqld.1.err ==
mysqltest: Could not open connection 'default' after 500 attempts: 2002 Can't connect to local MySQL server through socket '/mnt/buildbot/build/mariadb-10.1.30/mysql-test/var/tmp/1/mysqld.1.sock' (111 "Connection refused")
 
 
 - saving '/mnt/buildbot/build/mariadb-10.1.30/mysql-test/var/1/log/innodb.innodb_defragment-innodb_plugin/' to '/mnt/buildbot/build/mariadb-10.1.30/mysql-test/var/log/innodb.innodb_defragment-innodb_plugin/'
worker[1] > Restart  - not started
***Warnings generated in error logs during shutdown after running tests: innodb.innodb_defragment
 
InnoDB: Warning: semaphore wait:
InnoDB: Warning: semaphore wait:

innodb.innodb_defrag_concurrent 'innodb_plugin' w2 [ fail ]  timeout after 7200 seconds
        Test ended at 2017-12-05 18:52:39
 
Test case timeout after 7200 seconds
 
== /mnt/buildbot/build/mariadb-10.1.30/mysql-test/var/2/log/innodb_defrag_concurrent.log == 
SET @@global.innodb_defragment_n_pages = 20;
select count(*) from t1;
count(*)
20000
select count(*) from t1 force index (second);
count(*)
20000
select count(*) from t1 force index (third);
count(*)
20000
select count(*) from t1;
count(*)
15800
select count(*) from t1 force index (second);
count(*)
15800
select count(*) from t1 force index (third);
count(*)
15800
select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and  stat_name  in ('n_pages_freed');
 
 == /mnt/buildbot/build/mariadb-10.1.30/mysql-test/var/2/tmp/analyze-timeout-mysqld.1.err ==
mysqltest: Could not open connection 'default' after 500 attempts: 2002 Can't connect to local MySQL server through socket '/mnt/buildbot/build/mariadb-10.1.30/mysql-test/var/tmp/2/mysqld.1.sock' (111 "Connection refused")

innodb.innodb_defrag_stats 'innodb_plugin' w1 [ fail ]  timeout after 7200 seconds
        Test ended at 2017-12-05 20:52:59
 
Test case timeout after 7200 seconds
 
== /mnt/buildbot/build/mariadb-10.1.30/mysql-test/var/1/log/innodb_defrag_stats.log == 
count(stat_value) > 0
1
select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and  stat_name in ('n_pages_freed');
count(stat_value) > 0
1
select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and  stat_name in ('n_leaf_pages_defrag');
count(stat_value) > 0
1
INSERT INTO t1 (b) SELECT b from t1;
select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and  stat_name in ('n_page_split');
count(stat_value) > 0
1
select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and  stat_name in ('n_pages_freed');
count(stat_value) > 0
1
select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and  stat_name in ('n_leaf_pages_defrag');
count(stat_value) > 0
1
# Table rename should cause stats rename.
rename table t1 to t2;



 Comments   
Comment by Elena Stepanova [ 2017-12-20 ]

It was apparently fixed by the next commit:

commit 447931c6ab69c69c442ba89cf2b9fea664e288f8 63cbb982752eda34c8025c6daea9e4d2389807d0
Author: Marko Mäkelä <marko.makela@mariadb.com>
Date:   Thu Dec 7 08:14:49 2017 +0200
 
    Post-fix for MDEV-14587
    
    dict_stats_process_entry_from_defrag_pool(): Release the mutex

Generated at Thu Feb 08 08:14:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.