Re: Memory leak

I have an unusual configuration: on my headless gateway there is bitcoind running and on my desktop standart bitcoin is running (both Linux OpenSuSE, gateway 11.1, desktop 11.3, bitcoin 0.3.12 both). TCP port 8333 forwarded on gateway to the desktop (so gateway client can’t has incoming connections). I don’t know why but when I start desktop client after gateway’s one the desktop client can’t connect and flickers between 0 and 2 connections for a long time. Eventually it may connect but while it can’t the memory leaks badly. About 200Kb/sec (each 0-2 change). It may not be noticed if the client connects instantly but in my case it doesn’t. If I start first the desktop and then the headless client (after the desktop one has connected) everything is fine and no leaks (or they are little enough). I guess there is unfreed memory in bootstrap function or somewhere in the bootstrap process.

Bouncing between 0 and 2 connections could be if it’s connecting to itself.  Are you using the “-connect” switch?

Did you compile it or is this a release build, and what version?

I’m not sure how the 200Kb/sec, since it waits at least a half second between connection attempts.  How fast is it flickering between 0 and 2 connections?  Faster than twice a second?

The wait function on linux is:

inline void Sleep(int64 n)
{
boost::thread::sleep(boost::get_system_time() + boost::posix_time::milliseconds(n));
}

If that doesn’t work right, then it would be possible for it to spin through the loop as fast as it can.

8,399 total views, 1 views today

https://bitcointalk.org/index.php?topic=1023.msg13201#msg13201