retracer crashes if a bug has multiple master bugs

Bug #943117 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Since we introduced client-side crash signatures and duplication, the retracer often crashes with

Traceback (most recent call last):
  File "apport/bin/apport-retrace", line 434, in <module>
    res = crashdb.check_duplicate(int(crashid), report)
  File "/home/ubuntu-archive/apport/apport/crashdb.py", line 178, in check_duplicate
    self._duplicate_db_add_address_signature(addr_sig, ex_id)
  File "/home/ubuntu-archive/apport/apport/crashdb.py", line 532, in _duplicate_db_add_address_signature
    id, sig, existing))
SystemError: ID 942280 has signature
+/usr/sbin/synaptic:11:x86_64:/usr/sbin/synaptic+7b8be:/usr/sbin/synaptic+79aca:/usr/sbin/synaptic+6b3ca:/usr/sbin/synaptic+388a8:/u
+sr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+f3c4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+1f5f5:/usr/lib/x86_64-
+linux-gnu/libgobject-2.0.so.0.3118.0+26fcb:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+276a4:/usr/lib/x86_64-linux-gnu/lib
+gobject-2.0.so.0.3118.0+f3c4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+1f5f5:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so
+.0.3118.0+26fcb:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+27192:/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.10+8e
+965:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+f3c4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+1f9da, but
+database already has that signature for ID 936677
02/28/12 21:09:42: retracing #942891 failed with status: 1

There is some confusion happening with the duplicate db with symbolic and address signatures.

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

So there are three bugs involved here:

(1) bug 942891 is the incoming one apport-retrace was processing.

    address signature: /usr/sbin/synaptic:11:x86_64:/usr/sbin/synaptic+7b8be:/usr/sbin/synaptic+79aca:/usr/sbin/synaptic+6b3ca:/usr/sbin/synaptic+388a8:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+f3c4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+1f5f5:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+26fcb:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+276a4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+f3c4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+1f5f5:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+26fcb:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+27192:/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.10+8e965:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+f3c4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+1f9da

   signature: /usr/sbin/synaptic:11:RPackage::section:RPackageViewSections::addPackage:RPackageView::refresh:RPackageLister::openCache:RGMainWindow::cbUpdateClicked

  The duplicate database has an existing entry for that signature which assigns bug 942280 as the master bug, which looks correct.

(2) Bug 942280 which is the master bug according to the symbolic signature in the DB.

  address signature: identical to 942891

  signature: identical to 942891

(3) Bug 936677 which is the master bug according to the address signature in the DB.

  address signature: multiple in the DB, but one of them is

  signature: /usr/sbin/synaptic:11:Section:RPackage::section:RPackageViewSections::addPackage:RPackageView::refresh:RPackageLister::openCache

  (i. e. similar to 942280, but missing the first frame)

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

The address sig duplicate DB has a different signature for bug 942280, though:

/usr/sbin/synaptic:11:x86_64:/usr/sbin/synaptic+7b8be:/usr/sbin/synaptic+79aca:/usr/sbin/synaptic+6b3ca:/usr/sbin/synaptic+388a8:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+f384:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+1f635:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+2700b:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+276e4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+f384:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+1f635:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+2700b:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+271d2:/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.10+fadf0:/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.10+2e7a94:[stack]+1f8c0

This is the signature which crash_signature_addresses() actually computes for bug 942280, so there seems to be some bug in the code, as the log message says "ID 942280 has signature ..." with the signature of bug 936677 .

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

So, ignore comment 1, the correct version is:

There are three bugs involved here:

(1) bug 942891 is the incoming one apport-retrace was processing.

    address signature: /usr/sbin/synaptic:11:x86_64:/usr/sbin/synaptic+7b8be:/usr/sbin/synaptic+79aca:/usr/sbin/synaptic+6b3ca:/usr/sbin/synaptic+388a8:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+f3c4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+1f5f5:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+26fcb:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+276a4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+f3c4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+1f5f5:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+26fcb:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+27192:/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.10+8e965:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+f3c4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3118.0+1f9da

   signature: /usr/sbin/synaptic:11:RPackage::section:RPackageViewSections::addPackage:RPackageView::refresh:RPackageLister::openCache:RGMainWindow::cbUpdateClicked

  The duplicate database has an existing entry for that signature which assigns bug 942280 as the master bug, which looks correct.

(2) Bug 942280 which is the master bug according to the symbolic signature in the DB.

  address signature: identical to 942891

  signature: /usr/sbin/synaptic:11:x86_64:/usr/sbin/synaptic+7b8be:/usr/sbin/synaptic+79aca:/usr/sbin/synaptic+6b3ca:/usr/sbin/synaptic+388a8:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+f384:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+1f635:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+2700b:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+276e4:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+f384:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+1f635:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+2700b:/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3116.0+271d2:/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.10+fadf0:/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.10+2e7a94:[stack]+1f8c0

  (different to bug 942280)

