lp.registry.browser.tests.test_distroseriesdifference_views.DistroSeriesDifferenceTestCase.test_binary_summaries_for_source_pub fails intermittently/rarely in parallel tests with distroreleasepackagecache_pkey error

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

Bug Description

I can reliably reproduce this error in a Lucid LXC container with ./bin/test --load-list tests.txt if tests.txt contains these two tests:

lib/lp/soyuz/doc/package-cache-script.txt
lp.registry.browser.tests.test_distroseriesdifference_views.DistroSeriesDifferenceTestCase.test_binary_summaries_for_source_pub

(The test passes by itself.)

Looks like another one like bug 849056 and 992958. See lp:~gmb/launchpad/mark-db-dirty-for-cronscripts-bug-849056 for a fix approach. These are apparently one-offs for similar cronscript test errors--you need to explicitly mark the db as dirty after you find the test that ran before this one.

======================================================================
ERROR: lp.registry.browser.tests.test_distroseriesdifference_views.DistroSeriesDifferenceTestCase.test_binary_summaries_for_source_pub
worker ID: worker-0
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: librarian-log: {{{
2012-05-03 20:47:21+0530 [-] Log opened.
2012-05-03 20:47:21+0530 [-] twistd 11.1.0 (/usr/bin/python2.6 2.6.5) starting up.
2012-05-03 20:47:21+0530 [-] reactor class: twisted.internet.pollreactor.PollReactor.
2012-05-03 20:47:21+0530 [-] FileUploadFactory starting on 52861
2012-05-03 20:47:21+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0xaaa83cc>
2012-05-03 20:47:21+0530 [-] Site starting on 52728
2012-05-03 20:47:21+0530 [-] Starting factory <twisted.web.server.Site instance at 0xaaa82cc>
2012-05-03 20:47:21+0530 [-] FileUploadFactory starting on 46317
2012-05-03 20:47:21+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0xaaa892c>
2012-05-03 20:47:21+0530 [-] Site starting on 42261
2012-05-03 20:47:21+0530 [-] Starting factory <twisted.web.server.Site instance at 0xaaa8d6c>
2012-05-03 20:47:21+0530 [-] Not using upstream librarian
2012-05-03 20:47:21+0530 [-] daemon ready!
}}}

Traceback (most recent call last):
  File "/var/lib/buildbot/slaves/slave/lucid-devel/build/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py", line 107, in test_binary_summaries_for_source_pub
    ds_diff = self.addSummaryToDifference(ds_diff)
  File "/var/lib/buildbot/slaves/slave/lucid-devel/build/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py", line 94, in addSummaryToDifference
    stp.updateDistroSeriesPackageCache(source_pub.distroseries)
  File "/var/lib/buildbot/slaves/slave/lucid-devel/build/lib/lp/soyuz/tests/test_publishing.py", line 566, in updateDistroSeriesPackageCache
    log=DevNullLogger())
  File "/var/lib/buildbot/slaves/slave/lucid-devel/build/lib/lp/soyuz/model/distroseriespackagecache.py", line 206, in updateAll
    cls._update(distroseries, bpn, archive, log)
  File "/var/lib/buildbot/slaves/slave/lucid-devel/build/lib/lp/soyuz/model/distroseriespackagecache.py", line 130, in _update
    BinaryPackagePublishingHistory.dateremoved == None)
  File "/var/lib/buildbot/dependencies/eggs/storm-0.19.0.99_lpwithnodatetime_r406-py2.6-linux-i686.egg/storm/store.py", line 205, in find
    self.flush()
  File "/var/lib/buildbot/dependencies/eggs/storm-0.19.0.99_lpwithnodatetime_r406-py2.6-linux-i686.egg/storm/store.py", line 503, in flush
    self._flush_one(obj_info)
  File "/var/lib/buildbot/dependencies/eggs/storm-0.19.0.99_lpwithnodatetime_r406-py2.6-linux-i686.egg/storm/store.py", line 540, in _flush_one
    result = self._connection.execute(expr)
  File "/var/lib/buildbot/dependencies/eggs/storm-0.19.0.99_lpwithnodatetime_r406-py2.6-linux-i686.egg/storm/databases/postgres.py", line 260, in execute
    result = Connection.execute(self, Returning(statement), params)
  File "/var/lib/buildbot/dependencies/eggs/storm-0.19.0.99_lpwithnodatetime_r406-py2.6-linux-i686.egg/storm/database.py", line 238, in execute
    raw_cursor = self.raw_execute(statement, params)
  File "/var/lib/buildbot/dependencies/eggs/storm-0.19.0.99_lpwithnodatetime_r406-py2.6-linux-i686.egg/storm/databases/postgres.py", line 276, in raw_execute
    return Connection.raw_execute(self, statement, params)
  File "/var/lib/buildbot/dependencies/eggs/storm-0.19.0.99_lpwithnodatetime_r406-py2.6-linux-i686.egg/storm/database.py", line 322, in raw_execute
    self._check_disconnect(raw_cursor.execute, *args)
  File "/var/lib/buildbot/dependencies/eggs/storm-0.19.0.99_lpwithnodatetime_r406-py2.6-linux-i686.egg/storm/database.py", line 371, in _check_disconnect
    return function(*args, **kwargs)
  File "/var/lib/buildbot/slaves/slave/lucid-devel/build/lib/lp/testing/pgsql.py", line 121, in execute
    return self.real_cursor.execute(*args, **kwargs)
IntegrityError: duplicate key value violates unique constraint "distroreleasepackagecache_pkey"

Related branches

Gary Poster (gary)
Changed in launchpad:
assignee: nobody → Gary Poster (gary)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :

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

tags: added: qa-untestable
Changed in launchpad:
status: Triaged → Fix Committed
Steve Kowalik (stevenk)
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.