build system strips binaries, so no debug symbol packages available

Bug #924002 reported by Leonardo Borda
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autofs5 (Ubuntu)
Fix Released
Medium
Unassigned
Declined for Natty by Marc Deslauriers
Oneiric
Won't Fix
Undecided
Vibhav Pant

Bug Description

Latest debug symbols for autofs5 (5.0.4-3.1ubuntu5.1) are not provided through ddebs.ubuntu.com.
Also when downloading the source packages and forcing debian packages to generate ddeb packages it does not generate symbols for /usr/sbin/automount which makes impossible to debug yp_lookup segfaults.

Leo

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: autofs5 5.0.4-3.1ubuntu5.2
ProcVersionSignature: Ubuntu 2.6.32-31.61-server 2.6.32.32+drm33.14
Uname: Linux 2.6.32-31-server x86_64
Architecture: amd64
Date: Mon Jan 30 17:43:04 2012
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: autofs5

Related branches

Revision history for this message
Leonardo Borda (lborda) wrote :
Revision history for this message
Dave Walker (davewalker) wrote :

Thanks for reporting this bug, i assume it is:
https://launchpad.net/ubuntu/+source/autofs5/5.0.4-3.1ubuntu5.1
(Released 2010-08-24)

Thanks.

Changed in autofs5 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Leonardo Borda (lborda) wrote :

Hi Dave,

Thanks !
You're correct. Also I believe the proposed packages are also affected.

Leonardo

Revision history for this message
Adam Stokes (adam-stokes) wrote :

Martin,

Subscribed you to this bug in hopes you may have a better understanding of why the dbg package isn't being built? This is an ongoing issue with several packages and probably needs to be brought up at the next UDS.

Thanks
Adam

Revision history for this message
Leonardo Borda (lborda) wrote :

Martin, Adam

FYI, afaik mysql packages also do not generate debug symbols for updated packages.

Leo

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

The build log says

dh_strip debug symbol extraction: ignored packages:
autofs5 is already stripped, ignoring
autofs5-ldap is already stripped, ignoring
autofs5-hesiod is already stripped, ignoring
autofs is already stripped, ignoring
autofs-ldap is already stripped, ignoring
autofs-hesiod is already stripped, ignoring

Apparently the binaries are already stripped during build:

gcc -s -lpthread -rdynamic -pie -o automount automount.o indirect.o direct.o spawn.o module.o mount.o lookup.o state.o flag.o ../lib/autofs.a -ldl -lpthread -lxml2
strip --strip-debug automount

The build system needs to be told to not do that. dh_strip will do it, and put the debug symbols into ddebs before. Many projects have an --enable-debug configure switch, or something similar.

summary: - [Lucid] dbg package symbols are not provided for latest autofs packages
+ build system strips binaries, so no debug symbol packages available
Revision history for this message
Adam Stokes (adam-stokes) wrote :

This patch puts all stripped executables and shared libraries into their relevant -dbg packages.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Wouldn't it be enough to just have this change?

- $(MAKE)
+ $(MAKE) DONTSTRIP=1

and then let the ddebs.ubuntu.com magic take over?

Changed in autofs5 (Ubuntu):
status: New → Incomplete
Revision history for this message
Chris Halse Rogers (raof) wrote :

Confirmed that just asking the build system to not strip the binaries results in the symbols being stripped into appropriate dbgsym packages. I've uploaded that change.

@Adam: Your debdiff would make a useful addition to the Debian packages, if they care about having debugging symbols.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autofs5 - 5.0.6-0ubuntu3

---------------
autofs5 (5.0.6-0ubuntu3) precise; urgency=low

  * debian/rules:
    - Don't strip symbols during the build; let dh_strip turn them into dbgsym
      packages instead. Thanks, Adam Stokes! (LP: #924002)
 -- Christopher James Halse Rogers <email address hidden> Fri, 17 Feb 2012 11:59:50 +1100

Changed in autofs5 (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Leonardo Borda (lborda) wrote :

@Chris,

Could you please confirm that automount.so is also created? In my tests with DONTSTRIP=1 locally on my box I noticed that automount.so debug symbols was not being created while the others were.

Leo

Revision history for this message
Leonardo Borda (lborda) wrote :

@Adam Stokes,

I've just build dbg packages using the provided patch and it does generate *some* of the debug packages although the file automount.so is not generated, which in my case is the target one that I am trying to get dbg messages from.
In anyway thanks for the patch. Would you be able to take a look at why automount.so is not being generated?

Here is the output of "sudo dpkg --contents autofs5-dbg_5.0.4-3.1ubuntu5.1_amd64.deb"

http://pastebin.com/9WakFFi2

Leo

Revision history for this message
Adam Stokes (adam-stokes) wrote :

Output of autofs5-dbgsym

dpkg -L autofs5-dbgsym
/.
/usr
/usr/lib
/usr/lib/debug
/usr/lib/debug/usr
/usr/lib/debug/usr/sbin

>> /usr/lib/debug/usr/sbin/automount

/usr/lib/debug/usr/lib
/usr/lib/debug/usr/lib/autofs
/usr/lib/debug/usr/lib/autofs/mount_ext2.so
/usr/lib/debug/usr/lib/autofs/lookup_file.so
/usr/lib/debug/usr/lib/autofs/lookup_program.so
/usr/lib/debug/usr/lib/autofs/mount_bind.so
/usr/lib/debug/usr/lib/autofs/lookup_userhome.so
/usr/lib/debug/usr/lib/autofs/lookup_multi.so
/usr/lib/debug/usr/lib/autofs/lookup_hosts.so
/usr/lib/debug/usr/lib/autofs/lookup_yp.so
/usr/lib/debug/usr/lib/autofs/mount_changer.so
/usr/lib/debug/usr/lib/autofs/mount_afs.so
/usr/lib/debug/usr/lib/autofs/lookup_nisplus.so
/usr/lib/debug/usr/lib/autofs/mount_autofs.so
/usr/lib/debug/usr/lib/autofs/mount_generic.so
/usr/lib/debug/usr/lib/autofs/mount_nfs.so
/usr/lib/debug/usr/lib/autofs/parse_sun.so

What is it you are missing exactly?

Thanks
Adam

Revision history for this message
Leonardo Borda (lborda) wrote :

this is all good! thanks for the patch

Revision history for this message
Vibhav Pant (vibhavp) wrote :
Changed in autofs5 (Ubuntu Oneiric):
assignee: nobody → Vibhav Pant (vibhavp)
status: New → In Progress
Revision history for this message
Leonardo Borda (lborda) wrote :

@Vibhav Pant

Can we also have this for natty? I believe there isn't much to change in the patch.
I would be interested in having this on Natty since the issue we're experiencing is on Natty and it's the only way of catching the error with an automount issue.

Leonardo

Revision history for this message
Vibhav Pant (vibhavp) wrote :

Hi Leonardo,
Actually there a upload for autofs5 waiting to be verified, let it get verified first then I prepare a patch for it.

Revision history for this message
Chris J Arges (arges) wrote :

Here is the autofs5 patch for natty to enable debug symbols.

Revision history for this message
Vibhav Pant (vibhavp) wrote :
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for the debdiffs.

I don't believe this satisfies the SRU criteria for natty and oneiric. There is no good reason to push updated packages for all our users just to get debugging symbols.

If you are attempting to debug natty or oneiric, please use a locally built package with the patch. Precise, the latest LTS release, already has this fixed.

I am going to NACK the debdiffs and mark Oneiric as "Won't fix".

Changed in autofs5 (Ubuntu Oneiric):
status: In Progress → Won't Fix
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.