Skip to content

Miscelaneous travis test failiures #2046

Closed

Description

@pelson

This issue is a bucket for test failures which have occurred on the travis tests, probably related to the fact that the tests are run in parallel.

I'm not unduly worried by these failures - it is something I'd like to fix, but not something which needs to hold up a release.

The problems will inevitably prove hard to reproduce and will be dependent on test execution order (which changes with hash ordering and performance of particular nodes).

Activity

  1. pelson commented on May 22, 2013

    @pelson
    MemberAuthor
    ======================================================================
    ERROR: matplotlib.tests.test_axes.test_arc_ellipse.test
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
        self.test(*self.arg)
      File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/matplotlib/testing/decorators.py", line 40, in failer
        result = f(*args, **kwargs)
      File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/matplotlib/testing/decorators.py", line 149, in do_test
        self._tol, in_decorator=True)
      File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/matplotlib/testing/compare.py", line 293, in compare_images
        expected = convert(expected, True)
      File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/matplotlib/testing/compare.py", line 187, in convert
        cache_dir = get_cache_dir()
      File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/matplotlib/testing/compare.py", line 108, in get_cache_dir
        os.makedirs(cache_dir)
      File "/home/travis/virtualenv/python2.7/lib/python2.7/os.py", line 157, in makedirs
        mkdir(name, mode)
    OSError: [Errno 17] File exists: '/home/travis/.matplotlib/test_cache'
    
    ----------------------------------------------------------------------
    
  2. mdboom commented on May 22, 2013

    @mdboom
    Member
      File "/home/travis/virtualenv/python2.7/lib/python2.7/os.py", line 157, in makedirs
        mkdir(name, mode)
    OSError: [Errno 17] File exists: '/home/travis/.matplotlib/test_cache'
    

    This is actually an easy one to fix. It should be using cbook.makedirs instead, which is multi-process safe because it mutes the exception if the directory happens to be created between the time it checks for its existence and its actual creation. I thought I had changed all instances of this when I made the parallel testing PR, but obviously I missed one. See #2049.

    I like the idea of this "thread" though, so let's keep it open.

  3. tacaswell commented on May 22, 2013

    @tacaswell
    Member

    https://travis-ci.org/matplotlib/matplotlib/jobs/7337969

    ======================================================================
    ERROR: matplotlib.tests.test_bbox_tight.test_bbox_inches_tight_suptile_legend.test
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/travis/virtualenv/python3.3/lib/python3.3/site-packages/nose/case.py", line 198, in runTest
        self.test(*self.arg)
      File "/home/travis/virtualenv/python3.3/lib/python3.3/site-packages/matplotlib-1.3.x-py3.3-linux-x86_64.egg/matplotlib/testing/decorators.py", line 40, in failer
        result = f(*args, **kwargs)
      File "/home/travis/virtualenv/python3.3/lib/python3.3/site-packages/matplotlib-1.3.x-py3.3-linux-x86_64.egg/matplotlib/testing/decorators.py", line 149, in do_test
        self._tol, in_decorator=True)
      File "/home/travis/virtualenv/python3.3/lib/python3.3/site-packages/matplotlib-1.3.x-py3.3-linux-x86_64.egg/matplotlib/testing/compare.py", line 308, in compare_images
        rms = calculate_rms(expectedImage, actualImage)
      File "/home/travis/virtualenv/python3.3/lib/python3.3/site-packages/matplotlib-1.3.x-py3.3-linux-x86_64.egg/matplotlib/testing/compare.py", line 246, in calculate_rms
        abs_diff_image = abs(expectedImage - actualImage)
    ValueError: operands could not be broadcast together with shapes (593,919,3) (590,919,3) 
    ----------------------------------------------------------------------
    

    Only showed up in 3.3

  4. added this to the milestone on Aug 17, 2014
  5. timj commented on Sep 16, 2015

    @timj

    @mdboom I don't think the cbook.makedirs code catches all the problems with multi-threading. We are seeing a very rare failure in the LSST test suite when multiple tests are using matplotlib in parallel. I think it is because the try/catch in makedirs is assuming that only the last part of the path could have the race and only does a single catch around the entire for loop. If both processes are racing to create path A/B/C and both are notice that B is missing then the second one to attempt to create B will abort when it finds that B now exists. It should just continue on with trying to make C. I think the try/catch should be in the inner part of the loop around the os.makedirs call.

    This is the error we get:

    import matplotlib.colorbar
      File "/home/vagrant/stack/Linux64/anaconda/2.2.0/lib/python2.7/site-packages/matplotlib/colorbar.py", line 36, in <module>
        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 <module>
        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 <module>
        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'

    with v1.4.3.

    I can file a new issue if you prefer. I just used this as it was open already and related.

  6. tacaswell commented on Oct 12, 2015

    @tacaswell
    Member

    @timj Can you make a new issue? That makes it easier to track.

    I am going to close this issue as until last month it had not been touched for 2 years.

  7. tacaswell commented on Oct 12, 2015

    @tacaswell
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions