[ruby-core:68912] [Ruby trunk - Bug #10942] Suspected memory leak

From: eugene@...
Date: 2015-04-17 00:39:20 UTC
List: ruby-core #68912
Issue #10942 has been updated by Eugene Pimenov.


I reduced the test case to

~~~
require 'stringio'
require 'securerandom'

loop do
  for i in 1..100
    StringIO.new << SecureRandom.hex
  end
  GC.start
end
~~~

Can reproduce on trunk.

----------------------------------------
Bug #10942: Suspected memory leak
https://bugs.ruby-lang.org/issues/10942#change-52177

* Author: Johan Lundahl
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
There seems to be memory leaking when calling Aws::SQS::Client#receive_message in Ruby 2.2.0 and 2.2.1. I am not very good at memory/object allocation profiling in Ruby, but I know for sure that there must be some issue, because my SQS workers run out of memory every day.

See gist https://gist.github.com/quezacoatl/7657854f371edcb5d8e6 to reproduce. I've added output.txt for my output for different Ruby versions. Ruby 2.1.2 works fine. I'm sorry that I cannot pinpoint the exact issue. Perhaps somebody with better profiling skills can do this?



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next