AIS-Bonn / AIS-Bonn/nimbro_network

Receiver node from "develop" branch dies due to accessing nullptr

未关闭
#17 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
156
派生
43
PR 合并指标
30 天内没有已合并 PR

描述

Hi @xqms

We've got an issue with the receiver node dying because of segfault (exit code `-11`) when using the **"develop" branch**.

@tomlankhorst and I tried to debug this issue and could get a backtrace using `gdb` (see end of the message). We were wondering if you could provide us with your feedback about this issue. This is our setup:

- a base station runs the receiver node
- an agent runs the sender node
- the agent sends both tcp (sporadic messages) and udp (images and tf) topics

When the agent goes out of connection range and comes back after some minutes, we often get the receiver node dying on the base station. We suspect that `Depacketizer::addPacket` is called asynchronously on the same object (for example when 2 UDP packets are received) and so `addPacket` is called twice. But if it's called async, then it will mess up because the value of the iterator will be changing.

Do you have any hint or suggest on how we could fix this issue?

Best,
Marco

Backtrace:
```
#0 0x00007ffff7d6ce72 in nimbro_topic_transport::Depacketizer::handleMessagePacket (this=0x7fffffffbfb0, it=
{id = 24190, complete = false, received_symbols = 10, packets = std::vector of length 10, capacity 10 = {std::shared_ptr (use count 1, weak count 0) = {get() = 0x7fffd48a92b0}, std::shared_ptr (use count 1, weak count 0) = {get() = 0x7fffd48b0120}, std::shared_ptr (use count 1, weak count 0) = {get() = 0x7fffd48b06f0}, std::shared_ptr (use count 1, weak count 0) = {get() = 0x7fffd48b0cc0}, std::shared_ptr (use count 2, weak count 0) = {get() = 0x7fffd48b1290}, std::shared_ptr (use count 1, weak count 0) = {get() = 0x7fffd48accd0}, std::shared_ptr (use count 1, weak count 0) = {get() = 0x7fffd48a9e50}, std::shared_ptr (use count 1, weak count 0) = {get() = 0x7fffd48a8140}, std::shared_ptr (empty) = {get() = 0x0}, std::shared_ptr (use count 1, weak count 0) = {get() = 0x7fffd48aefb0}}, decoder = std::shared_ptr (empty) = {get() = 0x0}}, packet=...) at /usr/include/c++/9/bits/shared_ptr_base.h:1020
#1 0x00007ffff7d6df79 in nimbro_topic_transport::Depacketizer::addPacket (this=0x7fffffffbfb0,
packet=std::shared_ptr (use count 2, weak count 0) = {...})
at /home/subt/catkin_ws/src/nimbro_network/nimbro_topic_transport/src/receiver/depacketizer.cpp:44
#2 0x00007ffff7d71432 in std::function const&)>::operator()(std::shared_ptr const&) const (__args#0=std::shared_ptr (use count 2, weak count 0) = {...},

```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。