Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@headius
Copy link
Member

@headius headius commented Dec 11, 2019

No description provided.

@headius headius added this to the JRuby 9.2.10.0 milestone Dec 11, 2019
@headius
Copy link
Member Author

headius commented Dec 11, 2019

The errors are some stack overflow likely caused by some super or define_method bug. I'm not sure of the cause. I am going to disable the warn patch and see if that clears it up; it's not clear to me what it's for.

@headius
Copy link
Member Author

headius commented Dec 11, 2019

The JRuby test failure appears to be some behavioral change in RG that's interfering with its use from within a jar file.

@headius
Copy link
Member Author

headius commented Dec 11, 2019

Here are the failures currently.

MRI suite:

  1) Failure:
TestException#test_warning_warn_super [/home/travis/build/jruby/jruby/test/mri/ruby/test_exception.rb:1052]:

1. [2/2] Assertion for "stderr"
   | Expected /instance variable @a not initialized/ to match "Error: Your application used more stack memory than the safety cap of 2048K.\n" +
   | "Specify -J-Xss####k to increase it (#### = cap size in KB).\n" +
   | "Specify -w for full java.lang.StackOverflowError stack trace\n".

JRuby suite:

TestJarredGemsWithSpacesInDirectory: 
  test_jarred_gem_on_gem_path:					E
================================================================================
org/jruby/RubyKernel.java:1187:in `catch'
org/jruby/RubyKernel.java:1192:in `catch'
org/jruby/RubyKernel.java:1187:in `catch'
org/jruby/RubyKernel.java:1192:in `catch'
     26:     Gem.clear_paths
     27:     old = ENV['GEM_PATH']
     28:     ENV['GEM_PATH'] = File.expand_path('../gem.jar', __FILE__)
  => 29:     assert require('mygem')
     30:   ensure
     31:     ENV['GEM_PATH'] = old
     32:     Gem.clear_paths
/home/travis/build/jruby/jruby/test/jruby/test_jarred_gems.rb:29:in `test_jarred_gem_on_gem_path'
/home/travis/build/jruby/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `require'
org/jruby/RubyKernel.java:977:in `require'
Error: test_jarred_gem_on_gem_path(TestJarredGemsWithSpacesInDirectory): LoadError: no such file to load -- mygem
================================================================================
: (0.018789)
  test_list_gem_from_jar_with_spaces_in_directory:		F
================================================================================
org/jruby/RubyKernel.java:1187:in `catch'
org/jruby/RubyKernel.java:1192:in `catch'
org/jruby/RubyKernel.java:1187:in `catch'
org/jruby/RubyKernel.java:1192:in `catch'
      6: 
      7:   def test_list_gem_from_jar_with_spaces_in_directory
      8:     out = jruby(%q{-r"./test/jruby/dir with spaces/testgem.jar" -S jgem list})
  =>  9:     assert(out =~ /testgem/)
     10: 
     11:     cp = ENV['CLASSPATH']
     12:     begin
/home/travis/build/jruby/jruby/test/jruby/test_jarred_gems.rb:9:in `test_list_gem_from_jar_with_spaces_in_directory'
Failure: test_list_gem_from_jar_with_spaces_in_directory(TestJarredGemsWithSpacesInDirectory): <nil> is not true.
================================================================================

The stack overflow issue in the MRI suite seems to only happen when Warning.warn is replaced with a version that calls super, as in MRI's ruby/test_exception.rb. It may not be a problem in regular use.

It turns out MRI runs this way, which avoids running into the
stack overflow in jruby#5997. We are actually doing the fixed logic
correctly, but in the presence of that RubyGems warn patch, all
versions of MRI also fail.
@headius
Copy link
Member Author

headius commented Feb 14, 2020

The stack overflow is no longer an issue, as I described in #5797

I have triaged the two JRuby suite failures and they both boil down to the same problem: #6060.

@headius
Copy link
Member Author

headius commented Feb 14, 2020

We are opting to disable the tests broken by this update and fix the issue for 9.3. I don't think putting a jar file directly as GEM_PATH or requiring a jar containing a GEM_PATH layout are common use cases.

@headius headius merged commit b228ca2 into jruby:master Feb 14, 2020
@headius headius deleted the update_rubygems branch February 14, 2020 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant