apport-retrace wrongly installs older dbgsyms

Bug #309208 reported by C de-Avillez
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: apport

While I was running apport-retrace I notice that even after finding (and stating) that a specific ddeb was from a previous release than needed, apport-retrace would still try to install it. This results in a broken package situation, forcing manual cleanup.

Looking at the code, it seems we are missing a 'continue' in a loop, after the wrong version is found. The attached patch seems to correct this.

Revision history for this message
C de-Avillez (hggdh2) wrote :
Revision history for this message
C de-Avillez (hggdh2) wrote :

example run without the patch:

hggdh@xango2:/var/crash $ sudo apport-retrace -o test.err _usr_lib_xscreensaver_busyspheres.1000.crash
WARNING: package libselinux1-dbgsym not available
WARNING: package libgcc1-dbgsym not available
WARNING: libgd2-noxpm version None required, but 2.0.36~rc1~dfsg-3ubuntu1 is available
WARNING: package whiptail-dbgsym not available
WARNING: package libdb4.7-dbgsym not available
WARNING: package libgdbm3-dbgsym not available
WARNING: package gcc-4.3-base-dbgsym not available
WARNING: package sed-dbgsym not available
WARNING: package libdjvulibre-text-dbgsym not available
WARNING: package libnewt0.52-dbgsym not available
WARNING: libgnutls26-dbgsym version 2.4.2-4 required, but 2.4.1-1build1 is available
WARNING: package libuuid1-dbgsym not available
WARNING: package libbz2-1.0-dbgsym not available
WARNING: package libcomerr2-dbgsym not available
WARNING: package libdb4.6-dbgsym not available
WARNING: package libxml2-dbgsym not available
WARNING: package debianutils-dbgsym not available
WARNING: package perl-base-dbgsym not available
WARNING: libgd2-noxpm-dbgsym version None required, but 2.0.36~rc1~dfsg-3ubuntu1 is available
WARNING: package perl-dbgsym not available
dpkg : des problèmes de dépendances empêchent la configuration de libgnutls26-dbgsym :
 libgnutls26-dbgsym dépend de libgnutls26 (= 2.4.1-1build1) ; cependant :
  La version de libgnutls26 sur le système est 2.4.2-4.
dpkg : erreur de traitement de libgnutls26-dbgsym (--configure) :
 problèmes de dépendances - laissé non configuré
Des erreurs ont été rencontrées pendant l'exécution :
 libgnutls26-dbgsym
Error: Could not install all archives. If you use this tool on a production system, it is recommended to use the -u option. See --help for details.
hggdh@xango2:/var/crash $

Revision history for this message
C de-Avillez (hggdh2) wrote :

example run with the patch:

hggdh@xango2:/var/crash $ sudo apport-retrace -o test.err _usr_lib_xscreensaver_busyspheres.1000.crash
WARNING: package libselinux1-dbgsym not available
WARNING: package libgcc1-dbgsym not available
WARNING: libgd2-noxpm version None required, but 2.0.36~rc1~dfsg-3ubuntu1 is available
WARNING: package whiptail-dbgsym not available
WARNING: package libdb4.7-dbgsym not available
WARNING: package libgdbm3-dbgsym not available
WARNING: package gcc-4.3-base-dbgsym not available
WARNING: package sed-dbgsym not available
WARNING: package libdjvulibre-text-dbgsym not available
WARNING: package libnewt0.52-dbgsym not available
WARNING: libgnutls26-dbgsym version 2.4.2-4 required, but 2.4.1-1build1 is available
WARNING: package libuuid1-dbgsym not available
WARNING: package libbz2-1.0-dbgsym not available
WARNING: package libcomerr2-dbgsym not available
WARNING: package libdb4.6-dbgsym not available
WARNING: package libxml2-dbgsym not available
WARNING: package debianutils-dbgsym not available
WARNING: package perl-base-dbgsym not available
WARNING: libgd2-noxpm-dbgsym version None required, but 2.0.36~rc1~dfsg-3ubuntu1 is available
WARNING: package perl-dbgsym not available
WARNING: libgcc1-dbgsym is not available
WARNING: libuuid1-dbgsym is not available
hggdh@xango2:/var/crash $

The bad libgnutls26-dbgsym is not installed.

Revision history for this message
goto (gotolaunchpad) wrote :

I had this problem, too. Apport-retrace installed -dbgsym packages, but they did not belong to other packages, so my package management went broken. I had to do a system upgrade to repair (and by hand). Are there actually dbgsym packages for -proposed packages or older packages? (I kinda miss a apport-retrace documentation) Thanks!

Revision history for this message
C de-Avillez (hggdh2) wrote :

We should have pretty much all dbgsyms for all current packages. The dbgsym build process runs behind when there are a lot on new packages being built -- like now.

If by 'older packages' you mean packages that have been updated, then no: as soon as the new dbgsym version is built, it replaces the older. I am not sure about packages in -proposed.

Revision history for this message
C de-Avillez (hggdh2) wrote :

