[MDEV-11775] sys_vars.thread_cache_size_func failed in buildbot with wrong result Created: 2017-01-11  Updated: 2023-11-29  Resolved: 2023-11-29

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.0, 10.1
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-7069 Fix buildbot failures in main server ... Stalled

 Description   

http://buildbot.askmonty.org/buildbot/builders/kvm-deb-yakkety-x86/builds/39/steps/test_4/logs/stdio

sys_vars.thread_cache_size_func          w4 [ fail ]
        Test ended at 2016-10-25 11:59:28
 
CURRENT_TEST: sys_vars.thread_cache_size_func
--- /usr/share/mysql/mysql-test/suite/sys_vars/r/thread_cache_size_func.result	2016-10-25 09:52:02.000000000 -0400
+++ /dev/shm/var/4/log/thread_cache_size_func.reject	2016-10-25 11:59:28.820780019 -0400
@@ -18,7 +18,7 @@
 ** Disconnecting conn1,conn2,conn3,conn4 **
 SHOW STATUS LIKE 'Threads_cached';
 Variable_name	Value
-Threads_cached	3
+Threads_cached	1
 3 Expected
 SET @@GLOBAL.thread_cache_size= 1;
 ** Connecting conn1 using username 'root' **
 
mysqltest: Result content mismatch



 Comments   
Comment by Laurynas Biveinis [ 2017-01-30 ]

This is caused by incorrect testcase sync: the testcase disconnects, waits for the threads disappear from the processlist, then checks the status variable. But a disconnecting thread first removes itself from the processlist, and becomes cached only later, creating a race condition.

A proper fix appears to drop processlist checks and SHOW STATUS, and wait for Threads_cached to become desired value by wait_for_status_var.inc, see https://github.com/percona/percona-server/pull/1337

Comment by Elena Stepanova [ 2017-05-24 ]

Recent occurrence in 10.1:
http://buildbot.askmonty.org/buildbot/builders/kvm-deb-wheezy-x86/builds/4633/steps/mtr/logs/stdio

sys_vars.thread_cache_size_func          w1 [ fail ]
        Test ended at 2017-05-23 05:28:55
 
CURRENT_TEST: sys_vars.thread_cache_size_func
--- /usr/share/mysql/mysql-test/suite/sys_vars/r/thread_cache_size_func.result	2017-05-23 03:48:45.000000000 -0400
+++ /run/shm/var/1/log/thread_cache_size_func.reject	2017-05-23 05:28:55.080905256 -0400
@@ -18,7 +18,7 @@
 ** Disconnecting conn1,conn2,conn3,conn4 **
 SHOW STATUS LIKE 'Threads_cached';
 Variable_name	Value
-Threads_cached	3
+Threads_cached	0
 3 Expected
 SET @@GLOBAL.thread_cache_size= 1;
 ** Connecting conn1 using username 'root' **
 
mysqltest: Result content mismatch

Generated at Thu Feb 08 07:52:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.