Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1602

[Ruby] Possible memory leak in Ruby bindings?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • proton-c-0.17.0, proton-c-future
    • proton-c-0.18.0
    • ruby-binding
    • None
    • Centos 7

    Description

      While running integration tests we noticed that Ruby bindings utilise 100% CPU core and that memory consumption increases until the machine runs out of memory. The same Python app does not have this effect - low CPU utilisation.

      I've used 0.17 version of qpid-proton-c from EPEL, as well as the current master. Ruby bindings in both cases built from the current master.

      We are using the Container, i.e.

      Qpid::Proton::Reactor::Container.new(...).run
      

      This is very easily reproduced by the simple change in one of the tests:

      diff --git a/proton-c/bindings/ruby/tests/test_container.rb b/proton-c/bindings/ruby/tests/test_container.rb
      index d5b5c9a..455d63e 100644
      --- a/proton-c/bindings/ruby/tests/test_container.rb
      +++ b/proton-c/bindings/ruby/tests/test_container.rb
      @@ -80,7 +80,8 @@ class ContainerSASLTest < Minitest::Test
      
           def on_connection_opened(event)
             super
      -      event.container.stop
      +      puts "keeping connection opened"
      +#      event.container.stop
           end
         end
      

      The change keeps the container opened. Looking at top, the CPU is at 100% and RAM constantly grows.

      Is this intentional or by design? Is there a proper usage guide on how to access AMQP via Ruby?

      Thanks!

      Attachments

        Activity

          People

            aconway Alan Conway
            gberginc Gregor Berginc
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: