GTSAM Debug Symbols

79 views
Skip to first unread message

Jay Elrod

unread,
Feb 15, 2023, 11:21:54 AM2/15/23
to gtsam users
Hi GTSAM users,

I am using GTSAM 4.1.1 on ARM64 (<a href="https://launchpad.net/~borglab/+archive/ubuntu/gtsam-release-4.1/+build/25484550">build</a>) and am trying to diagnose a segmentation fault that occurred deep in GTSAM ISAM2 code. The build log for this package indicates that CMAKE_BUILD_TYPE is RelWithDebInfo, but the package installed in my system via apt-get does not include any debugging symbols.

I have yet to successfully reproduce the exact binary with the debugging symbols on my machine. Is there a dbg version of this binary out there anywhere? If not, can it be generated from a slightly different version of this same build? Seems like if RelWithDebInfo is the build type during CMake invocation, the symbols should not be stripped off of the package.

Thanks
Jay

Dellaert, Frank

unread,
Feb 16, 2023, 3:25:26 PM2/16/23
to Jay Elrod, gtsam users

Hi Jay

Your best bet is probably check out 4.1.1. and compile from source with Debug?

Frank

--
You received this message because you are subscribed to the Google Groups "gtsam users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gtsam-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gtsam-users/ba58f975-2647-4e84-9ab6-46fae0a5fa1cn%40googlegroups.com.

Jay Elrod

unread,
Feb 16, 2023, 4:37:35 PM2/16/23
to gtsam users
Hi Frank,

Thanks for your reply!

That is exactly what I have been trying to do. Despite having pored over the PPA build log and meticulously matching every build configuration down to each compiler flag, the stack trace after having loaded the core dump does not match the stack trace from loading the shared library downloaded from release-4.1 PPA.

Thanks
Jay

José Luis Blanco-Claraco

unread,
Feb 16, 2023, 4:53:55 PM2/16/23
to Jay Elrod, gtsam users, Bernd Pfrommer
Hi,

Building and publishing debug symbol packages is actually automated in
PPA repos, but it was disabled for GTSAM PPAs.

I just enabled them for all repos under: https://launchpad.net/~borglab

After the next build is triggered, keep an eye on the list of packages
and you should see "*-dbgsym" packages, which you could "sudo apt
install" and afterwards gdb will know automatically about them when
loading the ".so".

@Bernd Pfrommer: Do you know any way to trigger a rebuild of all
packages uploaded to the PPA borglab/+archive/ubuntu/gtsam-release-4.1
? Re-running the GH action for it, maybe?

Cheers,
JL
> To view this discussion on the web visit https://groups.google.com/d/msgid/gtsam-users/8a5e28ab-8b63-41a6-8537-038be9027f26n%40googlegroups.com.



--

/**
* Jose Luis Blanco-Claraco
* Universidad de Almería - Departamento de Ingeniería
* [Homepage]( https://w3.ual.es/~jlblanco/ )
* [GH profile]( https://github.com/jlblancoc )
*/

Bernd Pfrommer

unread,
Feb 17, 2023, 8:06:35 AM2/17/23
to gtsam users
The PPA builds with debug symbols enabled failed. Somehow the packaging needs to change as well. I'll look into it.

Bernd Pfrommer

unread,
Feb 18, 2023, 5:43:29 PM2/18/23
to gtsam users
OK, succeeded now. Please try downloading the relevant ".ddeb" packages for your specific ubuntu distro from here:

José Luis Blanco-Claraco

unread,
Feb 18, 2023, 6:33:04 PM2/18/23
to Bernd Pfrommer, gtsam users
I found how to "teach" APT that the PPA also serves ".ddeb" debug
packages: one needs to add a second line with "main/debug" to the apt
source file.

Should this be added to the README somewhere?
@Bernd: Or this could be added to the "PPA description" text field?

