lib/lp/services/profile/profiling.txt fails rarely/intermittently in parallel tests

Bug #1011793 reported by Gary Poster
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Benji York

Bug Description

I tried to duplicate this locally both in isolation and with the tests before it in worker 1 (http://pastebin.ubuntu.com/1036036/) and could not dupe. It smells like a timing issue.

======================================================================
FAILURE: lib/lp/services/profile/profiling.txt
worker ID: worker-1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/unittest.py", line 279, in run
    testMethod()
  File "/usr/lib/python2.6/doctest.py", line 2152, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for profiling.txt
  File "lib/lp/services/profile/profiling.txt", line 0

----------------------------------------------------------------------
File "lib/lp/services/profile/profiling.txt", line 36, in profiling.txt
Failed example:
    PageTestLayer.setUp()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1248, in __run
        compileflags, 1) in test.globs
      File "<doctest profiling.txt[7]>", line 1, in <module>
        PageTestLayer.setUp()
      File "/var/lib/buildbot/slaves/slave/lucid-devel/build/lib/lp/services/testing/profiled.py", line 30, in profiled_func
        return func(cls, *args, **kw)
      File "/var/lib/buildbot/slaves/slave/lucid-devel/build/lib/lp/testing/layers.py", line 1545, in setUp
        file_handler = logging.FileHandler('logs/pagetests-access.log', 'w')
      File "/usr/lib/python2.6/logging/__init__.py", line 819, in __init__
        StreamHandler.__init__(self, self._open())
      File "/usr/lib/python2.6/logging/__init__.py", line 838, in _open
        stream = open(self.baseFilename, self.mode)
    IOError: [Errno 2] No such file or directory: '/var/lib/buildbot/slaves/slave/lucid-devel/build/logs/pagetests-access.log'
----------------------------------------------------------------------
File "lib/lp/services/profile/profiling.txt", line 53, in profiling.txt
Failed example:
    profile_count > 0
Differences (ndiff with -expected +actual):
    - True
    + False
----------------------------------------------------------------------
File "lib/lp/services/profile/profiling.txt", line 61, in profiling.txt
Failed example:
    len(PageTestLayer.profiler.getstats()) > profile_count
Differences (ndiff with -expected +actual):
    - True
    + False
----------------------------------------------------------------------
File "lib/lp/services/profile/profiling.txt", line 66, in profiling.txt
Failed example:
    PageTestLayer.tearDown()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1248, in __run
        compileflags, 1) in test.globs
      File "<doctest profiling.txt[20]>", line 1, in <module>
        PageTestLayer.tearDown()
      File "/var/lib/buildbot/slaves/slave/lucid-devel/build/lib/lp/services/testing/profiled.py", line 30, in profiled_func
        return func(cls, *args, **kw)
      File "/var/lib/buildbot/slaves/slave/lucid-devel/build/lib/lp/testing/layers.py", line 1574, in tearDown
        PageTestLayer.orig__call__)
    AttributeError: type object 'PageTestLayer' has no attribute 'orig__call__'
----------------------------------------------------------------------
File "lib/lp/services/profile/profiling.txt", line 68, in profiling.txt
Failed example:
    stats = pstats.Stats(pagetests_profile)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1248, in __run
        compileflags, 1) in test.globs
      File "<doctest profiling.txt[22]>", line 1, in <module>
        stats = pstats.Stats(pagetests_profile)
      File "/usr/lib/python2.6/pstats.py", line 92, in __init__
        self.init(arg)
      File "/usr/lib/python2.6/pstats.py", line 106, in init
        self.load_stats(arg)
      File "/usr/lib/python2.6/pstats.py", line 120, in load_stats
        f = open(arg, 'rb')
    IOError: [Errno 2] No such file or directory: '/tmp/pagetests_profile2Egnw5/pagetests.prof'
----------------------------------------------------------------------
File "lib/lp/services/profile/profiling.txt", line 69, in profiling.txt
Failed example:
    os.remove(pagetests_profile)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1248, in __run
        compileflags, 1) in test.globs
      File "<doctest profiling.txt[23]>", line 1, in <module>
        os.remove(pagetests_profile)
    OSError: [Errno 2] No such file or directory: '/tmp/pagetests_profile2Egnw5/pagetests.prof'

Related branches

Benji York (benji)
Changed in launchpad:
assignee: nobody → Benji York (benji)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: Triaged → Fix Committed
William Grant (wgrant)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
Benji York (benji)
Changed in launchpad:
status: Fix Released → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :

Fixed in stable r15418 (http://bazaar.launchpad.net/~launchpad-pqm/launchpad/stable/revision/15418) by a commit, but not testable.

tags: added: qa-untestable
removed: qa-ok
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.