postfix-dbgsym package has empty .debug files; debian/rules dh_strip confusion
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://
100 /var/lib/
3.3.0-1 500
500 http://
# 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://
100 /var/lib/
3.3.0-1 500
500 http://
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:/
However, when I try to attach gdb with gdb -p <pid>, I get:
'Reading symbols from /usr/lib/
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/
/usr/lib/
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/
Changed in postfix (Ubuntu): | |
status: | Confirmed → Fix Released |
This is fixed in 3.3.2-1, which is in disco.
Scott K