which looks like stripping the mysqld binary. Debug symbols are not saved anywhere.
Sergei Petrunia
added a comment - 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
they are made with "bakery" (and not CMake's CPack)
there is a line there:
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.
mysqld, stripped - 14M (4.5M gzipped)
mysqld, not stripped - 140M (49M gzipped)
debug symbols only - 126M (45M 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?)
Sergei Petrunia
added a comment - Note that debug symbols are huge. On my system:
mysqld, stripped - 14M (4.5M gzipped)
mysqld, not stripped - 140M (49M gzipped)
debug symbols only - 126M (45M 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?)
Just checked binaries for Fedora (file names like MariaDB-5.5.27-centos6-x86_64-server.rpm) - the binaries are not stripped.
Sergei Petrunia
added a comment - Just checked binaries for Fedora (file names like MariaDB-5.5.27-centos6-x86_64-server.rpm) - the binaries are not stripped.
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.
Sergei Golubchik
added a comment - 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.
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.
Sergei Petrunia
added a comment - 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.
I'm hitting the same problem. Debug symbols are needed for profiling. I'll try to build from source to preserve the debug symbols.
Rene Treffer
added a comment - I'm hitting the same problem. Debug symbols are needed for profiling. I'll try to build from source to preserve the debug symbols.
+ dh_strip -a --dbg-package=mariadb-server-10.0-dbg
dh_link -a # .so muss nach .so.1.2.3 installier werden!
dh_compress -a
dh_fixperms -a
Will test the result .deb tomorrow.
Rene Treffer
added a comment - 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.
=== modified file 'debian/dist/Ubuntu/control'
--- debian/dist/Ubuntu/control 2013-06-06 19:32:29 +0000
+++ debian/dist/Ubuntu/control 2013-06-26 13:45:22 +0000
@@ -195,6 +195,19 @@
.
This package includes the server binaries.
+Package: mariadb-server-10.0-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends: mariadb-server-10.0 (= ${binary:Version}), mariadb-server-core-10.0 (= ${binary:Version})
+Description: Debug symbols for the MariaDB database server
+ MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MariaDB are speed, robustness and
+ ease of use.
+ .
+ This package includes the debug symbols.
+
Package: mariadb-server
Section: database
Architecture: all
=== modified file 'debian/dist/Ubuntu/rules'
--- debian/dist/Ubuntu/rules 2013-01-31 08:48:19 +0000
+++ debian/dist/Ubuntu/rules 2013-06-26 13:55:09 +0000
@@ -252,7 +252,7 @@
dh_installinfo -a
dh_installlogcheck -a
dh_installchangelogs -a
- dh_strip -a
+ dh_strip -a --dbg-package=mariadb-server-10.0-dbg
dh_link -a # .so muss nach .so.1.2.3 installier werden!
dh_compress -a
dh_fixperms -a
Will test the result .deb tomorrow.
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
symbols for all of the packages libmariadbclient18, mariadb-client-5.5, mariadb-client-core-5.5, mariadb-server-5.5 and mariadb-server-core-5.5
Could use the --exclude argument to dh_strip to create separate debug packages and include this multiple times. Bit messy though.
Daniel Black
added a comment - 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
symbols for all of the packages libmariadbclient18, mariadb-client-5.5, mariadb-client-core-5.5, mariadb-server-5.5 and mariadb-server-core-5.5
Could use the --exclude argument to dh_strip to create separate debug packages and include this multiple times. Bit messy though.
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)
Sergei Petrunia
added a comment - 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)
> 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.
Daniel Black
added a comment - > 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.
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.
Torsten Krah
added a comment - 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.
I'd be really happy with any debug symbols in a single or multiple package.
The lack of this, along with MDEV-6367, is making it hard to make debug builds in a reasonable time and this that is stopping me from getting essential information about a memory leak on MDEV-6300.
Daniel Black
added a comment - I'd be really happy with any debug symbols in a single or multiple package.
The lack of this, along with MDEV-6367 , is making it hard to make debug builds in a reasonable time and this that is stopping me from getting essential information about a memory leak on MDEV-6300 .
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 dbg. For example I've done galera-dbg and I can do mariadb-server(5.5/10.0)-dbg too, but right now I don't have any extra time on my hands.
This is not assigned to anybody so I'll assign it to myself so I'll remember to return to it later.
Otto Kekäläinen
added a comment - 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 dbg. For example I've done galera-dbg and I can do mariadb-server (5.5/10.0)-dbg too, but right now I don't have any extra time on my hands.
This is not assigned to anybody so I'll assign it to myself so I'll remember to return to it later.
Otto Kekäläinen
added a comment - 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)
Otto Kekäläinen
added a comment - 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
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.