(3) Bug 936677 which is the master bug according to the address signature in the DB.

  address signature: multiple in the DB, but one of them is the one from (1); it does not have signature from (2)

  signature: /usr/sbin/synaptic:11:Section:RPackage::section:RPackageViewSections::addPackage:RPackageView::refresh:RPackageLister::openCache

  (i. e. similar to 942280, but missing the first frame)

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

Sorry, (2) is still wrong, it mixed "address signature" and "signature".

Thus (1) is a duplicate of (2) in terms of symbolic signatures, and a duplicate of (3) in terms of address signatures. So what happened here is that bug 942280 came in with a differen symbolic and address signature as the original bug (3) and thus was not identified as a duplicate. The new bug (1) now ties both together, and we should make use of that.

Address signatures are very sensitive to any change, so they are 100% reliable as long as we compare them in full length (which we do right now). So marking (1) a dupe of (3) is the right thing. But to be correct and avoid duplicate reports the retracer should also mark (2) as a duplicate of (3) along the way.

So we need to separately handle the cases of identifying duplicates through symbolic and address signatures.

Changed in apport (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
summary: - retracer crashes on wrong duplication
+ retracer crashes if a bug has multiple master bugs
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in trunk r2190. I ran it against that bug 942891 and it now properly marked that and the previously unidentified duplicate bug 942280 as dupe of bug 936677.

Changed in apport (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.5 KiB)

This bug was fixed in the package apport - 1.94-0ubuntu1

---------------
apport (1.94-0ubuntu1) precise; urgency=low

  [ Martin Pitt ]
  * New upstream release:
    - apport: Set the group of written reports to "whoopsie" if that group
      exists.
    - Fix tests to run properly against the system-installed modules and
      binaries.
    - test/run: Run under LC_MESSAGES=C to avoid test failures due to
      translated strings.
    - general-hooks/generic.py: Also attach xsession-errors for programs that
      link to libgtk-3.
    - launchpad.py: Properly handle "Expired" status, to avoid marking new
      bugs as duplicates of expired ones. (LP: #941854)
    - apport: Fix crash if the "whoopsie" group does not exist. (LP: #942326)
    - report.py, crash_signature(): Do not put "<module>" frames into Python
      crash signatures that happen outside of function/method calls. Fall back
      to the file/line number as a frame description instead. This will do a
      much better job at disambiguating e. g. different ImportError crashes.
      (LP: #920403)
    - Make "binary changed since the time of the crash" error message more
      comprehensible, thanks Paolo Rotolo. (LP: #942830)
    - crashdb.py, check_duplicate(): It can happen that a bug gets identified
      as being a duplicate of bug S by symbolic signatures and a duplicate of
      bug A by address signatures. Empirical evidence shows that this is due
      to the unavoidable jitter in stack traces (A and S not being identified
      as duplicates as their signatures differ slightly) and not a logic
      error. So instead of erroring out, duplicate all three bugs and keep the
      lowest number as the master ID. (LP: #943117)
    - Revert the usage of multiple nested threads during data collection, and
      switch back to only using one UI thread. The UI implementations can, and
      now do, decide between showing a spinner and showing a progress dialog
      in the ui_*_info_collection_progress() methods. This fixes libX11
      crashes when multiple UI threads do changes concurrently (LP: #901675),
      and also avoids multi-thread induced crashes in Pango (LP: #943661). The
      removal of the collect() method also fixes the new crashes in it.
      (LP: #942098, #939803)
    - ui.py, get_desktop_entry(): Fix crash on uninstalled package.
      (LP: #940984)
    - data/unkillable_shutdown: Fix crash on race condition when PID goes away
      while the report is created. (LP: #546369)
    - apport/hookutils.py, pci_devices(): Fix crash on unexpected lines from
      lspci. (LP: #904489)
    - Drop hardcoded "Ubuntu" words again which crept in with the whoopsie
      support merge. Use the DistroRelease: field.
    - apport-kde: Fix Home page URL in KApplication metadata.
    - apport-gtk: Fix resizability and size after hiding details.
      (LP: #405418)
    - test/run: Drop "local" argument. This now tests against the source tree
      when run in the source tree root, and against the system
      libraries/programs when run from anywhere else.
    - test/run: Consider command line arguments as test names and only run
      those when given. Also support just runni...

Read more...

Changed in apport (Ubuntu):
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.