Bug #39848 events_bugs fails sporadically on pushbuild (missing rows in table event_log)
Submitted: 4 Oct 2008 6:02 Modified: 10 Nov 2008 17:41
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Server Severity:S7 (Test Cases)
Version:5.1+ OS:Any
Assigned to: Matthias Leich CPU Architecture:Any
Tags: disabled, events_bugs, pushbuild, sporadic, test failure

[4 Oct 2008 6:02] Sven Sandberg
Description:
events_bugs fails sporadically on pushbuild with a message like this one:

main.events_bugs               [ fail ]

--- C:/cygwin/home/pushbuild/pb1/pb/bzr_mysql-6.0/70/mysql-6.0.8-alpha-pb70/mysql-test/r/events_bugs.result	2008-10-02 16:40:17.000000000 +0300
+++ C:\cygwin\home\pushbuild\pb1\pb\bzr_mysql-6.0\70\mysql-6.0.8-alpha-pb70\mysql-test\r\events_bugs.reject	2008-10-02 18:50:35.859375000 +0300
@@ -610,8 +610,6 @@
 2	ev_sched_1823	2
 3	ev_sched_1823	3
 4	ev_sched_1823	4
-5	ev_sched_1823	5
-6	ev_sched_1823	6
 DROP TABLE event_log;
 SET GLOBAL event_scheduler = OFF;
 SET GLOBAL event_scheduler= ON;

mysqltest: Result content mismatch

Stopping All Servers
Restoring snapshot of databases

How to repeat:
Here's one example:

https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-6.0&order=70 vm-win2003-32-a/ps_stm

Has failed over 100 times, both in 5.1 and 6.0, according to xref: http://tinyurl.com/3kppb5

Suggested fix:
The test inherently contains races since it tests events. If this is the reason for the failures, I suggest increasing the delays. This doesn't cost much now that we have parallel-running mtr.
[15 Oct 2008 18:01] Matthias Leich
IMHO the failing subtest which should reveal
BUG#28924 If I drop the user who is the definer of an
          active event then server cores
has to be reimplemented.
1. The event itself is much more complicated than needed
   for revealing BUG#28924
2. The number of event executions during the "sleep 6"
   within the subtest can vary if the testing box is under
   heavy load ==> We get the current bug
3. The event gets dropped before the corresponding user
   gets dropped
   => The subtest does no more fit to BUG#28924
   If we have a drop user at the correct place than no
   additional drop event is needed.
4. A "disconnect e1" at the end of the subtest is missing.
[16 Oct 2008 19:46] 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/56416

2672 Matthias Leich	2008-10-16
      - Fix for Bug #39848, #39863, #39978, #39569
        Bug#39848 events_bugs fails sporadically on pushbuild
                  (missing rows in table event_log)
           Details: Reimplement the subtest for BUG 28924
                    - check if the number of rows within the table
                      event_log changes but don't print rows
                      because the number varies depending on
                      load on testing box
                    - shift DROP USER befor DROP EVENT
                      = Subtest fits again to old bug
                    - remove no more needed comments + variables
        Bug#39863 events_bugs fails sporadically on pushbuild (extra processes
                  in I_S.PROCESSLIST)
           Details: Abort with appropriate message to the protocol if
                    release_lock() does not has the intended effect. 
                    This cannot prevent problems caused by the probably
                    buggy release_lock() but it reveals if we had a problem
                    in this area.
        Bug#39978 main.events_bugs does not clean up
           Detail: Restore global.event_scheduler = ON at end of test
        Bug#39569 events_bugs fails sporadically on pushbuild (should have
                  failed with errno 1539)
           Detail: Set $wait_timeout to 4 instead of 2
      - Minor improvements of formatting
           Details:
           - Add comments
           - Remove tabs and trailing blanks
           - Add line breaks for better readability
[17 Oct 2008 12:55] 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/56471

