[MDEV-658] LP:842688 - Ubuntu and packages don't contain debug info Created: 2011-09-06 Updated: 2017-10-11 Resolved: 2017-10-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging, Platform Debian |
| Affects Version/s: | 5.1.67, 5.2.14, 5.3.12, 5.5.39, 10.0.14 |
| Fix Version/s: | 10.0.30, 10.1.22, 10.2.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Daniel Bartholomew |
| Resolution: | Fixed | Votes: | 3 |
| Labels: | Launchpad, contribution, debug-info, foundation | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
I unpacked all .deb files that were built for karmic_amd64 platform (just picked one at random), and for mysqld binary the archives have: ./usr/sbin/mysqld: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), for GNU/Linux 2.6.15, stripped and no debuginfo file. It is bad that we are not shipping debug information - if we're reported crashes we won't be able to fully analyze them. |
| Comments |
| Comment by Rasmus Johansson (Inactive) [ 2011-11-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Launchpad bug id: 842688 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-10-09 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can see that the binaries in the packages from Ubuntu repo (e.g. 5.5.39 for Trusty) are also stripped, so I start wondering if there is some kind of policy that we've been following even though nobody remembers it. Assigning to otto to comment and decide whether we can have debug info, after all. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-10-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Lack of debug symbols in the regular package indeed looks like it's an accepted standard. However, other software has separate packages that have binaries with debug info. For example:
and so forth. It's very widely used, I assume there is a standard convention about what one can expect from the mariadb-server-dbg package. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-10-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I also recall packages that had just debugging info (as opposed to having unstripped binaries, like the above examples do), but maybe it was in an RPM-based distribution. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2014-12-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
To recap: In Debian and Ubuntu normal packages are not supposed to contain debug symbols, they are stripped when the binary packages are created. Ubuntu however provides automatically a facility that has the debug symbols, so that users can install them and get better stack traces. See details at https://wiki.ubuntu.com/DebuggingProgramCrash#Debug_Symbol_Packages (and examples at http://ddebs.ubuntu.com/pool/universe/m/mariadb-10.0/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2015-02-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
psergey Did you notice my comment above? Can we close this issue with the remark that debug info can be found in separate packages and the main packages will not include them, now nor in the future? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-02-10 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
otto, http://ddebs.ubuntu.com/pool/universe/m/mariadb-10.0/ looks like exactly what I wanted. I also see http://ddebs.ubuntu.com/pool/universe/m/mariadb-5.5/ , which has debug info for the several recent 5.5 versions. But where can I find debug symbols for the binaries that I get from mariadb.org, for example from here: I assume ddebs.ubuntu.com has debug info for Ubuntu's packages which are generally different? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2015-02-10 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
AFAIK the mariadb.org repositories don't have debug builds. I don't maintain the mariadb.org repos, but I think they are simply the ouput of downloading the source and running ./debian/autobake-deb.sh. You could try building debs yourself with a version where the rules file has a custom override_dh_strip like done in https://github.com/ottok/galera/blob/3.x/debian/rules Unfortunately I don't have time right now to create debug version stuff for mariadb.org repos. There are more urgent stuff in packaging right now, like for example to merge upstream the whole new Debian packaging done in the latest 1-2 years. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2015-12-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
In Debian and Ubuntu normal packages are not supposed to contain debug symbols, they are stipped when the binary packages are created. Ubuntu provides automatically a facility that has the debug symbols, so that users can install them and get better stack traces. See details at https://wiki.ubuntu.com/DebuggingProgramCrash#Debug_Symbol_Packages (and examples at http://ddebs.ubuntu.com/pool/universe/m/mariadb-10.0/) Since December 2015 Debian also generates automatic debug symbol packages, see e.g. http://snapshot.debian.org/package/mariadb-10.0/10.0.22-6/#mariadb-server-10.0-dbgsym_10.0.22-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2016-11-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Both Ubuntu and Debian have been shipping debug symbols for a while. This issue is no longer relevant. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-02-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
> Both Ubuntu and Debian have been shipping debug symbols for a while. Good for Debian and Ubuntu! As psergey indicated MariaDB repos don't contain debug symbols. This is impediment in every jira issue with a backtrace and insufficient information to solve it (like I noticed in 10.2 there is no longer an explicit dh_strip in debian/rules which looking in the archive http://archive.mariadb.org/mariadb-10.2.4/repo/ubuntu/pool/main/m/mariadb-10.2/ this isn't sufficient for generation. As per https://wiki.debian.org/AutomaticDebugPackages it appears the debian/control needs debhelper (>= 9.20160114) (and obviously this installed on buildbot slaves). Perhaps its something in the build scripts dbart that is preventing the generation or distribution of dbgsym packages? Seems distros take the approach not to distribute these onto all the mirrors and mariadb doing this might be prudent also. Having a 10.0, 10.1 solution would be valuable to developers too. For Ubuntu is the package pkg-create-dbgsym required? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2017-03-08 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
When I make my own builds for example on 10.1, then dpkg-buildpackage automatically also generates debug symbol packages. See for example at the dbgsym files at http://labs.seravo.fi/~otto/debian/mariadb-10.1-sid-amd64/?C=M;O=A I haven't done anything special. This seems to be a default setting in recent Debian/Ubuntu versions. Maybe it is just a matter of reconfiguring the buildbot scripts to copy all *.deb files to the repo server, including the dbgsym ones? dbart elenst ? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-03-09 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I could be wrong but is debian/autobake.sh used? otto What version of debhelper do you have? I see stable isn't at debhelper (>= 9.20160114) which https://wiki.debian.org/AutomaticDebugPackages which seem to be the required. I've successfully installed debhelper (and dh-systemd) from jessie-backports which might be required. I tried dpkg-buildpackage in a x86_64 Debian docker container which didn't generate the dbgsym packages (on 10.2 branch at commit 2bca41265c802dc9a3e8852bb2b3cda720a5d44a).
10.1
With 10.1 I also tried changed debian/compat to 9 and 10 without any generation of debug symbols. Trying your tree with no debug syms.
So I'm still at a loss as to how to generate it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2017-03-10 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Looking at my own build array at http://labs.seravo.fi/~otto/debian/ it seems that the dbgsym.deb packages are built only when the build runs in the sid chroot, so it seems to be require that a recent enough dpkg or some other build tool is present. Your note about debhelper (>= 9.20160114) is probably the right conclusion. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-03-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ok got it going. Pulling in debhelper from sid pulled in liblzma of a different ABI version - so not ideal. So here's a version that worked for mariadb-10.1 in Debian stable.
Required changes:
Build infrastructure:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-03-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
For Ubuntu (tested on 16.04), MariaDB-10.1 ref: ubuntu-docker-mariadb-build-with-debug.txt attachment Required changes:
Build infrastructure:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-03-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ubuntu-16.04 with mariadb-5.5
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2017-03-15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I've done some testing with several of our builders in buildbot, and I'm not convinced `cat 9 > debian/compat` is needed. On our Xenial, Stretch, and Yakkety builders all I need to do is `export DH_BUILD_DDEBS=1` prior to running debian/autobake.sh and I get dbgsym .deb files. On our Trusty builder I can get it to create dbgsym .ddeb files (not .deb files) if I first install pkg-create-dbgsym and then do the export and autobake. The Jessie builder is giving me trouble, it is so far refusing to create dbgsym .deb files, even after installing debhelper from jessie-backports like you suggest. And doing `cat 9 > debian/compat` doesn't change anything, it still doesn't create dbgsym .deb files. I'll have to do some more digging to see if I can find out why. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-03-15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
On Jessie - look in the /usr/bin/dh_strip to see if there is an explicit disable. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-03-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
otto, you now have PR#336 assigned, please review. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2017-03-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
danblack: I took a look at the differences between the dh_strip in stretch (version 0.031-1) and the version currently in jessie-backports (version 0.031-1~bpo8+1) and yes, there is one difference:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-03-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
dbart, yes that would be the difference I mentioned in (3.) here https://jira.mariadb.org/browse/MDEV-658?focusedCommentId=92965&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-92965 . I couldn't see how the dpkg-dev versioning had an effect on this. So have you all the information needed for debug packages on Debian and Ubuntu? Although you observed compat 9 wasn't required for operation did you see added compression of the debug package as a result of it (https://www.mankier.com/7/debhelper#Compatibility_Levels)? Where filenames in the debug packages different? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-06-18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
So 5.5 has no debug syms. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2017-06-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
FYI: https://www.debian.org/releases/stable/amd64/release-notes/ch-whats-new.en.html#debug-archive | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-06-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks otto, will use that in the next updated of the KB related to debugging. |