Bug #45501 Bugs in MTR Shutdown prevents GCOV data from all but first processes.
Submitted: 15 Jun 2009 12:34 Modified: 8 Jul 2009 20:46
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S7 (Test Cases)
Version:mysql-5.1 OS:Any
Assigned to: Jørgen Austvik CPU Architecture:Any

[15 Jun 2009 12:34] Jonathan Miller
Description:
1) No nice shutdown for cluster
2) SafeProcess::shutdown function zaps all remaining processes as soon as the first one has returned

How to repeat:
run MTR with Cluster using GCOV

Suggested fix:
1) nicely shutting down ndbd's so that they get time to write the gcov data to disk.
2) fixes the bug we found in the SafeProcess::shutdown function that zapped all remaining processes as sson as the first one has returned.
3) According to Jörgen's suggestion, multiple the shutdown timeout with number of processes to shutdown. If shutdown timeout is 10 seconds and you have tree process -> max shutdown time 30 seconds.

Would like to push the patch into 5.1-mtr and also MySQL Cluster 6.2 and up so that we can generate gcov data soon.
[22 Jun 2009 12:38] 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/76827

2950 Magnus.Blaudd@Sun.COM	2009-06-22
      Bug#45501: Make MTR shut down NDB processes without killing them.
      
      ) nicely shutting down ndbd's so that they get time to write the gcov data to disk.
      2) fixes the bug we found in the SafeProcess::shutdown function that zapped all remaining processes as sson as the first one has returned.
      3) According to Jorgen's suggestion, multiple the shutdown timeout with number of processes to shutdown. If shutdown timeout is 10 seconds and you have tree process -> max shutdown time 30 seconds. 
      
      Original patch by Magnus Blaaudd.
      modified:
        mysql-test/lib/My/SafeProcess.pm
        mysql-test/mysql-test-run.pl
[22 Jun 2009 12:58] Bjørn Munch
Looks reasonable, just a few minor quibbles:

1. It looks a bit confusing when you apparently use the same variable $timeout for two different things: first total timeout, then remaining timeout. Call the second one $rest-timeout? If I understand correctly what it is.

2. After you change "process" to "processes", the rest of the comment should change to "that have been killed", from "has".

I said they were minor. :-)
[8 Jul 2009 8:13] Jørgen Austvik
Pushed to:
- mysql-5.1-telco-6.2
- mysql-5.1-telco-6.3
- mysql-5.1-telco-7.0
- mysql-5.1-telco-7.1
[8 Jul 2009 20:46] Paul DuBois
Changes to test suite. No changelog entry needed.