[jaunty] causes random Launchpad timeouts with python-apport

Bug #315571 reported by Martin Pitt
4
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
New
High
Unassigned

Bug Description

Binary package hint: python-apt

Sorry for the weird title, but it is one of the weirdest bugs I ever saw. If I have the current jaunty python-apt installed (in current jaunty), I get intermittent Launchpad timeout errors in the apport retracers. The minimal reproducer is

python -c 'from glob import glob; from apport.crashdb_impl.launchpad import CrashDatabase; c=CrashDatabase(glob(".mozilla/firefox/*.default/cookies.sqlite")[0], None, {"distro": "ubuntu"}); r=c.download(300168); print r.keys()'

In about half the cases, I get:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/apport/crashdb_impl/launchpad.py", line 129, in download
    b = Bug(id)
  File "/usr/lib/python2.5/site-packages/launchpadbugs/connector.py", line 81, in __call__
    return self.cls(bug, url, connection=self.connection)
  File "/usr/lib/python2.5/site-packages/launchpadbugs/html_bug.py", line 1317, in __init__
    bugpage = self.__connection.get(self.__url)
  File "/usr/lib/python2.5/site-packages/launchpadbugs/http_connection.py", line 253, in get
    return self._safe_urlopen(url, None, False)
  File "/usr/lib/python2.5/site-packages/launchpadbugs/http_connection.py", line 352, in _safe_urlopen
    raise exceptions.choose_LaunchpadError(error, url)
launchpadbugs.exceptions.LaunchpadURLError:
    * message: The read operation timed out
    * url: https://bugs.launchpad.net/bugs/300168

(Note: with the default p-lp-bugs, the "message:" will be "Unknown error", I slightly tweaked p-lp-bugs to give the error name; does not change the bug, though).

If I downgrade python-apt to the intrepid version, I can run the command arbitrarily often in a row, and it always succeeds:

['NonfreeKernelModules', 'Title', 'StacktraceTop', 'ProcCmdline', 'CrashCounter', 'SourcePackage', 'CoreDump', 'ProcEnviron', 'Dependencies', 'Date', 'ThreadStacktrace', 'Package', 'Signal', 'ProblemType', 'ProcAttrCurrent', 'Architecture', 'Stacktrace', 'UserGroups', 'Disassembly', 'Uname', 'DistroRelease', 'ExecutablePath', 'ProcMaps']

I do not know what python-apt has to do with python-launchpad-bugs, though. :-(

It should also be noted that if I do not involve python-apport, but do the very same python-launchpad-bugs operations directly, it always succeeds. Presumably because python-apport imports python-apt, while python-launchpad-bugs alone doesn't.

Revision history for this message
Martin Pitt (pitti) wrote :

Further notes: I bisected this by upgrading an intrepid chroot step by step, and downgrading a jaunty chroot step by step. All other involved packages (python2.5, libc6, etc.) didn't matter. Downgrading python-apt in jaunty fixes the timeout, while upgrading python-apt in intrepid starts them to happen.

Revision history for this message
Martin Pitt (pitti) wrote :

This just got a lot more urgent, since the workaround with installing the intrepid python-apt in jaunty doesn't work any more (due to the python2.6 transition).

Changed in python-apt:
importance: Undecided → High
Revision history for this message
Martin Pitt (pitti) wrote :

Oh, I just found an interesting comment from Markus Korn in a branch:

   # working around LP: #314212
   # python-apt sets a 2 seconds timeout in jaunty which results in
   # failing uploads. To workaround this temporary set timeout to None
   # (no timeout)

This very much could be the reason for this bug?

Revision history for this message
Martin Pitt (pitti) wrote :

Also, I didn't get this any more recently, so I'm pretty sure it's a dupe of bug 314212.

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.