Skip to content

Memory leak running RubyGems in separate runtimes in a loop #9187

Description

@headius

I'm noticing a lot of memory leaking when running the following looped benchmark of RubyGems booting:

jruby -Xparser.summary -Xparser.prism.wasm -e 'loop { t = Time.now; ruby = org.jruby.Ruby.newInstance; ruby.loadService.require("rubygems"); ruby.tearDown; $stderr.puts Time.now - t }'

This quickly goes up past 1GB heap on my machine and doesn't seem to slow down or respond to forced GCs.

When I looked into this in the past it seemed like the leak might be related to jruby-openssl and the BouncyCastle provide getting re-registered many times and never cleaned up, but a new analysis is needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions