Bug #25211 | events_bugs.test fails on sapsrv1 | ||
---|---|---|---|
Submitted: | 20 Dec 2006 11:36 | Modified: | 26 Jan 2007 10:01 |
Reporter: | Ingo Strüwing | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S2 (Serious) |
Version: | 5.1.15 | OS: | |
Assigned to: | Tomash Brechko | CPU Architecture: | Any |
Tags: | rt_q1_2007 |
[20 Dec 2006 11:36]
Ingo Strüwing
[28 Dec 2006 7:18]
Ingo Strüwing
This happens also on rhas4-ia64 Quote from https://intranet.mysql.com/~knielsen/pb/getlog.pl?dir=mysql-5.1-engines&entry=istruewing@c... events_bugs [ fail ] Errors are (from /dev/shm/var-ps_row-6/log/mysqltest-time) : mysqltest: Result content mismatch (the last lines may be the most important ones) Below are the diffs between actual and expected results: ------------------------------------------------------- *** r/events_bugs.result 2006-12-28 02:41:07.000000000 +0300 --- r/events_bugs.reject 2006-12-28 03:20:19.000000000 +0300 *************** *** 255,261 **** set global event_scheduler=off; select event_name, event_definition, interval_value, interval_field from information_schema.events order by event_name; event_name event_definition interval_value interval_field ! e22830_1 alter event e22830_1 on schedule every (select 8 from dual) hour 8 HOUR e22830_2 alter event e22830_2 on schedule every (select 8 from t1) hour 1 HOUR e22830_3 alter event e22830_3 on schedule every f22830() hour 1 HOUR e22830_4 alter event e22830_4 on schedule every (select f22830() from dual) hour 1 HOUR --- 255,261 ---- set global event_scheduler=off; select event_name, event_definition, interval_value, interval_field from information_schema.events order by event_name; event_name event_definition interval_value interval_field ! e22830_1 alter event e22830_1 on schedule every (select 8 from dual) hour 1 HOUR e22830_2 alter event e22830_2 on schedule every (select 8 from t1) hour 1 HOUR e22830_3 alter event e22830_3 on schedule every f22830() hour 1 HOUR e22830_4 alter event e22830_4 on schedule every (select f22830() from dual) hour 1 HOUR ------------------------------------------------------- Please follow the instructions outlined at http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html to find the reason to this problem and how to report this. Result from queries before failure can be found in /dev/shm/var-ps_row-6/log/events_bugs.log Stopping All Servers
[3 Jan 2007 14:48]
Ingo Strüwing
... and on my local machine (Debian Gnu/Linux/x86 kernel 2.6.16 PREEMPT): events_bugs [ fail ] Errors are (from /home/mydev/mysql-5.1-axmrg/mysql-test/var/log/mysqltest-time) : mysqltest: Result length mismatch (the last lines may be the most important ones) Below are the diffs between actual and expected results: ------------------------------------------------------- *** r/events_bugs.result 2006-11-12 16:15:15.000000000 +0300 --- r/events_bugs.reject 2007-01-03 14:31:41.000000000 +0300 *************** *** 159,165 **** user host db info event_scheduler localhost NULL NULL root localhost events_test select get_lock('ee_16407_5', 60) - root localhost events_test select get_lock('ee_16407_5', 60) select release_lock('ee_16407_5'); release_lock('ee_16407_5') 1 --- 159,164 ---- *************** *** 167,175 **** select /*5*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; user host db info event_scheduler localhost NULL NULL select * from events_smode_test order by ev_name, a; ev_name a - ee_16407_6 2004-02-29 "And here we check one more time before we drop the events" select event_schema, event_name, sql_mode from information_schema.events order by event_schema, event_name; event_schema event_name sql_mode --- 166,178 ---- select /*5*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; user host db info event_scheduler localhost NULL NULL + root localhost events_test CREATE EVENT anonymous ON SCHEDULE EVERY 3337 HOUR DO begin + select get_lock('ee_16407_5', 60) /*ee_16407_6*/; + select release_lock('ee_16407_5'); + call events_test.ee_16407_6_pendant(); + end select * from events_smode_test order by ev_name, a; ev_name a "And here we check one more time before we drop the events" select event_schema, event_name, sql_mode from information_schema.events order by event_schema, event_name; event_schema event_name sql_mode ------------------------------------------------------- Please follow the instructions outlined at
[15 Jan 2007 10:11]
Tomash Brechko
After discussion with Andrey it turned out that this bug is simply an unavoidable race in the test case. Once we create a separate suite for such "unstable" tests it will be moved there.
[16 Jan 2007 11:53]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/18179 ChangeSet@1.2377, 2007-01-16 14:47:03+03:00, kroki@moonlight.home +2 -0 BUG#25211: events_bugs.test fails on sapsrv1 The problem was that the events_bugs test could randomly fail due to unavoidable races in the test case. Since we have a number of tests that have races that are impossible to fix, rather than removing such tests the decision was made to create a separate test suite for "unstable" tests. The tests in this suite may be run with mysql-test-run.pl --suite=unstable Even though the unstable tests may fail randomly, it is still valuable to have and to run them because: - they provide a test case code for corresponding bug fixes, and thus may be used for better understanding of the problem and the fix, and as a base ground if the need arise to revise the fix that is suspected to be incorrect. - occasional test failures may be ignored, but constant failures will likely signify the real problem, and should be investigated. Care should be taken in writing such unstable tests: - if the test can possibly be implemented in a deterministic way, the effort should be taken. The test should be made unstable only if that is unavoidable. - the effort should be taken to minimize the non-determinism. Since most unavoidable races are managed by some sort of delays, such delays should be carefully chosen to provide test passing in most circumstances (especially the test should be made to confidently pass with the real (slow) disk I/O, as opposite to RAM disk I/O). - because the unstable tests are special, and (should be) few in number, the delays may be further increased to some "sure" values if the sporadic failures are too often.
[18 Jan 2007 15:45]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/18346 ChangeSet@1.2403, 2007-01-18 18:39:28+03:00, kroki@moonlight.home +4 -0 BUG#25211: events_bugs.test fails on sapsrv1 The problem was that the events_bugs test could randomly fail due to races in the test case. The solution is to replace fixed sleeps with reliable polling of a certain state to settle.
[19 Jan 2007 12:24]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/18434 ChangeSet@1.2403, 2007-01-19 15:17:39+03:00, kroki@moonlight.home +4 -0 BUG#25211: events_bugs.test fails on sapsrv1 The problem was that the events_bugs test could randomly fail due to races in the test case. The solution is to replace fixed sleeps with reliable polling of a certain state to settle. For that, a new auxiliary script include/wait_condition.inc is used, that allows waiting for a given query to return true.
[19 Jan 2007 15:37]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/18444 ChangeSet@1.2403, 2007-01-19 18:30:38+03:00, kroki@moonlight.home +4 -0 BUG#25211: events_bugs.test fails on sapsrv1 The problem was that the events_bugs test could randomly fail due to races in the test case. The solution is to replace fixed sleeps with reliable polling of a certain state to settle. For that, a new auxiliary script include/wait_condition.inc is used, that allows waiting for a given query to return true.
[19 Jan 2007 15:40]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/18445 ChangeSet@1.2403, 2007-01-19 18:33:48+03:00, kroki@moonlight.home +4 -0 BUG#25211: events_bugs.test fails on sapsrv1 The problem was that the events_bugs test could randomly fail due to races in the test case. The solution is to replace fixed sleeps with reliable polling of a certain state to settle. For that, a new auxiliary script include/wait_condition.inc is used, that allows waiting for a given query to return true.
[19 Jan 2007 17:16]
Tomash Brechko
Queued to 5.1-runtime.
[26 Jan 2007 10:01]
Dmitry Lenev
Fix was pushed into 5.0.36 and 5.1.16. As it concerns test-case only no ChangeLog note is needed.