rcsoccersim / rcssserver

The RoboCup Soccer Simulator Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simulator crashes with high frequency short-lived UDP client

FelipeCoimbra opened this issue · comments

I did some experiments this week with an UDP client. It connects with the init message (init team (version 16)), sends a message (synch_see)(ear (off opp))(clang (ver 7 8)) and then loops N times receiving messages with a timeout of T miliseconds.

I observed that, for some reason, when T and N are sufficiently low the simulator sometimes crashes with a segfault after the client finishes.

Specially, using T= 2ms:

  • When N = 37, in a sample of 10 tries (a try is an initialization of the server with rcssserver followed by the start of the client) I have obtained 10/10 crashes. When N = 38 this statistic becomes only 3/10. These 10 tries don't have much statistical confidence but you do observe a big change in practice.
  • When the simulator doesn't segfault in the end of the experiment it has issued a (warning message_not_null_terminated) to the client and every time it does segfault, I can't find this message among the ones received.

Seems like if I do receive the warning message all is fine but if the client disconnects before receiving it, the server crashes. What's going on?