[MDEV-10330] main.show_explain_ps fails sporadically in buildbot Created: 2016-07-03  Updated: 2016-11-20  Resolved: 2016-11-18

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.2
Fix Version/s: 10.2.3

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-7069 Fix buildbot failures in main server ... Stalled

 Description   

http://buildbot.askmonty.org/buildbot/builders/p8-rhel7-bintar-debug/builds/1503/steps/test/logs/stdio

main.show_explain_ps                     w3 [ fail ]
        Test ended at 2016-07-03 18:36:27
 
CURRENT_TEST: main.show_explain_ps
--- /home/buildbot/maria-slave/power8-vlp03-bintar-debug/build/mysql-test/r/show_explain_ps.result	2016-07-03 15:54:00.100512059 -0400
+++ /home/buildbot/maria-slave/power8-vlp03-bintar-debug/build/mysql-test/r/show_explain_ps.reject	2016-07-03 18:36:27.201444865 -0400
@@ -31,5 +31,4 @@
 from performance_schema.events_waits_history_long 
 where event_name='wait/synch/cond/sql/show_explain';
 event_name
-wait/synch/cond/sql/show_explain
 drop table t0;
 
mysqltest: Result length mismatch



 Comments   
Comment by Sergey Vojtovich [ 2016-11-16 ]

Fails rather reliably on fulltest2.

Comment by Sergei Petrunia [ 2016-11-18 ]

Ok, this seems to be a race condition in the test.

Test setup:

  • The target thread is stopped in doing a busy-wait in dbug_serve_apcs()
  • The SHOW EXPLAIN thread makes an "APC call" in Apc_target::make_apc_call

Looking in the code: in Apc_target::make_apc_call we do

1. Put an APC request into the target's queue
2. while (!processed)

{ wait; }

The "wait/synch/cond/sql/show_explain" wait happens on step#2.

The test can fail when the following happens:

show_explain_thread> Step#1: Put an APC request into the target's queue
target_query_thread> process the request
target_query_thread> request->processed= true
show_explain_thread> Step#2: oh, processed==true, no need to wait.

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