holibert / brown-ros-pkg

Automatically exported from code.google.com/p/brown-ros-pkg
0 stars 0 forks source link

Rosbridge memory leak when closing a socket without unsubscribing #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start rosbridge
2. Connect and subscribe to a topic (in my case /stereo/left/image/compressed)
3. Close the application that was connected to rosbridge without unsubscribing

This is rosbridge output:

Connection from 10.68.1.131:51067
2 concurrent connections.

------
raw

------
raw socket
------

subscribing to: /stereo/left/image/compressed
closed 9
Socket did not close smoothly.

From the moment the socket is closed the memory usage starts growing at a rate 
of 10MB per minute. Maybe it is related to the bandwidth of topic it was 
subscribed, my wild guess would be that it is storing the messages of the image 
topic.

Anyway, I'd try to unsubscribe before shutting down the application, but I 
can't guarantee that the application won't crash or that it will go out of wifi 
range.

The memory leak goes on forever. I've had it grow to 1.5GB of RAM.

Using Ubuntu 10.04 and latest rosbridge version.

Original issue reported on code.google.com by lopez1...@gmail.com on 14 Feb 2012 at 9:54

GoogleCodeExporter commented 9 years ago
I'm working on a fix for this and should have something in the next few days.

Original comment by trevor...@gmail.com on 20 Feb 2012 at 9:45