-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Memory leak? #61
Comments
Does the growth ever stop? If you run GC.start after each iteration does it make a difference? On Tue, May 27, 2014 at 7:00 PM, Masanori Tanaka notifications@github.com
|
Yes, the growth itself stopped after aborting the loop. I tried GC.start after loop stopped, but nothing changed on memory use. |
Can you put the GC.start inside the loop? On Tue, May 27, 2014 at 7:10 PM, Masanori Tanaka notifications@github.com
|
Thanks, eric. I have tried the following:
The memory growth got very slow than before! But it was increasing slightly yet, and the memory use remained after aborting the loop. Hmm... |
For more investigation, I sampled proc_map of the irb process (before and after running iteration) with GDB on my Linux box and got a difference: $ diff proc_map_before.txt proc_map_after.txt
127c127
< 7f62da9e5000-7f62dbddf000 rw-p 00000000 00:00 0 [heap]
---
> 7f62da9e5000-7f62dc072000 rw-p 00000000 00:00 0 [heap] Only heap memory area has been widen. |
Additionally, I did profiling by looping 100000 times with GC::Profiler:
|
Does this have something to do with the problem? Memory leaks in zoo_multi API Above was fixed in Zookeeper Client library version 3.4.6. |
I applied the ZOOKEEPER-1562 patch, built gem and used it on my forked develop branch.
When I inspect heap memory, it seems Zookeeper::Continuation objects remain after exiting from loop block. Would it be a cause to release objects by running GC.start within loop block? |
I wrote a snippet with zookeeper gem, and got some kind of memory leak problem.
Ruby version:
Gem version:
Zookeeper server installed with Homebrew:
At this time, I see this irb process uses 12.4MB memory with Activity Monitor on OS X.
And I run the following code:
Then the memory size rises and rises to 17.1MB beyond 12.4MB while running.
I stop this infinite loop with Ctrl+C after about 10 second from starting, but Activity Monitor keeps showing 17.1MB.
Is this some memory leak? Or another reason?
The text was updated successfully, but these errors were encountered: