gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.19k stars 480 forks source link

gazebo9: segfault after running some time when spawning and deleting objects #2860

Open dHonerkamp opened 4 years ago

dHonerkamp commented 4 years ago

Hi, I am running repeated experiments in Gazebo. For this I launch gazebo and spawn the PR2 robot. I then use the spawn_sdf_model, delete_model and set_model_state services to spawn and delete objects to interact with. Unfortunately I continue to run into random segfaults after some time. This only seems to happen in experiments in which I spawn and delete objects, though most of the time not at the same moment I am doing that but rather at a random point during the experiment.

I also made sure that object cannot get spawned in invalid positions.

I am using gazebo9 built from source with ros-melodic on ubuntu 18.04.

gdb gives me the following output:

Thread 42 "gzserver" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff64bf6700 (LWP 28272)]
0x00007ffff45d1dd2 in sdf::Element::Clone() const () from /usr/lib/x86_64-linux-gnu/libsdformat.so.6

(gdb) bt full
#0  0x00007ffff45d1dd2 in sdf::Element::Clone() const () at /usr/lib/x86_64-linux-gnu/libsdformat.so.6
#1  0x00007ffff55568f9 in gazebo::physics::Joint::Load(boost::shared_ptr<gazebo::physics::Link>, boost::shared_ptr<gazebo::physics::Link>, ignition::math::v4::Pose3<double> const&) () at /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.9
#2  0x00007ffff5544127 in  () at /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.9
#3  0x00007ffff55448f0 in  () at /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.9
#4  0x00007ffff55f38e1 in  () at /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.9
#5  0x00007ffff55e0267 in gazebo::physics::World::Update() () at /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.9
#6  0x00007ffff55eba1b in gazebo::physics::World::Step() () at /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.9
#7  0x00007ffff55ebe6d in gazebo::physics::World::RunLoop() () at /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.9
#8  0x00007ffff696e6df in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x00007ffff590c6db in start_thread (arg=0x7fff64bf6700) at pthread_create.c:463
        pd = 0x7fff64bf6700
        now = <optimized out>
        unwind_buf =
              {cancel_jmp_buf = {{jmp_buf = {140734883653376, 4161614831378250683, 140734883646720, 0, 93825020637472, 140737488332192, -4161378981283873861, -4161627861548516421}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#10 0x00007ffff63c9a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Any help is much appreciated!

PauloSilva98 commented 3 years ago

Hi there, @dHonerkamp, did you ever find a fix to this problem?

dHonerkamp commented 3 years ago

I'm afraid not