Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mavconn transmission hangs on high packet count #72

Closed
2 tasks done
vooon opened this issue Jul 31, 2014 · 10 comments
Closed
2 tasks done

mavconn transmission hangs on high packet count #72

vooon opened this issue Jul 31, 2014 · 10 comments
Labels
Milestone

Comments

@vooon
Copy link
Member

vooon commented Jul 31, 2014

When i start debug image_pub (extras) plugin i build that chain:

uvc_camera -ros-> gcs_image_bridge -mavlink-> mavros

rosrun uvc_camera uvc_camera_node image_raw:=/mavlink/gcs_image
rosrun mavros_extras gcs_image_bridge _gcs_url:=tcp-l://
rosrun mavros mavros_node _fcu_url:=tcp:// _gcs_url:='' /mavlink/to:=/mav1t /mavlink/from:=/mav1f

Connection done, but no data transfers until mavros sends some data (e.g. mavsafety arm). After that it works some time and hangs again.

I also tried this with UDP (udp://@localhost & udp://:14550@) and serial (using socat PTY PTY), and it breaks with same symptoms.

My guesses:

  1. Improper use of libev (strace shows EPOLLOUT state on socket)
  • Check libev usage
  • Try do same with mavconn 0.6 (write simple test)
@vooon vooon added this to the Version 0.7.0 milestone Jul 31, 2014
@vooon vooon added the bug label Jul 31, 2014
vooon added a commit that referenced this issue Jul 31, 2014
vooon added a commit that referenced this issue Jul 31, 2014
@vooon
Copy link
Member Author

vooon commented Jul 31, 2014

Checked 0.6, it works fine. While same test with newer library hangs.

@vooon
Copy link
Member Author

vooon commented Jul 31, 2014

I can't find why it don't work. I think better that i can do is return to boost asio, but with new url and buffer features.
And limit it usage in mavconn only.

vooon added a commit that referenced this issue Aug 1, 2014
Also starting to change boost threads and mutexes to C++11.
Issue #72.
vooon added a commit that referenced this issue Aug 1, 2014
vooon added a commit that referenced this issue Aug 1, 2014
vooon added a commit that referenced this issue Aug 1, 2014
Also it disables MAVConnTCPServer before i rewrite it.
Issue #72.
vooon added a commit that referenced this issue Aug 1, 2014
vooon added a commit that referenced this issue Aug 1, 2014
vooon added a commit that referenced this issue Aug 1, 2014
I will use C++11 standard libs.
Issue #72.
@vooon
Copy link
Member Author

vooon commented Aug 1, 2014

I decide return to ASIO.

  • serial
  • udp
  • tcp
  • tcp-l

@TSC21
Copy link
Member

TSC21 commented Aug 1, 2014

Seems a good option to me 👍

@vooon
Copy link
Member Author

vooon commented Aug 1, 2014

Get some errors with tcp-l. Also unit test get segfault on buildfarm.

@TSC21
Copy link
Member

TSC21 commented Aug 1, 2014

Yep seems to be #74 related.

vooon added a commit that referenced this issue Aug 1, 2014
@vooon
Copy link
Member Author

vooon commented Aug 1, 2014

@TSC21 Yep, its related.

@vooon
Copy link
Member Author

vooon commented Aug 3, 2014

TCP-L: don't send data back!
UDP: fails with std::system_error: Resource deadlock avoide.

vooon added a commit that referenced this issue Aug 4, 2014
vooon added a commit that referenced this issue Aug 4, 2014
vooon added a commit that referenced this issue Aug 4, 2014
Also use tx state flag, improve error messages and move io post out of
critical section.

Issue #72.
@vooon
Copy link
Member Author

vooon commented Aug 4, 2014

The work almost done, but i get strange error pure virtual method called.

vooon added a commit that referenced this issue Aug 4, 2014
Also removed tcp client deletion on close, heisenbug here.
Issue #72.
vooon added a commit that referenced this issue Aug 4, 2014
@vooon
Copy link
Member Author

vooon commented Aug 5, 2014

Seems that now it works. But i still don't know the source of pure virtual method called.

I close this global issue.

@vooon vooon closed this as completed Aug 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants