Skip to content

OutOfMemoryError with 9.1.3.0 #4127

@MartinKoerner

Description

@MartinKoerner

Environment

Provide at least:

  • jruby 9.1.3.0 (2.3.1) 2016-08-29 a2a3b29 Java HotSpot(TM) 64-Bit Server VM 25.20-b23 on 1.8.0_20-b26 +jit [darwin-x86_64]
  • JRUBY_OPTS='--debug --dev -Xcompile.invokedynamic=false -J-XX:TieredStopAtLevel=1 -J-XX:+CICompilerCountPerCPU -Xjit.threshold=500 -J-XX:+TieredCompilation -J-XX:+UseG1GC -J-XX:ReservedCodeCacheSize=256m -J-Xss2048k -J-Xms2048m -J-Xmx2048m'
  • uname -a: 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
  • Rails 4.2.

Expected Behavior

  • Command "bin/rails g our/generator" should run without problems
  • The generator itself is resource-intensive, but ran always without problems in JRuby 1.7.x, 9.0.4.0, 9.0.5.0 and 9.1.2.0

Actual Behavior

Generator runs for a while, than he hangs on one file (it is the same file every time, but it is not very special in the generated output) and after some time prints:

LoadError: load error: rails/commands/generate -- java.lang.OutOfMemoryError: Java heap space
              require at org/jruby/RubyKernel.java:955
     block in require at /usr/local/var/rbenv/versions/jruby-9.1.3.0/lib/ruby/gems/shared/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274
      load_dependency at /usr/local/var/rbenv/versions/jruby-9.1.3.0/lib/ruby/gems/shared/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240
              require at /usr/local/var/rbenv/versions/jruby-9.1.3.0/lib/ruby/gems/shared/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274
     require_command! at /usr/local/var/rbenv/versions/jruby-9.1.3.0/lib/ruby/gems/shared/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:123
  generate_or_destroy at /usr/local/var/rbenv/versions/jruby-9.1.3.0/lib/ruby/gems/shared/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:130
             generate at /usr/local/var/rbenv/versions/jruby-9.1.3.0/lib/ruby/gems/shared/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:50
         run_command! at /usr/local/var/rbenv/versions/jruby-9.1.3.0/lib/ruby/gems/shared/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:39
                at /usr/local/var/rbenv/versions/jruby-9.1.3.0/lib/ruby/gems/shared/gems/railties-4.2.7.1/lib/rails/commands.rb:17
              require at org/jruby/RubyKernel.java:955
                at bin/rails:1

It will try to get a memory dump...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions