racey test canonical/lazr/doc/pidfile.txt: "pid file was not removed"

Bug #882370 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Martin Pool

Bug Description

when trying to land https://code.launchpad.net/~mbp/launchpad/881237-dkim-error/+merge/80413

I hit

Failing tests
-------------
 pidfile_txt

======================================================================
FAILURE: pidfile_txt (subunit.RemotedTestCase)
----------------------------------------------------------------------
_StringException: Text attachment: traceback
------------
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 pidfile.txt
 File "/var/launchpad/test/lib/canonical/lazr/tests/../doc/pidfile.txt", line 0

----------------------------------------------------------------------
File "/var/launchpad/test/lib/canonical/lazr/tests/../doc/pidfile.txt", line 113, in pidfile.txt
Failed example:
   stop(pid, signal.SIGTERM)
Differences (ndiff with -expected +actual):
   - Stopped successfully
   + Error: pid file was not removed

------------

Muharem hit the same problem back in 2009, according to my mail archive, so I guess it's a timing dependent bug.

Related branches

Martin Pool (mbp)
Changed in launchpad:
importance: Undecided → Critical
status: New → Triaged
Revision history for this message
Robert Collins (lifeless) wrote : Re: test failure in pidfile.txt: "pid file was not removed"

The test code loops for 2 seconds on the existing of the pid file, and the test helper sleeps for 30 seconds. I suspect a race in there.

summary: - spurious failure in pidfile.txt: "pid file was not removed"
+ test failure in pidfile.txt: "pid file was not removed"
Revision history for this message
Robert Collins (lifeless) wrote :

perhaps vm load can trigger this, there isn't anything obviously wrong in the test code (other than being timing dependent)

summary: - test failure in pidfile.txt: "pid file was not removed"
+ racey test canonical/lazr/doc/pidfile.txt: "pid file was not removed"
Martin Pool (mbp)
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Martin Pool (mbp)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Martin Pool (mbp)
tags: added: qa-untestable
removed: qa-needstesting
tags: added: spurious-test-failure
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.