Example:
===========================
$ cat /etc/apt/sources.list.d/borglab-ubuntu-gtsam-release-4_1-jammy.list
deb https://ppa.launchpadcontent.net/borglab/gtsam-release-4.1/ubuntu/
jammy main
deb https://ppa.launchpadcontent.net/borglab/gtsam-release-4.1/ubuntu/
jammy main/debug

$ sudo apt update
$ sudo apt install libgtsam4-dbgsym
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libgtsam4
The following NEW packages will be installed:
libgtsam4 libgtsam4-dbgsym
0 upgraded, 2 newly installed, 0 to remove and 14 not upgraded.
Need to get 121 MB of archives.
===========================

JL
> To view this discussion on the web visit https://groups.google.com/d/msgid/gtsam-users/b675c913-97fb-4354-9e70-d31043288043n%40googlegroups.com.

Jay Elrod

unread,
Feb 19, 2023, 11:28:51 AM2/19/23
to José Luis Blanco-Claraco, Bernd Pfrommer, gtsam users
Awesome, thank you! I will give it a shot with dbgsym!

Jay Elrod

unread,
Mar 22, 2023, 2:22:23 PM3/22/23
to gtsam users
Hi again,

Looks like the dbgsym builds for 4.1 were added for jammy distribution but maybe not focal? Can we do the same for focal as well?

Thanks!
Jay

Bernd Pfrommer

unread,
Mar 22, 2023, 5:16:50 PM3/22/23
to gtsam users
I managed to install the debug symbol package under focal on x86-64. Following @jlblanco's suggestion the process how to install the debug symbols is documented now in the package description:
https://launchpad.net/~borglab/+archive/ubuntu/gtsam-release-4.1

I suppose it works because in gdb I get what looks like symbol information:

Thread 1 "tagslam_node" received signal SIGINT, Interrupt.                                                
0x00007ffff6e7e8e9 in gtsam::BayesTreeCliqueBase<gtsam::ISAM2Clique, gtsam::GaussianFactorGraph>::deleteCachedShortcuts() () from /lib/x86_64-linux-gnu/libgtsam.so.4
(gdb) where                                                                                              
#0  0x00007ffff6e7e8e9 in gtsam::BayesTreeCliqueBase<gtsam::ISAM2Clique, gtsam::GaussianFactorGraph>::deleteCachedShortcuts() () from /lib/x86_64-linux-gnu/libgtsam.so.4
#1  0x00007ffff6e736b9 in gtsam::BayesTree<gtsam::ISAM2Clique>::removeTop(std::vector<unsigned long, tbb::tbb_allocator<unsigned long> > const&, gtsam::GaussianBayesNet*, gtsam::FastList<boost::shared_ptr<gtsam::ISAM2Clique> >*) () from /lib/x86_64-linux-gnu/libgtsam.so.4
#2  0x00007ffff6e606d5 in gtsam::ISAM2::recalculate(gtsam::ISAM2UpdateParams const&, gtsam::FastSet<unsigned long> const&, gtsam::ISAM2Result*) () from /lib/x86_64-linux-gnu/libgtsam.so.4
#3  0x00007ffff6e62165 in gtsam::ISAM2::update(gtsam::NonlinearFactorGraph const&, gtsam::Values const&, gtsam::ISAM2UpdateParams const&) () from /lib/x86_64-linux-gnu/libgtsam.so.4
#4  0x00007ffff6e60d16 in gtsam::ISAM2::update(gtsam::NonlinearFactorGraph const&, gtsam::Values const&, std::vector<unsigned long, tbb::tbb_allocator<unsigned long> > const&, boost::optional<gtsam::FastMap<unsigned long, int> > const&, boost::optional<gtsam::FastList<unsigned long> > const&, boost::optional<gtsam::FastList<unsigned long> > const&, bool) () from /lib/x86_64-linux-gnu/libgtsam.so.4

Reply all
Reply to author
Forward
Message has been deleted
0 new messages