DistributionSourcePackageRelease page OOPS

Bug #536641 reported by Julian Edwards
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Michael Nelson

Bug Description

OOPS-1529EA4 NotOneError: one() used with more than one result available

https://edge.launchpad.net/ubuntu/+source/sun-java6/6.18-2/+index

It looks like maybe the cache got corrupted somehow?

Tags: lp-soyuz oops
tags: added: oops
Changed in soyuz:
status: New → Triaged
importance: Undecided → High
description: updated
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Looking at https://edge.launchpad.net/ubuntu/lucid/+source/sun-java6 you can see there are actually 2 6.18-2 releases listed, which indicates that there are two releases with the save version in two separate distro archives.

Running a query on staging shows this is the case:
16:05 < noodles> Can you run this for me (on staging):
16:05 < noodles> http://pastebin.ubuntu.com/392585/
17:20 < bigjools> noodles: haha
17:20 < bigjools> id | version | name
17:20 < bigjools> --------+---------+---------
17:20 < bigjools> 549031 | 6-16-1 | primary
17:20 < bigjools> 468586 | 6-15-1 | primary
17:20 < bigjools> 618325 | 6.18-2 | primary
17:20 < bigjools> 620648 | 6.18-2 | partner
17:20 < bigjools> (4 rows)

So we might want to think about not allowing the same version to exist in the same series of two separate *distro archives* (MAIN_ARCHIVE_PURPOSES, which also includes debug). It seems to break the url traversal and confuses apt locally (given that most people will have main and partner enabled). Are there other options?

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Re-running the above query to display the component name as well shows that the SPR in the primary archive with component 'partner' should have never been possible. This is actually bug 529926.

11:29 < noodles> bigjools: could you run this slightly updated query (adds display of the component names for the sun-java6 pkg):
                 http://pastebin.ubuntu.com/393924/
11:29 < noodles> (no rush)
11:30 < bigjools> id | version | name | name
11:30 < bigjools> --------+---------+---------+------------
11:30 < bigjools> 549031 | 6-16-1 | primary | multiverse
11:30 < bigjools> 468586 | 6-15-1 | primary | multiverse
11:30 < bigjools> 618325 | 6.18-2 | primary | partner
11:30 < bigjools> 620648 | 6.18-2 | partner | partner

Changed in soyuz:
assignee: nobody → Michael Nelson (michael.nelson)
status: Triaged → In Progress
Revision history for this message
Michael Nelson (michael.nelson) wrote :

I prepared and ran the following on staging:

https://pastebin.canonical.com/30713/

which deletes the SPR 618325 and it's corresponding builds, source publishing history, packagediffs etc., (results here https://pastebin.canonical.com/30748/). This fixes the one issue of the two SPR's, but reveals another.

Now viewing the source package in lucid shows only the one release - great:
https://edge.launchpad.net/ubuntu/lucid/+source/sun-java6

But clicking on the release https://staging.launchpad.net/ubuntu/+source/sun-java6/6.18-2 now shows a different oops, and as far as I can tell this is unrelated to the issue of the two SPRs.

DistroSeriesBinaryPackage.cache assumes that there will only be *one* DistroSeriesPackageCache item for each binary package name in lucid, for *all* distro archives.

I say unrelated to the duplicate SPR issue because the SPR that we're deleting didn't have any binaries to cache.

Now given that this package used to be published in multiverse (and would have had DistroSeriesPackageCache entries for its binaries related to the primary archive), and now it is published in partner, and no doubt has DistroSeriesPackageCache entries for its binaries related to the partner archive (as DistroSeries.updatePackageCache() creates one if one doesn't exist in the given archive), I'm assuming we need to either:

1. Change DSBP.cache() to use selectFirst() instead of selectOne() so it is more tolerant of this,
2. Ensure DistroSeries.updatePackageCache() doesn't create a new cache item for a distro archive if one already exists in another distro archive,
3. Delete the existing DistroSeriesPackageCache entries for all the related binary package names in main (sounds scary)?

or all of the above? Personally I'm keen for a CP of (1) with (2) in devel. I'll wait for a second opinion before going any further in case I've confused something above, but all I can say is, it'll be nice when partner is just another PPA.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Right, the cache is out of sync with reality.

We can fix this by deleting the cache entries, they will get regenerated when updatepkgcache runs again tonight, then we don't need a CP. It would be good to fix (2) though.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

So, here's the query to delete the distroseriespackagecache entries:

http://pastebin.ubuntu.com/418452/

I had this run on staging and can now view:
https://staging.launchpad.net/ubuntu/+source/sun-java6/6.18-2

So, the full query required:
http://pastebin.ubuntu.com/418458/

Changed in soyuz:
milestone: none → 10.04
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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