Bugs in debuginfo packages

Karel Klic kklic at redhat.com
Thu Feb 24 15:53:07 UTC 2011


On 24.2.2011 at 16:17, Michael Schwendt wrote:
> On Thu, 24 Feb 2011 09:28:10 +0100, Karel wrote:
> 
>>     - debuginfo symlink points to another binary in another RPM package which might not be installed
>>
> 
> Which is perfectly normal for subpackages, isn't it?
> 
> There is only a single -debuginfo package for a src.rpm, but the src.rpm
> may build multiple [sometimes optional] packages.

Michael, it means something else. I'll try to explain it on an example from the report:
 component: Inventor
  file: InventorXt-2.1.5-40.fc15.i686/usr/bin/SceneViewer
   - debuginfo symlink points to another binary in another RPM package which might not be installed: Inventor-demos-2.1.5-40.fc15.i686/usr/lib/Inventor/SceneViewer

This comes from the Inventor SRPM, which contains many subpackages: Inventor, InventorXt, 
Inventor-devel, InventorXt-devel, Inventor-demos etc.
Debugging symbols for every binary from every subpackage are stored in Inventor-debuginfo subpackage.

So lets examine the /usr/lib/Inventor/SceneViewer binary from the Inventor-demos package. Get the build id:
$ eu-readelf --notes /usr/lib/Inventor/SceneViewer | grep Build\ ID
    Build ID: 9b7a4aef2abc047b7b34b24eced50374d5d16bcd

Now let's check the debuginfo symlink which corresponds to this build id:
$ ls -l /usr/lib/debug/.build-id/9b/7a4aef2abc047b7b34b24eced50374d5d16bcd
lrwxrwxrwx 1 root root 29 24. úno 16.37 /usr/lib/debug/.build-id/9b/7a4aef2abc047b7b34b24eced50374d5d16bcd -> ../../../Inventor/SceneViewer

So you can see the symlink points to our binary, /usr/lib/Inventor/SceneViewer.
When GDB analyzes a coredump, it knows the build id and it needs to read data from the binary. So GDB follows the symlink and gets the binary. Great.

Now lets examine the /usr/bin/SceneViewer binary from the InventorXt package. Get the build id:
$ eu-readelf --notes /usr/bin/SceneViewer | grep Build\ ID
    Build ID: 9b7a4aef2abc047b7b34b24eced50374d5d16bcd

The build id is the same as for /usr/lib/Inventor/SceneViewer. So the same binary is packaged twice, in two separate packages.
The debuginfo symlink points to /usr/lib/Inventor/SceneViewer, even when a crash of /usr/bin/SceneViewer is analyzed.
This is ok when /usr/lib/Inventor/SceneViewer is present in the system.
This error message says that it is possible that /usr/lib/Inventor/SceneViewer is not present on a system where /usr/bin/SceneViewer is present. In other words, you can use InventorXt package without having Inventor-demos installed. And when you do _not_ have Inventor-demos installed, /usr/bin/SceneViewer crashes, and GDB analyzes a coredump, it checks /usr/lib/debug/.build-id/9b/7a4aef2abc047b7b34b24eced50374d5d16bcd and tries to read /usr/lib/Inventor/SceneViewer which is _not_ available. So GDB fails to find the binary.

As I mentioned in the find-missing-debuginfo script header, this issue can be solved for all packages at once in rpm-build and gdb - see rhbz#641377.

Is this explanation understandable?

Karel


More information about the devel mailing list