[MDEV-572] No debug symbols for Ubuntu packages Created: 2012-10-03 Updated: 2015-12-20 Resolved: 2015-01-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging |
| Affects Version/s: | 5.5.27 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Sergei Petrunia | Assignee: | Otto Kekäläinen |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | packaging | ||
| Environment: |
Ubuntu 12.04 Precise Pangolin, deb packages |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
MariaDB 12.04 packages install a stripped binary: /usr/sbin/mysqld: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x16b84c98034eb05e6b35fe977237b6fe7a40c11a, stripped I have downloaded/unpacked all the available .deb packages, and failed to find anything resembling debug symbols. |
| Comments |
| Comment by Sergei Petrunia [ 2012-10-03 ] | |||||||||||||||||||||||||||||||||||||
|
Looking at how .debs are made: http://buildbot.askmonty.org/buildbot/builders/kvm-deb-precise-amd64/builds/371/steps/compile/logs/stdio, one can see that
strip --remove-section=.comment --remove-section=.note debian/mariadb-server-core-5.5/usr/sbin/mysqld which looks like stripping the mysqld binary. Debug symbols are not saved anywhere. | |||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2012-10-03 ] | |||||||||||||||||||||||||||||||||||||
|
Note that debug symbols are huge. On my system: mysqld, stripped - 14M (4.5M gzipped) this means - debug symbols are 10x the stripped symbols, both in package size and size of the binary. On the other hand, we DO NEED debug info, at least for the mysqld binary. Maybe, we should have a separate -debuginfo package? (I think fedora has them for every rpm?) | |||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2012-10-03 ] | |||||||||||||||||||||||||||||||||||||
|
Just checked binaries for Fedora (file names like MariaDB-5.5.27-centos6-x86_64-server.rpm) - the binaries are not stripped. | |||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2012-10-03 ] | |||||||||||||||||||||||||||||||||||||
|
I've just checked few other random binaries from /usr/bin on hasky (Ubuntu) - they were all stripped. I suppose it's normal for this platform to install stripped binaries. And we should follow the distribution specific conventions. | |||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2012-10-03 ] | |||||||||||||||||||||||||||||||||||||
|
It is normal for distributions to install stripped binaries. I would argue, though, that MariaDB (and MySQL) are special. Community of /usr/bin/bash users does not develop tools like PMP. Community of MySQL users did invent that tool and is using it. | |||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2012-10-03 ] | |||||||||||||||||||||||||||||||||||||
|
Btw, debug builds for PostgreSQL are available: root@smalltoy2:~# apt-cache search postgresql-9.1 | |||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2012-10-03 ] | |||||||||||||||||||||||||||||||||||||
|
http://askubuntu.com/questions/53708/how-to-create-debuginfo-package | |||||||||||||||||||||||||||||||||||||
| Comment by Jean Weisbuch [ 2012-10-04 ] | |||||||||||||||||||||||||||||||||||||
|
Its the same for official MySQL packages on Debian Squeeze, no debugging symols and no -dbg package available. | |||||||||||||||||||||||||||||||||||||
| Comment by Rene Treffer [ 2013-06-26 ] | |||||||||||||||||||||||||||||||||||||
|
I'm hitting the same problem. Debug symbols are needed for profiling. I'll try to build from source to preserve the debug symbols. | |||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2013-06-26 ] | |||||||||||||||||||||||||||||||||||||
|
Hi, You can also try the binary tarball available at the downloads page. It shouldn't be stripped. | |||||||||||||||||||||||||||||||||||||
| Comment by Rene Treffer [ 2013-06-26 ] | |||||||||||||||||||||||||||||||||||||
|
Dislike. I prefer to install/uninstall via dpkg/apt. Anyway, building a dbg package is easy if you do not need it per lib/binary.
Will test the result .deb tomorrow. | |||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2013-09-03 ] | |||||||||||||||||||||||||||||||||||||
|
It works but I don't know if putting all debug symbols in one package is the right way. This is still much better than trying to do it yourself. with 10.0 replaced with 5.5: It creates mariadb-server-5.5-dbg which contains the debug Could use the --exclude argument to dh_strip to create separate debug packages and include this multiple times. Bit messy though. | |||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2013-09-03 ] | |||||||||||||||||||||||||||||||||||||
|
I think, having on debug symbols somewhere is better than not having them anywhere. I'm not sure whether there should be a single -dbg package or multiple. (If there are no other opinions, I would suggest that we start making a single -dbg package) | |||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2013-09-23 ] | |||||||||||||||||||||||||||||||||||||
|
> I think, having on debug symbols somewhere is better than not having them anywhere Totally agree. Attached patch is the same as the comments for mariadb-5.5 and includes adding -DCMAKE_BUILD_TYPE=Debug which may not be right for a general settings. The rest gives a useful debug package however. | |||||||||||||||||||||||||||||||||||||
| Comment by Torsten Krah [ 2013-11-18 ] | |||||||||||||||||||||||||||||||||||||
|
10.0 packages beta for Ubuntu Saucy does miss the dbg package too - its crashing for me at mysql_upgrade, fix privileges stage and without them, i am unable to provide a "good" bug report. | |||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2014-10-29 ] | |||||||||||||||||||||||||||||||||||||
|
I'd be really happy with any debug symbols in a single or multiple package. The lack of this, along with | |||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2014-10-29 ] | |||||||||||||||||||||||||||||||||||||
|
Looks like galera has done this: https://github.com/codership/galera/pull/116/files. otto are you able to help here? | |||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2014-10-29 ] | |||||||||||||||||||||||||||||||||||||
|
Yes, in Debian by default binaries are stripped. If will make the binaries much smaller and 99,999% of the time end-users don't need binaries with debug symbols. If debug versions are wanted, they are most often installed from a development repository and the packages are named This is not assigned to anybody so I'll assign it to myself so I'll remember to return to it later. | |||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2014-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 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/) Also it looks like this issue is a duplicate of https://mariadb.atlassian.net/browse/MDEV-658 (or the other way around, as 572 is older) | |||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2015-12-20 ] | |||||||||||||||||||||||||||||||||||||
|
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 |