hum. The current patch is not enough: after finding the dependency packages, apport-retrace goes on looking at the ProcMaps. If it finds a library from a package with an obsolete dbgsym it goes on to load it.

Will work on that.

Revision history for this message
C de-Avillez (hggdh2) wrote :

This new patch seems to solve it.

Revision history for this message
C de-Avillez (hggdh2) wrote :

Issue is still present on 0.125. I have a new patch for 0.125 is available is anyone is interested.

goto (gotolaunchpad)
Changed in apport:
status: New → Confirmed
Revision history for this message
C de-Avillez (hggdh2) wrote :

still present in 0.126.

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

Thanks!

We should still install it when using -u (the preferred mode for apport-retrace anyway), but I agree that it wreaks havoc when not using -u. I'll adapt your patch accordingly.

Changed in apport:
assignee: nobody → pitti
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

r1249

Changed in apport:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 0.130

---------------
apport (0.130) jaunty; urgency=low

  [ Martin Pitt ]
  * bin/kernel_crashdump: Don't crash if vmcore.log does not exist.
  * crashdb_impl/launchpad.py: Tag bugs with the architecture they are
    being reported on.
  * bin/crash-digger: Revert catching "database is locked" errors
    during consolidation, since it just hides more fundamental errors.
  * apport/crashdb_impl/memory.py: Improve docstrings of test suite.
  * bin/apport-retrace: Do not try to install -dbgsym packages with
    nonmatching versions, unless --unpack-only is used. Thanks to
    hggdh for the initial patch! (LP: #309208)

  [ Andy Whitcroft ]
  * bin/apportcheckresume: modify the oops title and thereby the launchpad
    bug title to say suspend or hibernate.
  * bin/apportcheckresume: modify the tags to bin/apportcheckresume:
    modify the oops title and thereby the launchpad be resume+suspend or
    resume+hibernate as appropriate.
  * bin/apportcheckresume: include any non-free modules in the bug title.

 -- Martin Pitt <email address hidden> Thu, 12 Feb 2009 22:09:35 +0100

Changed in apport:
status: Fix Committed → Fix Released
Revision history for this message
Oliver Gerlich (ogerlich) wrote :

I think this patch means that apport-retrace will not install a dbgsym package if there's a newer ddeb available (for example from -proposed) but the user has the older (non-proposed) deb package installed. For example, when I ran apport-retrace on a Nautilus crash now, it did not install any nautilus-dbgsym package, and left essential parts of the backtrace as question marks.

I have nautilus 1:2.26.2-0ubuntu1 installed (I don't use the -proposed on this system); the de.archive.ubuntu.com already offers a 2.26.2-0ubuntu2 package; and similarly, ddebs.ubuntu.com has ddebs for -0ubuntu1 and for -0ubuntu2 . When running apport-retrace on the crash report like this:
$> sudo apport-retrace -o nautilus-crash-1 /var/crash/_usr_bin_nautilus.1000.crash

it didn't install any nautilus-dbgsym package at all and gave a line like this:
WARNING: nautilus-dbgsym version 1:2.26.2-0ubuntu1 required, but 1:2.26.2-0ubuntu2 is available

and left the backtrace with gaps in the places where Nautilus functions were called.
Manually installing nautilus-dbgsym 1:2.26.2-0ubuntu1 then gave a good backtrace.

This is with apport 1.0-0ubuntu5.2 , on Jaunty i386.

Also, the retracer in Launchpad seems to have a similar problem. I reported the crash at https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/370954 , and "Apport retracing service" gave a similarly incomplete backtrace:

#0 0x081210b3 in nautilus_file_unref ()
#1 0xb78c73a7 in IA__g_list_foreach (list=0xa49e888,
    func=0x8121090 <nautilus_file_unref>, user_data=0x0)
    at /build/buildd/glib2.0-2.20.1/glib/glist.c:789
 next = (GList *) 0x6e
#2 0x0811807f in nautilus_file_list_unref ()
#3 0x081180b2 in ?? ()
#4 0x080d9017 in ?? ()
#5 0x080db7ba in ?? ()
#6 0x080f81a7 in ?? ()
#7 0x080fc9d6 in ?? ()
#8 0xb78c7c81 in g_idle_dispatch (source=0xa066018, callback=0x89f5448,
    user_data=0xb279dd58) at /build/buildd/glib2.0-2.20.1/glib/gmain.c:3922
No locals.
#9 0xb78c9b88 in IA__g_main_context_dispatch (context=0x89a77f8)
    at /build/buildd/glib2.0-2.20.1/glib/gmain.c:1814

Could you check whether this is the case, esp. for the LP retracing service?

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 309208] Re: apport-retrace wrongly installs older dbgsyms

Oliver Gerlich [2009-05-03 11:34 -0000]:
> I think this patch means that apport-retrace will not install a dbgsym
> package if there's a newer ddeb available (for example from -proposed)
> but the user has the older (non-proposed) deb package installed.

In this case, if you don't use -proposed for packages, you shouldn't
use -proposed for ddebs either. Then you'll get a more consistent
behaviour.

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.