Bug #48367 MTR should react to server dying, rather than to resulting failure of mysqltest
Submitted: 28 Oct 2009 9:17 Modified: 17 Jun 2010 19:27
Reporter: Bjørn Munch Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S7 (Test Cases)
Version:5.1+ OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any
Tags: mtr

[28 Oct 2009 9:17] Bjørn Munch
Description:
If the server suddenly dies during a test, the mysqltest client will fail but reporting that is usually not very useful, or at least not sufficient.

In principle, if MTR discovers that the server dies, it will say so and also extract and print out the server log produced during this test. But for some reason it almost always picks up the died mysqltest instead, even though one should expect this to happen later.

The correct behaviour can be observed by adding a long sleep to a test and then killing the server while mysqltest is executing this sleep.

How to repeat:
Run a test which takes more than a few seconds, then kill mysqld while test is running. Usually, MTR will then report the failure from mysqltest losing connection to the server.
[28 Oct 2009 14:36] 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/88484

2851 Bjorn Munch	2009-10-28
      Bug #48367 MTR should react to server dying, rather than to resulting failure of mysqltest
      For some reason it usually picks up mysqltest
      Wait .1s and then see if a server has died
[28 Oct 2009 14:40] Bjørn Munch
One might ask: what if the timer process terminates after 100ms? Well, if we first implement the new timers in Bug #47978 that will not happen...

With this fix, the mysqltest error will be reported, followed by the serve rlog. If this is tested using kill -9, be aware that there may be no log from the server if it wasn't resterted before current test.
[18 Nov 2009 12:58] Joerg Bruehe
Loks ok to me, and I trust Bjorn's tests.
[18 Nov 2009 15:57] Magnus Blåudd
Go ahead Bjorn, just think that you should put the label on a separate line...
[19 Nov 2009 9:00] 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/90924

2856 Bjorn Munch	2009-11-19
      Bug #48367 MTR should react to server dying, rather than to resulting failure of mysqltest
      For some reason it usually picks up mysqltest
      Wait .1s and then see if a server has died
      Change from first commit: label on separate line
[19 Nov 2009 11:28] Bjørn Munch
Pushed to 5.1-mtr, trunk-mtr, next-mr-mtr, 6.0-codebase-mtr
[20 Feb 2010 9:31] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100220092844-jh07ayojyxn8uh9p) (version source revid:bjorn.munch@sun.com-20091119111729-sazk6qfk8qbwfq0y) (merge vers: 6.0.14-alpha) (pib:16)
[20 Feb 2010 9:34] Bugs System
Pushed into 5.5.3-m2 (revid:alik@sun.com-20100220092622-wvhh1vfy5tjq4mhu) (version source revid:bjorn.munch@sun.com-20091119092424-cpc87ef58xms6o9b) (merge vers: 5.5.0-beta) (pib:16)
[20 Feb 2010 9:36] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100220092730-paoo5t9gcajs5dq8) (version source revid:bjorn.munch@sun.com-20091119092557-tm3cmjhd1jnlj0qc) (pib:16)
[23 Feb 2010 2:09] Paul DuBois
Changes to test suite. No changelog entry needed.

Setting report to Need Merge pending push to 5.1.x, Celosia.
[1 Mar 2010 8:45] Bugs System
Pushed into 5.1.45 (revid:joro@sun.com-20100301083827-xnimmrjg6bh33o1o) (version source revid:azundris@mysql.com-20100222175719-viuh0f3gdsrkgv0r) (merge vers: 5.1.45) (pib:16)
[1 Mar 2010 16:16] Paul DuBois
No changelog entry needed.
[17 Jun 2010 11:50] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:28] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:martin.skold@mysql.com-20100609140708-52rvuyq4q500sxkq) (merge vers: 5.1.45-ndb-6.2.19) (pib:16)
[17 Jun 2010 13:15] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)