2673 Matthias Leich	2008-10-17
      - Fix for Bug #39848, #39863, #39978, #39569
        Bug#39848 events_bugs fails sporadically on pushbuild
                  (missing rows in table event_log)
           Details: Reimplement the subtest for BUG 28924
                    - check if the number of rows within the table
                      event_log changes but don't print rows
                      because the number varies depending on
                      load on testing box
                    - shift DROP USER befor DROP EVENT
                      = Subtest fits again to old bug
                    - remove no more needed comments + variables
        Bug#39863 events_bugs fails sporadically on pushbuild (extra processes
                  in I_S.PROCESSLIST)
           Details: Abort with appropriate message to the protocol if
                    release_lock() does not has the intended effect.
                    This cannot prevent problems caused by the probably
                    buggy release_lock() but it reveals if we had a problem
                    in this area.
        Bug#39978 main.events_bugs does not clean up
           Detail: Restore global.event_scheduler = ON at end of test
        Bug#39569 events_bugs fails sporadically on pushbuild (should have
                  failed with errno 1539)
           Detail: Set $wait_timeout to 4 instead of 2
      - Fix two instabilities (result sets pulled from processlist in subtest
        for bug 16407) which were found during tests with high parallel
        I/O load
      
      - Minor improvements of formatting
        Details:
          - Add comments
          - Remove tabs and trailing blanks
          - Add line breaks for better readability
[27 Oct 2008 21:23] Patrick Crews
Ok to push.
[4 Nov 2008 11:27] 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/57771

2692 Matthias Leich	2008-11-04
      - Fix for Bug #39848, #39863, #39978, #39569
        Bug#39848 events_bugs fails sporadically on pushbuild
                  (missing rows in table event_log)
           Details: Reimplement the subtest for BUG 28924
                    - check if the number of rows within the table
                      event_log changes but don't print rows
                      because the number varies depending on
                      load on testing box
                    - shift DROP USER befor DROP EVENT
                      = Subtest fits again to old bug
                    - remove no more needed comments + variables
        Bug#39863 events_bugs fails sporadically on pushbuild 
                  (extra processes in I_S.PROCESSLIST)
           Details: Abort with appropriate message to the protocol if
                    release_lock() does not has the intended effect.
                    This cannot prevent problems caused by the probably
                    buggy release_lock() but it reveals if we had a
                    problem in this area.
        Bug#39978 main.events_bugs does not clean up
           Detail: Restore global.event_scheduler = ON at end of test
        Bug#39569 events_bugs fails sporadically on pushbuild
                  (should have failed with errno 1539)
           Detail: Set $wait_timeout to 4 instead of 2
      - Fix two instabilities (result sets pulled from processlist in
        subtest for bug 16407) which were found during tests with high
        parallel I/O load
      - Minor improvements of formatting
        Details:
        - Add comments
        - Remove tabs and trailing blanks
        - Add line breaks for better readability
[4 Nov 2008 18:39] 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/57825

2905 Matthias Leich	2008-11-04 [merge]
      Merge 5.1 -> 6.0 of fix for Bug #39848, #39863, #39978, #39569
[5 Nov 2008 12:26] Matthias Leich
Pushed to
5.1-bugteam
6.0-bugteam
[10 Nov 2008 10:53] Bugs System
Pushed into 6.0.8-alpha  (revid:matthias.leich@sun.com-20081104183908-ux6g8n3yj43bd43l) (version source revid:matthias.leich@sun.com-20081104183908-ux6g8n3yj43bd43l) (pib:5)
[10 Nov 2008 11:36] Bugs System
Pushed into 5.1.30  (revid:matthias.leich@sun.com-20081104112721-bqfae4rvb8tatg2e) (version source revid:matthias.leich@sun.com-20081104180256-w9rqsaozf7wby5ab) (pib:5)
[10 Nov 2008 17:41] Paul DuBois
Test case changes. No changelog entry needed.
[19 Jan 2009 11:25] Bugs System
Pushed into 5.1.31-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090119095303-uwwvxiibtr38djii) (version source revid:tomas.ulin@sun.com-20090108105244-8opp3i85jw0uj5ib) (merge vers: 5.1.31-ndb-6.2.17) (pib:6)
[19 Jan 2009 13:03] Bugs System
Pushed into 5.1.31-ndb-6.3.21 (revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (version source revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (merge vers: 5.1.31-ndb-6.3.21) (pib:6)
[19 Jan 2009 16:09] Bugs System
Pushed into 5.1.31-ndb-6.4.1 (revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (version source revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (merge vers: 5.1.31-ndb-6.4.1) (pib:6)