# Multi-threaded matplotlib test issue in meas_algorithms

XMLWordPrintable

#### Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
0.125
• Team:
SQuaRE

#### Description

A rare failure of matplotlib in meas_algorithms:

 [ 59/71 ] meas_algorithms 11.0.rc2-1-gc0593fd+6 ...   ***** error: from /home/vagrant/stack/EupsBuildDir/Linux64/meas_algorithms-11.0.rc2-1-gc0593fd+6/build.log:  import matplotlib.colorbar  File "/home/vagrant/stack/Linux64/anaconda/2.2.0/lib/python2.7/site-packages/matplotlib/colorbar.py", line 36, in   import matplotlib.contour as contour  File "/home/vagrant/stack/Linux64/anaconda/2.2.0/lib/python2.7/site-packages/matplotlib/contour.py", line 27, in   import matplotlib.texmanager as texmanager  File "/home/vagrant/stack/Linux64/anaconda/2.2.0/lib/python2.7/site-packages/matplotlib/texmanager.py", line 89, in   class TexManager:  File "/home/vagrant/stack/Linux64/anaconda/2.2.0/lib/python2.7/site-packages/matplotlib/texmanager.py", line 124, in TexManager  mkdirs(texcache)  File "/home/vagrant/stack/Linux64/anaconda/2.2.0/lib/python2.7/site-packages/matplotlib/cbook.py", line 1003, in mkdirs  os.makedirs(thispart, mode)  File "/home/vagrant/stack/Linux64/anaconda/2.2.0/lib/python2.7/os.py", line 157, in makedirs  mkdir(name, mode) OSError: [Errno 17] File exists: '/tmp/matplotlib-vagrant' The following tests failed: /home/vagrant/stack/EupsBuildDir/Linux64/meas_algorithms-11.0.rc2-1-gc0593fd+6/meas_algorithms-11.0.rc2-1-gc0593fd+6/tests/.tests/psfSelectTest.py.failed 1 tests failed 

This is a race between multiple matplotlib processes trying to create a directory tree.

matplotlib upstream has been notified in https://github.com/matplotlib/matplotlib/issues/2046

#### Activity

Hide
Tim Jenness added a comment -

matplotlib 1.5.1 is now out and includes the fix to os.mkdirs. I am not sure how we ensure that people run a new enough version of matplotlib. Joshua Hoblitt I assume we don't close this ticket until all the CI systems we control have been updated. Anaconda is shipping 1.5.1 now.

Show
Tim Jenness added a comment - matplotlib 1.5.1 is now out and includes the fix to os.mkdirs . I am not sure how we ensure that people run a new enough version of matplotlib . Joshua Hoblitt I assume we don't close this ticket until all the CI systems we control have been updated. Anaconda is shipping 1.5.1 now.
Hide
Tim Jenness added a comment -

Joshua Hoblitt now that DM-5178 is merged and comes with version 1.5.1 in the baseline I believe this ticket can be closed.

Show
Tim Jenness added a comment - Joshua Hoblitt now that DM-5178 is merged and comes with version 1.5.1 in the baseline I believe this ticket can be closed.
Hide
Tim Jenness added a comment -

To be sure that people get this fix we need to update the matplotlib eups package to set a minimum version at 1.5.1.

Show
Tim Jenness added a comment - To be sure that people get this fix we need to update the matplotlib eups package to set a minimum version at 1.5.1.
Hide
Joshua Hoblitt added a comment -

Testing lsst_distrib with the min version bump: https://ci.lsst.codes/job/stack-os-matrix/19347/

Show
Joshua Hoblitt added a comment - Testing lsst_distrib with the min version bump: https://ci.lsst.codes/job/stack-os-matrix/19347/
Hide
Joshua Hoblitt added a comment -

Min version has been bumped to 1.5.1 and a new tag of 0.0.4 has been pushed.

Show
Joshua Hoblitt added a comment - Min version has been bumped to 1.5.1 and a new tag of 0.0.4 has been pushed.

#### People

Assignee:
Joshua Hoblitt
Reporter:
Tim Jenness
Watchers:
Frossie Economou, Joshua Hoblitt, Tim Jenness