#416 Merged at c972936
Repository
Branch
flood_testing
Repository
Branch
ign-transport7
Author
  1. Nate Koenig
Reviewers
Description

I found that in certain circumstances, ign-transport can lose messages. I modified the bench example to demonstrate the problem.

I believe the underlying problem are message buffers in zeromq. See the fix in NodeShare.cc, and zeromq documentation here](http://api.zeromq.org/4-2:zmq-setsockopt).

To Test

  1. In terminal 1
./bench -p -t -f 10
  1. In terminal 2
./bench -r -t -f 10

If you comment out the changes in NodeShared.cc, then the bench test will hang forever because messages are lost.

  • Commit status

Comments (2)

  1. Carlos Agüero

    This is a problem without a good solution for everyone. If the buffer is too small we can loose messages but if the buffer is too big (or infinite), we can leak forever and run out of memory. I’m OK with this solution because I understand it solves some issue but I think we should expose this functionality to the user as an option in the same way ZeroMQ does. We don’t have to do it in this PR, just a suggestion. The example works for me with the patch.