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 摘要。