postfix-dbgsym package has empty .debug files; debian/rules dh_strip confusion

Bug #1812571 reported by Free Yorp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postfix (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
# lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04

2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
# apt-cache policy postfix
postfix:
  Installed: 3.3.0-1ubuntu0.2
  Candidate: 3.3.0-1ubuntu0.2
  Version table:
 *** 3.3.0-1ubuntu0.2 500
        500 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.3.0-1 500
        500 http://azure.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
# apt-cache policy postfix-dbgsym
postfix-dbgsym:
  Installed: 3.3.0-1ubuntu0.2
  Candidate: 3.3.0-1ubuntu0.2
  Version table:
 *** 3.3.0-1ubuntu0.2 500
        500 http://ddebs.ubuntu.com bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.3.0-1 500
        500 http://ddebs.ubuntu.com bionic/main amd64 Packages

3) What you expected to happen

Installing postfix-dbgsym and attaching gdb to postfix loads a debugging symbol file and debugging symbols are found from it

4) What happened instead

Installing postfix-dbgsym and attaching gdb to postfix loads a debugging symbol file but debugging symbols are not found from it

I followed the instructions at https://wiki.ubuntu.com/Debug%20Symbol%20Packages and installed postfix-dbgsym.

However, when I try to attach gdb with gdb -p <pid>, I get:

'Reading symbols from /usr/lib/postfix/sbin/master...Reading symbols from /usr/lib/debug/.build-id/e0/c259ef26eda076310a6dd3eccb419ce8eb1c50.debug...(no debugging symbols found)...done.'

The .debug file in question does exist on the filesystem, and a quick dpkg -S shows that it was provided by the postfix-dbgsym package. All packages are up to date up to bionic-updates, and no processes on the system are running on outdated libraries (searching lsof for DEL).

Running objdump -g on /usr/lib/debug/.build-id/e0/c259ef26eda076310a6dd3eccb419ce8eb1c50.debug merely prints:

/usr/lib/debug/.build-id/e0/c259ef26eda076310a6dd3eccb419ce8eb1c50.debug: file format elf64-x86-64

Contents of the .eh_frame section:

00000000 ZERO terminator

The size of this .debug file is 14K; compare to the .debug file for libpthread.so.0, which was 2.3M and does provide quite a lot of output with objdump -g.

I'm struggling to get through the debian/rules file for postfix, but I can see that:
 - STRIP=y gets set depending on a test, and dh_strip -a runs if $(STRIP) is *empty* (see: [ -n "$(STRIP)" ] || dh_strip -a ).
 - The same test structure gets used for checking nostrip in args then setting STRIP=y, and for checking debug in args then setting DEBUG += -g. If said test means something like `word not in args`, then the DEBUG += -g seems like it's wrong; if it instead ends up meaning something like `word in args`, then the STRIP=y seems like it's wrong?

Manually forcing DEBUG to -g and STRIP to "" produces a set of packages with stripped binaries.
Manually forcing DEBUG to -g and STRIP to n gets me a set of packages with binaries including debugging info, which was enough to let me work around the problem.

I believe there is at least *something* wrong in the postfix/debian/rules file, but I'm not yet sure what a complete listing would be exactly, or even if it's the root cause, so to speak.

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 1812571] [NEW] postfix-dbgsym package has empty .debug files; debian/rules dh_strip confusion

This is fixed in 3.3.2-1, which is in disco.

Scott K

Revision history for this message
Karl Stenerud (kstenerud) wrote :

Confirmed this is an issue in bionic and cosmic, and is working in disco.

Changed in postfix (Ubuntu):
status: New → Confirmed
Changed in postfix (Ubuntu):
status: Confirmed → 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.