infinite recursion when apport is installed

Bug #516934 reported by Vincent Ladeuil on 2010-02-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Critical
Vincent Ladeuil
2.1
Undecided
Unassigned

Bug Description

As of revno 5003 on trunk, babune reports an infinite recursion:

ERROR: bzrlib.tests.test_crash.TestApportReporting.test_apport_report
----------------------------------------------------------------------
_StringException: Text attachment: log
------------

------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/home/babune/lib/python/testtools/runtest.py", line 128, in _run_user
    return fn(*args)
  File "/home/babune/lib/python/testtools/testcase.py", line 341, in _run_setup
    self.setUp()
  File "/home/babune/buildbot/bzr/slaves/jaunty/tests/jaunty/build/bzrlib/tests/test_crash.py", line 45, in setUp
    self.requireFeature(ApportFeature)
  File "/home/babune/buildbot/bzr/slaves/jaunty/tests/jaunty/build/bzrlib/tests/__init__.py", line 1699, in requireFeature
    if not feature.available():
  File "/home/babune/buildbot/bzr/slaves/jaunty/tests/jaunty/build/bzrlib/tests/__init__.py", line 4058, in available
    self._available = self._probe()
  File "/home/babune/buildbot/bzr/slaves/jaunty/tests/jaunty/build/bzrlib/tests/__init__.py", line 4156, in _probe
    return self._feature._probe()
  File "/home/babune/buildbot/bzr/slaves/jaunty/tests/jaunty/build/bzrlib/tests/__init__.py", line 4156, in _probe

Given that the crash occurs on hardy, jaunty and karmic but not on FreeBSD[78] and gentoo, I strongly suspect
that *not* having apport installed avoid the problem (and I suspect the same for pqm).

Related branches

Vincent Ladeuil (vila) wrote :

./bzr selftest -s bt.test_crash.TestApportReporting.test_apport_report

reproduces the problem here with apport installed

Changed in bzr:
status: New → Confirmed
importance: Undecided → Critical
Vincent Ladeuil (vila) wrote :

Ok, sounds like _CompatabilityThunkFeature is the culprit and TestApportReporting using both _test_needs_features = [features.apport] and self.requireFeature(ApportFeature) triggers the bug.

Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → In Progress
Vincent Ladeuil (vila) wrote :

I've got a fix.

The bug was that the feature itself and its replacement were swapped in _ensure() which led to an attempt
to probe the feature indefinitely, never thunking to the replacement.

The missing test is a bit more complicated than strictly needed due to the way the deprecation is reported
 (mentioning the replacement feature). We may want to generalize the ability to do that but that's outside the
scope of this bug.

Vincent Ladeuil (vila) wrote :

Correction: the test wasn't missing: Test_CompatibilityFeature but it suffered from the same swapped parameters :D

Vincent Ladeuil (vila) wrote :

As per Martin's request, marking as Won't Fix since the workaround is to just not use the deprecated feature.

Changed in bzr:
milestone: none → 2.2.0b1
Vincent Ladeuil (vila) wrote :

Won't fix for 2.1 that is, the fix will be available in bzr.dev.

Vincent Ladeuil (vila) on 2010-02-04
Changed in bzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers