Failures running RubyGems master tests --------------------------------------
Key: JRUBY-5386 URL: http://jira.codehaus.org/browse/JRUBY-5386 Project: JRuby Issue Type: Bug Components: Extensions Affects Versions: JRuby 1.6RC1 Reporter: Charles Oliver Nutter There are a handful of failures running RubyGems' tests (on master). First off, 1.9 mode does not run at all. It appears a Java exception is getting raised somewhere and blowing other things up: {noformat} ~/projects/rubygems ➔ jruby --1.9 --disable-gems -S rake test (in /Users/headius/projects/rubygems) /Users/headius/projects/rubygems/lib/rubygems.rb:116 warning: already initialized constant VERSION /Users/headius/projects/rubygems/lib/rubygems.rb:116 warning: already initialized constant RubyGemsVersion /Users/headius/projects/rubygems/lib/rubygems.rb:149 warning: already initialized constant RbConfigPriorities /Users/headius/projects/rubygems/lib/rubygems.rb:171 warning: already initialized constant RubyGemsPackageVersion /Users/headius/projects/rubygems/lib/rubygems.rb:177 warning: already initialized constant WIN_PATTERNS /Users/headius/projects/rubygems/lib/rubygems.rb:1150 warning: already initialized constant MARSHAL_SPEC_DIR Java.java:362:in `getInstance': java.lang.NoClassDefFoundError: Could not initialize class org.jruby.javasupport.JavaClass from JavaUtil.java:160:in `convertJavaToUsableRubyObject' from RuntimeHelpers.java:1025:in `checkJavaException' from RuntimeHelpers.java:1049:in `isJavaExceptionHandled' from RescueNode.java:197:in `handleJavaException' from RescueNode.java:141:in `interpretWithJavaExceptions' from RescueNode.java:110:in `interpret' from BeginNode.java:83:in `interpret' from NewlineNode.java:103:in `interpret' from ASTInterpreter.java:70:in `INTERPRET_METHOD' {noformat} Failing this, I moved on to 1.8 mode, which had the following error: {noformat} /Users/headius/projects/rubygems/lib/rubygems.rb:1002:in `suffixes': undefined method `empty?' for nil:NilClass (NoMethodError) from org/jruby/RubyArray.java:2465:in `collect' from /Users/headius/projects/rubygems/lib/rubygems.rb:998:in `suffixes' from /Users/headius/projects/rubygems/lib/rubygems.rb:991:in `suffix_pattern' {noformat} The following patch works around it, but we appear to be missing some RbConfig values that RubyGems expects. I'm not sure if this is a bug on our part or assumption on RubyGems' part: {noformat} diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 287a9c6..480e64b 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -999,7 +999,7 @@ module Gem '.rb', *%w(DLEXT DLEXT2).map { |key| val = RbConfig::CONFIG[key] - ".#{val}" unless val.empty? + ".#{val}" unless val.nil? || val.empty? } ].compact.uniq end {noformat} With that, 1.9's error changes: {noformat} ~/projects/rubygems ➔ jruby --1.9 --disable-gems -S rake test (in /Users/headius/projects/rubygems) /Users/headius/projects/rubygems/lib/rubygems.rb:116 warning: already initialized constant VERSION /Users/headius/projects/rubygems/lib/rubygems.rb:116 warning: already initialized constant RubyGemsVersion /Users/headius/projects/rubygems/lib/rubygems.rb:149 warning: already initialized constant RbConfigPriorities /Users/headius/projects/rubygems/lib/rubygems.rb:171 warning: already initialized constant RubyGemsPackageVersion /Users/headius/projects/rubygems/lib/rubygems.rb:177 warning: already initialized constant WIN_PATTERNS /Users/headius/projects/rubygems/lib/rubygems.rb:1150 warning: already initialized constant MARSHAL_SPEC_DIR Java.java:827:in `createPackageModule': java.lang.NullPointerException from Java.java:817:in `getJavaPackageModule' from Java.java:787:in `addToJavaPackageModule' from Java.java:449:in `getProxyClass' from Java.java:453:in `getProxyClass' from Java.java:453:in `getProxyClass' from Java.java:453:in `getProxyClass' from Java.java:453:in `getProxyClass' from Java.java:362:in `getInstance' {noformat} And 1.9 mode with jit.threshold=1 yields a stack overflow: {noformat} ~/projects/rubygems ➔ jruby --1.9 --disable-gems -Xjit.threshold=1 -S rake test (in /Users/headius/projects/rubygems) /Users/headius/projects/rubygems/lib/rubygems.rb:116 warning: already initialized constant VERSION /Users/headius/projects/rubygems/lib/rubygems.rb:116 warning: already initialized constant RubyGemsVersion /Users/headius/projects/rubygems/lib/rubygems.rb:149 warning: already initialized constant RbConfigPriorities /Users/headius/projects/rubygems/lib/rubygems.rb:171 warning: already initialized constant RubyGemsPackageVersion /Users/headius/projects/rubygems/lib/rubygems.rb:177 warning: already initialized constant WIN_PATTERNS /Users/headius/projects/rubygems/lib/rubygems.rb:1150 warning: already initialized constant MARSHAL_SPEC_DIR rake aborted! library `java' could not be loaded: java.lang.StackOverflowError {noformat} Finally, here's actual failures in 1.8 mode with the small patch above: {noformat} 1) Error: test_execute_build(TestGemCommandsCertCommand): Errno::ENOENT: No such file or directory - gem-private_key.pem org/jruby/RubyFile.java:649:in `chmod' /Users/headius/projects/rubygems/lib/rubygems/security.rb:718:in `build_self_signed_cert' org/jruby/RubyIO.java:1066:in `open' org/jruby/RubyKernel.java:300:in `open' /Users/headius/projects/rubygems/lib/rubygems/security.rb:717:in `build_self_signed_cert' /Users/headius/projects/rubygems/lib/rubygems/commands/cert_command.rb:52:in `initialize' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:228:in `call' /Users/headius/projects/rubygems/lib/rubygems/command.rb:443:in `configure_options' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:228:in `call' /Users/headius/projects/jruby/lib/ruby/1.8/optparse.rb:1268:in `parse_in_order' org/jruby/RubyKernel.java:1194:in `rbCatch' /Users/headius/projects/jruby/lib/ruby/1.8/optparse.rb:1255:in `parse_in_order' /Users/headius/projects/jruby/lib/ruby/1.8/optparse.rb:1249:in `order!' /Users/headius/projects/jruby/lib/ruby/1.8/optparse.rb:1340:in `permute!' /Users/headius/projects/jruby/lib/ruby/1.8/optparse.rb:1361:in `parse!' /Users/headius/projects/rubygems/lib/rubygems/command.rb:348:in `handle_options' org/jruby/RubyObject.java:1340:in `send' ./test/rubygems/test_gem_commands_cert_command.rb:48:in `test_execute_build' org/jruby/RubyDir.java:310:in `chdir' ./test/rubygems/test_gem_commands_cert_command.rb:47:in `test_execute_build' /Users/headius/projects/rubygems/lib/rubygems/user_interaction.rb:40:in `use_ui' /Users/headius/projects/rubygems/lib/rubygems/user_interaction.rb:63:in `use_ui' ./test/rubygems/test_gem_commands_cert_command.rb:46:in `test_execute_build' org/jruby/RubyObject.java:1334:in `send' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:714:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:675:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:669:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:668:in `run_test_suites' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:632:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:524:in `autorun' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:232:in `call' 2) Error: test_install_cache_dir(TestGemDependencyInstaller): Gem::RemoteFetcher::FetchError: no data for http://gems.example.com/gems/a-1.gem (http://gems.example.com/gems/a-1.gem) /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:40:in `find_data' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:47:in `fetch_path' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:107:in `download' org/jruby/RubyIO.java:1066:in `open' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:106:in `download' /Users/headius/projects/rubygems/lib/rubygems/dependency_installer.rb:264:in `install' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/rubygems/lib/rubygems/dependency_installer.rb:254:in `install' ./test/rubygems/test_gem_dependency_installer.rb:112:in `test_install_cache_dir' org/jruby/RubyDir.java:310:in `chdir' ./test/rubygems/test_gem_dependency_installer.rb:110:in `test_install_cache_dir' org/jruby/RubyObject.java:1334:in `send' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:714:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:675:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:669:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:668:in `run_test_suites' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:632:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:524:in `autorun' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:232:in `call' 3) Error: test_install_dependency_development(TestGemDependencyInstaller): Gem::RemoteFetcher::FetchError: no data for http://gems.example.com/gems/a-1.gem (http://gems.example.com/gems/a-1.gem) /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:40:in `find_data' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:47:in `fetch_path' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:107:in `download' org/jruby/RubyIO.java:1066:in `open' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:106:in `download' /Users/headius/projects/rubygems/lib/rubygems/dependency_installer.rb:264:in `install' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/rubygems/lib/rubygems/dependency_installer.rb:254:in `install' ./test/rubygems/test_gem_dependency_installer.rb:172:in `test_install_dependency_development' org/jruby/RubyDir.java:310:in `chdir' ./test/rubygems/test_gem_dependency_installer.rb:170:in `test_install_dependency_development' org/jruby/RubyObject.java:1334:in `send' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:714:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:675:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:669:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:668:in `run_test_suites' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:632:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:524:in `autorun' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:232:in `call' 4) Error: test_install_dependency(TestGemDependencyInstaller): Gem::RemoteFetcher::FetchError: no data for http://gems.example.com/gems/a-1.gem (http://gems.example.com/gems/a-1.gem) /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:40:in `find_data' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:47:in `fetch_path' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:107:in `download' org/jruby/RubyIO.java:1066:in `open' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:106:in `do./test/rubygems/gemutilities.rb:1 warning: SAFE levels are not supported in JRuby wnload' /Users/headius/projects/rubygems/lib/rubygems/dependency_installer.rb:264:in `install' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/rubygems/lib/rubygems/dependency_installer.rb:254:in `install' ./test/rubygems/test_gem_dependency_installer.rb:158:in `test_install_dependency' org/jruby/RubyDir.java:310:in `chdir' ./test/rubygems/test_gem_dependency_installer.rb:156:in `test_install_dependency' org/jruby/RubyObject.java:1334:in `send' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:714:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:675:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:669:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:668:in `run_test_suites' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:632:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:524:in `autorun' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:232:in `call' 5) Error: test_install_domain_both_no_network(TestGemDependencyInstaller): Gem::RemoteFetcher::FetchError: no data for http://gems.example.com/gems/a-1.gem (http://gems.example.com/gems/a-1.gem) /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:40:in `find_data' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:47:in `fetch_path' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:107:in `download' org/jruby/RubyIO.java:1066:in `open' /Users/headius/projects/rubygems/lib/rubygems/test_utilities.rb:106:in `download' /Users/headius/projects/rubygems/lib/rubygems/dependency_installer.rb:264:in `install' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/rubygems/lib/rubygems/dependency_installer.rb:254:in `install' ./test/rubygems/test_gem_dependency_installer.rb:359:in `test_install_domain_both_no_network' org/jruby/RubyDir.java:310:in `chdir' ./test/rubygems/test_gem_dependency_installer.rb:357:in `test_install_domain_both_no_network' org/jruby/RubyObject.java:1334:in `send' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:714:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:675:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:669:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:668:in `run_test_suites' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:632:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:524:in `autorun' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:232:in `call' 6) Failure: test_class_build_env_make(TestGemExtExtConfBuilder) [./test/rubygems/test_gem_ext_ext_conf_builder.rb:80]: Expected "creating Makefile\n", not "WARNING: JRuby does not support native extensions or the `mkmf' library very well.\nCheck http://kenai.com/projects/jruby/pages/Home for alternatives.\ncreating Makefile\n". 7) Failure: test_class_build(TestGemExtExtConfBuilder) [./test/rubygems/test_gem_ext_ext_conf_builder.rb:32]: Expected "creating Makefile\n", not "WARNING: JRuby does not support native extensions or the `mkmf' library very well.\nCheck http://kenai.com/projects/jruby/pages/Home for alternatives.\ncreating Makefile\n". 8) Failure: test_class_build_rbconfig_make_prog(TestGemExtExtConfBuilder) [./test/rubygems/test_gem_ext_ext_conf_builder.rb:56]: Expected "creating Makefile\n", not "WARNING: JRuby does not support native extensions or the `mkmf' library very well.\nCheck http://kenai.com/projects/jruby/pages/Home for alternatives.\ncreating Makefile\n". 9) Failure: test_build_extensions_extconf_bad(TestGemInstaller) [./test/rubygems/test_gem_installer.rb:64]: Expected /\/Users\/headius\/projects\/jruby\/bin\/jruby: No such file/ to match "/Users/headius/projects/jruby/bin/jruby extconf.rb --build_arg1 --build_arg2\nError opening script file: /private/var/folders/V5/V5W2zlDQHPy94tAnCC5f6U+++TI/-Tmp-/test_rubygems_84692/gemhome/gems/a-2/extconf.rb (No such file or directory)\n". 10) Error: test_explicit_proxy(TestGemRemoteFetcher): Gem::RemoteFetcher::FetchError: SystemCallError: Unknown error - Connection reset by peer (http://localhost:9079/yaml) /Users/headius/projects/rubygems/lib/rubygems/remote_fetcher.rb:184:in `fetch_path' ./test/rubygems/test_gem_remote_fetcher.rb:355:in `test_explicit_proxy' /Users/headius/projects/rubygems/lib/rubygems/user_interaction.rb:40:in `use_ui' /Users/headius/projects/rubygems/lib/rubygems/user_interaction.rb:63:in `use_ui' ./test/rubygems/test_gem_remote_fetcher.rb:352:in `test_explicit_proxy' org/jruby/RubyObject.java:1334:in `send' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:714:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:675:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:669:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:668:in `run_test_suites' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:632:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:524:in `autorun' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:232:in `call' 11) Error: test_no_proxy(TestGemRemoteFetcher): Gem::RemoteFetcher::FetchError: SystemCallError: Unknown error - Connection reset by peer (http://localhost:9079/yaml) /Users/headius/projects/rubygems/lib/rubygems/remote_fetcher.rb:184:in `fetch_path' /Users/headius/projects/rubygems/lib/rubygems/remote_fetcher.rb:191:in `fetch_size' ./test/rubygems/test_gem_remote_fetcher.rb:168:in `test_no_proxy' /Users/headius/projects/rubygems/lib/rubygems/user_interaction.rb:40:in `use_ui' /Users/headius/projects/rubygems/lib/rubygems/user_interaction.rb:63:in `use_ui' ./test/rubygems/test_gem_remote_fetcher.rb:166:in `test_no_proxy' org/jruby/RubyObject.java:1334:in `send' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:714:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:675:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:669:in `run_test_suites' org/jruby/RubyArray.java:1676:in `each' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:668:in `run_test_suites' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:632:in `run' /Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/minitest-1.7.2/lib/minitest/unit.rb:524:in `autorun' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:232:in `call' 12) Error: test_class_sign_cert(TestGemSecurity): OpenSSL::X509::CertificateError: not all mandatory fields set in V3 TBScertificate generator No backtrace 766 tests, 2516 assertions, 4 failures, 8 errors, 0 skips {noformat} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email