Bug #55968 MTR does not clean up properly and chokes on its discharge
Submitted: 13 Aug 2010 11:38 Modified: 14 Nov 2010 2:52
Reporter: Martin Hansson Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any

[13 Aug 2010 11:38] Martin Hansson
Description:
If you run mtr with the --mem flags a couple of times you will notice the /dev/shm directory full of directories starting with var_auto_. After a while it's impossible to run mtr: you get random failures or it just fails to start. The only option is deleting all these directories and starting all test runs over again. This wastes hours every week.

How to repeat:
Do a couple (10-20) of mtr --mem test runs in different trees. After a while it stops working, especially after updating bzr trees and recompiling.

Suggested fix:
There are obviously two problems: Number one is that mtr unconditionally leaves its var directories behind. Number two is that somehow these leftovers are allowed to crash subsequent test runs. Either adding an option to clean up after a successful test or not reusing directories would be great.
[13 Aug 2010 20:10] Sveta Smirnova
Thank you for the report.

Verified as described.
[7 Oct 2010 10:14] 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/120225

3098 Bjorn Munch	2010-10-07
      Bug #55968 MTR does not clean up properly and chokes on its discharge
      Added --clean-vardir to empty vardir if no failures
      Not sure how useful this really is
[7 Oct 2010 11:22] Magnus Blåudd
Looks ok but I think you should add so it can read that setting from env variable. For example MTR_CLEANUP_VAR=1
[7 Oct 2010 11:34] 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/120241

3098 Bjorn Munch	2010-10-07
      Bug #55968 MTR does not clean up properly and chokes on its discharge
      Added --clean-vardir to empty vardir if no failures
      Also added variable $MTR_CLEAN_VARDIR
[13 Oct 2010 7:58] 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/120630

3099 Bjorn Munch	2010-10-13 [merge]
      Bug #55968 MTR does not clean up properly and chokes on its discharge
      Added --clean-vardir to empty vardir if no failures
      Also added variable $MTR_CLEAN_VARDIR
[13 Oct 2010 11:08] 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/120667

3099 Bjorn Munch	2010-10-13
      Bug #55968 MTR does not clean up properly and chokes on its discharge
      Added --clean-vardir to empty vardir if no failures
      Also added variable $MTR_CLEAN_VARDIR
[19 Oct 2010 13:10] Bjørn Munch
Pushed to -mtr branches
[29 Oct 2010 15:29] Paul DuBois
Changes to test suite. No changelog entry needed.
[13 Nov 2010 16:24] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:alexander.nozdrin@oracle.com-20101113152450-2zzcm50e7i4j35v7) (merge vers: 5.6.1-m4) (pib:21)
[13 Nov 2010 16:41] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101113160336-atmtmfb3mzm4pz4i) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (pib:21)
[14 Nov 2010 2:52] Paul DuBois
Changes to test suite. No changelog entry needed.
[16 Dec 2010 22:34] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (version source revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (merge vers: 5.5.9) (pib:24)