deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Deltacloud API and memory leaking under 1.9.3
Date Thu, 18 Oct 2012 16:29:13 GMT
Hi,

I spent last 2 days trying to nail down the issue with memory leaking of DC under
ruby 1.9.3 [1]. After two days I found what causes it:

mock_client.rb:59

    def load_collection(collection, id)
      fname = file(collection, id)
      begin
        YAML.load(File.read(fname))
      rescue Errno::ENOENT
        nil
      end
    end


This will cause Ruby 1.9.3 to LEAK memory. More specific, it is YAML.load.
And now...how to fix it? Hold your breath....

YAML.load_file(fname)

/me facepalm.

I'll send patches for this tomorrow. Also I'll make sure we don't use this
YAML loading anywhere else and fill a bug for YAML.

Have a nice day!

[1] https://issues.apache.org/jira/browse/DTACLOUD-347

  -- Michal


Michal Fojtik
http://deltacloud.org
mfojtik@redhat.com




Mime
View raw message