Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.6, JRuby 1.7.0.pre1
-
Fix Version/s: JRuby-OSSL 0.7.6
-
Component/s: OpenSSL
-
Labels:None
-
Number of attachments :0
Description
Could be a symptom of something worse? We have had some recent issues with Digest not loading properly.
[junit] ------------- Standard Error -----------------
[junit] :1 warning: already initialized constant ARGV
[junit] ------------- ---------------- ---------------
[junit] Testcase: externals/ruby1.8/openssl/test_hmac(org.jruby.test.TestUnitTestSuite$ScriptTest): FAILED
[junit] Faults encountered running test/externals/ruby1.8/openssl/test_hmac, complete output follows:
[junit] Error:
[junit] test_dup(OpenSSL::TestHMAC):
[junit] NameError: uninitialized constant OpenSSL::Digest::MD5
[junit] org/jruby/RubyModule.java:2610:in `const_missing'
[junit] ./test/externals/ruby1.8/openssl/test_hmac.rb:11:in `setup'
[junit] org/jruby/RubyArray.java:1609:in `each'
[junit] Error:
[junit] test_hmac(OpenSSL::TestHMAC):
[junit] NameError: uninitialized constant OpenSSL::Digest::MD5
[junit] org/jruby/RubyModule.java:2610:in `const_missing'
[junit] ./test/externals/ruby1.8/openssl/test_hmac.rb:11:in `setup'
[junit] org/jruby/RubyArray.java:1609:in `each'
[junit]
[junit] junit.framework.AssertionFailedError: Faults encountered running test/externals/ruby1.8/openssl/test_hmac, complete output follows:
[junit] Error:
[junit] test_dup(OpenSSL::TestHMAC):
[junit] NameError: uninitialized constant OpenSSL::Digest::MD5
[junit] org/jruby/RubyModule.java:2610:in `const_missing'
[junit] ./test/externals/ruby1.8/openssl/test_hmac.rb:11:in `setup'
[junit] org/jruby/RubyArray.java:1609:in `each'
[junit] Error:
[junit] test_hmac(OpenSSL::TestHMAC):
[junit] NameError: uninitialized constant OpenSSL::Digest::MD5
[junit] org/jruby/RubyModule.java:2610:in `const_missing'
[junit] ./test/externals/ruby1.8/openssl/test_hmac.rb:11:in `setup'
[junit] org/jruby/RubyArray.java:1609:in `each'
[junit]
[junit] at org.jruby.test.TestUnitTestSuite$ScriptTest.runTest(TestUnitTestSuite.java:225)
Activity
With jruby-openssl uninstalled, ant test runs as follows on my MBP:
~/Development/src/jruby
☺ jruby -S gem uninstall jruby-openssl system master 6613abe ✗
Successfully uninstalled jruby-openssl-0.7.5
~/Development/src/jruby
☺ ant test system master 6613abe ✗
Buildfile: /Users/asari/Development/src/jruby/build.xml
init:
prepare-bin-jruby:
jar:
init:
create-dirs:
copy-resources:
update-constants:
[echo] Updating Constants.java
[echo] ...using git revision = 6613abe, tzdata = 2010k
[copy] Copying 1 file to /Users/asari/Development/src/jruby/src_gen/org/jruby/runtime
_uc_internal_:
prepare:
compile-annotation-binder:
compile-jruby:
[apt] Since compiler setting isn't classic or modern, ignoring fork setting.
[apt] Since compiler setting isn't classic or modern, ignoring fork setting.
emma:
instrument:
generate-method-classes:
_gmc_internal_:
generate-unsafe:
_gu_internal_:
compile:
unzip-native-libs:
jar-jruby:
[jar] Updating jar: /Users/asari/Development/src/jruby/lib/jruby.jar
[jar] Warning: selected jar files include a META-INF/INDEX.LIST which will be replaced by a newly generated one.
add-emma-jars:
compile-test:
[javac] Compiling 2 source files to /Users/asari/Development/src/jruby/build/classes/test
copy-test-files:
install-dev-gems:
install-jruby-launcher-gem:
install-gems:
run-junit-interpreted-short:
[echo] compile=OFF, jit.threshold=20, jit.maxsize=1000000000, jit.max=-1, objectspace=false threadpool=false reflection=false version=ruby1_8
[junit] Testsuite: org.jruby.test.ScriptTestSuite
[junit] Tests run: 32, Failures: 0, Errors: 0, Time elapsed: 9.808 sec
[junit]
[junit] Testsuite: org.jruby.test.JRubyTestSuite
[junit] Tests run: 110, Failures: 0, Errors: 0, Time elapsed: 77.342 sec
[junit]
[junit] Testsuite: org.jruby.test.MRITestSuite
[junit] Tests run: 59, Failures: 0, Errors: 0, Time elapsed: 22.603 sec
[junit]
[junit] Testsuite: org.jruby.test.MainTestSuite
[junit] Tests run: 172, Failures: 0, Errors: 0, Time elapsed: 50.068 sec
[junit]
[junitreport] Processing /Users/asari/Development/src/jruby/build/test-results/TESTS-TestSuites.xml to /var/folders/hf/m_mxnhms4q70rqg1dhv8bk400000gn/T/null923948989
[junitreport] Loading stylesheet jar:file:/usr/local/Cellar/ant/1.8.2/libexec/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 1481ms
[junitreport] Deleting: /var/folders/hf/m_mxnhms4q70rqg1dhv8bk400000gn/T/null923948989
test-rake-targets:
[echo] Running rake test:rake_targets
[echo] compile=OFF, threshold=20, objectspace=false threadpool=false reflection=false
[java] JAVA options: {:fork=>"true", :failonerror=>"true", :classname=>"org.jruby.Main", :maxmemory=>"1024M"}
[java] NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
[java] Gem.source_index called from /Users/asari/Development/src/jruby/build/classes/jruby/jruby/commands.rb:36.
[java] build_lib/rake-0.9.2.2.gem already installed
[java] NOTE: Gem::SourceIndex#search is deprecated with no replacement. It will be removed on or after 2011-11-01.
[java] Gem::SourceIndex#search called from /Users/asari/Development/src/jruby/build/classes/jruby/jruby/commands.rb:36.
[java] Generating autospec.bat
[java] Generating htmldiff.bat
[java] Generating ldiff.bat
[java] Generating rake.bat
[java] Generating rspec.bat
[java] ant compile-test
[java] Buildfile: /Users/asari/Development/src/jruby/build.xml
[java]
[java] init:
[java]
[java] prepare-bin-jruby:
[java]
[java] jar:
[java]
[java] init:
[java]
[java] create-dirs:
[java]
[java] copy-resources:
[java]
[java] update-constants:
[java] [echo] Updating Constants.java
[java] [echo] ...using git revision = 6613abe, tzdata = 2010k
[java] [copy] Copying 1 file to /Users/asari/Development/src/jruby/src_gen/org/jruby/runtime
[java]
[java] _uc_internal_:
[java]
[java] prepare:
[java]
[java] compile-annotation-binder:
[java]
[java] compile-jruby:
[java] [apt] Since compiler setting isn't classic or modern, ignoring fork setting.
[java] [apt] Since compiler setting isn't classic or modern, ignoring fork setting.
[java]
[java] emma:
[java]
[java] instrument:
[java]
[java] generate-method-classes:
[java]
[java] _gmc_internal_:
[java]
[java] generate-unsafe:
[java]
[java] _gu_internal_:
[java]
[java] compile:
[java]
[java] unzip-native-libs:
[java]
[java] jar-jruby:
[java]
[java] add-emma-jars:
[java]
[java] compile-test:
[java] [javac] Compiling 2 source files to /Users/asari/Development/src/jruby/build/classes/test
[java]
[java] BUILD SUCCESSFUL
[java] Total time: 8 seconds
[java] /Users/asari/Development/src/jruby/bin/jruby --1.8 -S rspec spec/java_integration/addons/io_spec.rb spec/java_integration/addons/net_spec.rb spec/java_integration/addons/object_spec.rb spec/java_integration/addons/string_spec.rb spec/java_integration/addons/synchronized_class_spec.rb spec/java_integration/addons/throwable_spec.rb spec/java_integration/ant/ant_spec.rb spec/java_integration/ant/project_spec.rb spec/java_integration/ant/rake_spec.rb spec/java_integration/ant/target_spec.rb spec/java_integration/ant/task_spec.rb spec/java_integration/exceptions/rescue_spec.rb spec/java_integration/extensions/classpath_spec.rb spec/java_integration/extensions/kernel_spec.rb spec/java_integration/extensions/list_spec.rb spec/java_integration/fields/field_accessor_spec.rb spec/java_integration/globals/classpath_spec.rb spec/java_integration/globals/env_java_spec.rb spec/java_integration/interfaces/constant_spec.rb spec/java_integration/interfaces/executor_spec.rb spec/java_integration/interfaces/implementation_spec.rb spec/java_integration/interfaces/iterable_spec.rb spec/java_integration/jrubyc/java/annotation_spec.rb spec/java_integration/jrubyc/java/basic_spec.rb spec/java_integration/jrubyc/java/constructor_spec.rb spec/java_integration/jrubyc/java/implements_spec.rb spec/java_integration/jrubyc/java/import_spec.rb spec/java_integration/jrubyc/java/method_spec.rb spec/java_integration/jrubyc/java/package_spec.rb spec/java_integration/methods/basics_spec.rb spec/java_integration/methods/binding_spec.rb spec/java_integration/methods/dir_spec.rb spec/java_integration/methods/dispatch_spec.rb spec/java_integration/methods/error_spec.rb spec/java_integration/methods/java_alias_spec.rb spec/java_integration/methods/java_method_spec.rb spec/java_integration/methods/java_send_spec.rb spec/java_integration/methods/method_selection_spec.rb spec/java_integration/methods/naming_spec.rb spec/java_integration/methods/reflecting_spec.rb spec/java_integration/object/ivars_spec.rb spec/java_integration/object/marshal_spec.rb spec/java_integration/object/serialization_spec.rb spec/java_integration/packages/access_spec.rb spec/java_integration/packages/include_spec.rb spec/java_integration/reflection/field_spec.rb spec/java_integration/reflection/method_spec.rb spec/java_integration/reify/become_java_spec.rb spec/java_integration/rubygems/maven_gemify_spec.rb spec/java_integration/rubygems/rubygems_spec.rb spec/java_integration/scala/operator_spec.rb spec/java_integration/scala/singleton_spec.rb spec/java_integration/types/array_spec.rb spec/java_integration/types/coercion_spec.rb spec/java_integration/types/construction_spec.rb spec/java_integration/types/extension_spec.rb spec/java_integration/types/inspect_spec.rb spec/java_integration/types/retrieval_spec.rb spec/java_integration/types/wrapping_spec.rb spec/java_integration/utilities/io_spec.rb spec/java_integration/utilities/jar_glob_spec.rb spec/java_integration/utilities/jdbc_unloader_spec.rb spec/java_integration/utilities/jruby_spec.rb spec/java_integration/utilities/load_from_jar_spec.rb --options spec/java_integration/spec.quiet.opts
[java] ..........................................................................................................................................................................................*.*.*.............................*.......................................*...............................................................................................................................................................................*.............................................................................................................................*..*..........................................
[java]
[java] Pending:
[java] A class with varargs constructors should be called with the most exact overload
[java] # needs better type-driven ranking of overloads
[java] # ./spec/java_integration/methods/dispatch_spec.rb:122
[java] A class with varargs instance methods should be called with the most exact overload
[java] # needs better type-driven ranking of overloads
[java] # ./spec/java_integration/methods/dispatch_spec.rb:183
[java] A class with varargs static methods should be called with the most exact overload
[java] # needs better type-driven ranking of overloads
[java] # ./spec/java_integration/methods/dispatch_spec.rb:227
[java] Java static method names should not overwrite critical core Ruby methods
[java] # need a better way to separate class and instance methods in the java code
[java] # ./spec/java_integration/methods/naming_spec.rb:63
[java] A Java package can be imported using 'include_package package.module
[java] # does not work; probably should for consistency?
[java] # ./spec/java_integration/packages/access_spec.rb:22
[java] Java String and primitive-typed methods should select the most narrow and precise overloaded method
[java] # selection based on precision is not supported yet
[java] # ./spec/java_integration/types/coercion_spec.rb:131
[java] A Ruby subclass of a Java concrete class can not invoke package-visible methods of the superclass
[java] # Why doesn't this raise NoMethodError?
[java] # ./spec/java_integration/types/extension_spec.rb:39
[java] A Ruby subclass of a Java concrete class can not invoke private methods of the superclass
[java] # Why doesn't this raise NoMethodError?
[java] # ./spec/java_integration/types/extension_spec.rb:72
[java]
[java] Finished in 34.5 seconds
[java] 608 examples, 0 failures, 8 pending
[java] /Users/asari/Development/src/jruby/bin/jruby --1.8 -S rspec spec/compiler/general_spec.rb spec/compiler/skinnymethodadapter_spec.rb
[java] ....................................
[java]
[java] Finished in 2.37 seconds
[java] 36 examples, 0 failures
[java] /Users/asari/Development/src/jruby/bin/jruby --1.8 -S rspec spec/ffi/buffer_spec.rb spec/ffi/callback_spec.rb spec/ffi/io_spec.rb spec/ffi/memorypointer_spec.rb spec/ffi/struct_spec.rb
[java] ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................./Users/asari/Development/src/jruby/spec/ffi/memorypointer_spec.rb:4 warning: already initialized constant MemoryPointer
[java] ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
[java]
[java] Finished in 0.829 seconds
[java] 2049 examples, 0 failures
[java] /Users/asari/Development/src/jruby/bin/jruby --1.8 -S rspec spec/regression/JRUBY-2388_gc_methods_not_on_other_classes_spec.rb spec/regression/JRUBY-3194_autoload_thread_safety_spec.rb spec/regression/JRUBY-3343_threaded_require_serialized_spec.rb spec/regression/JRUBY-4335_float_marshal_roundtrip_spec.rb spec/regression/JRUBY-4940_require_multibyte_spec.rb spec/regression/JRUBY-5014_proc_lineno_spec.rb spec/regression/JRUBY-5122_nonblocking_io_spec.rb spec/regression/JRUBY-5220_wrong_number_of_args_msg_spec.rb spec/regression/JRUBY-5223_marshal_load_spec.rb spec/regression/JRUBY-5232_getsockname_spec.rb spec/regression/JRUBY-5275_each_slice_failures_spec.rb spec/regression/JRUBY-5302_spec.rb spec/regression/JRUBY-5306_eof_while_parsing_identifier_spec.rb spec/regression/JRUBY-5335_array_with_prng_spec.rb spec/regression/JRUBY-5412_enumerator_with_index_combo_spec.rb spec/regression/JRUBY-5471_extension_attrs_are_private_spec.rb spec/regression/JRUBY-5484_tcpsocket_read_does_not_set_sleep_spec.rb spec/regression/JRUBY-5487_select_with_0_returns_nil_spec.rb spec/regression/JRUBY-5503_pipe_close_with_timeout_spec.rb spec/regression/JRUBY-5610_tcpserver_accept_nonblock_always_eagain_spec.rb spec/regression/JRUBY-5684_file_descriptor_channel_hangs_spec.rb spec/regression/JRUBY-5773_postargs_off_by_one_spec.rb spec/regression/JRUBY-5776_securerandom_jruby_patch_spec.rb spec/regression/JRUBY-5811_case_insensitive_loaded_features_spec.rb spec/regression/JRUBY-5918_float_marshal_observes_locale_spec.rb spec/regression/JRUBY-5981-thread_local_encode_decode_spec.rb spec/regression/JRUBY-5987-module_include_wrapper_autoload_fix_spec.rb spec/regression/JRUBY-6049_bignum_aref_spec.rb spec/regression/JRUBY-6050_fixnum_aref_spec.rb spec/regression/JRUBY-6053_pack_spec.rb spec/regression/JRUBY-6141_matchdata_captures_spec.rb spec/regression/JRUBY-6208_gzip_bin_write_spec.rb spec/regression/JRUBY-6209_hash_rehash_spec.rb spec/regression/JRUBY-6278_double_require_spec.rb spec/regression/JRUBY-6291_popen_close_streams_spec.rb spec/regression/JRUBY-6307_integer_power_spec.rb spec/regression/JRUBY-6324_random_srand_spec.rb spec/regression/JRUBY-6344_embedded_carriage_return_spec.rb
BUILD FAILED
/Users/asari/Development/src/jruby/build.xml:1146: The following error occurred while executing this line:
/Users/asari/Development/src/jruby/build.xml:1166: Java returned: 1
Total time: 4 minutes 49 seconds
Ok, after a lot of puts debugging, I figured out that jossl is failing an assertion:
https://gist.github.com/1829064
Investigating.
This is the commit that breaks things:
commit d8f5711cf02eac787752a6a203cb1de39a618e42
Author: Hiroshi Nakamura <nahi@ruby-lang.org>
Date: Thu Dec 29 15:51:03 2011 +0900
Implement OpenSSL.errors, debug, and debug=
The failure is because it's calling setInstanceVariable("debug" ...), but "debug" is not a valid instance variable name. It should either be @debug, or it should be calling setInternalVariable.
It's a nitpicky assertion, but we have it in place to ensure Ruby-facing instance variable lists never have anything that can't be accessed from Ruby (as "debug" in this case).
Fixing.
Nahi: Anything stopping a release right to fix this up? It's driving me nuts doing test runs ![]()
Fixed...needs release.
commit 45a5bbc86ade1aedd038946e737dbdbf077537f4
Author: Charles Oliver Nutter <headius@headius.com>
Date: Tue Feb 14 13:07:42 2012 -0600
Fix JRUBY-6385
Tests failing with jruby-openssl installed
* Fixed use of set/getInstanceVariable with non-ivar "debug"
* Added -J-ea to test runs to avoid issues in future
Sorry for the trouble. I found another false assertion by -J-ea.
Pushed 0.7.6 just now.
Charles, would you tell me the instruction you did? I cannot find the message in test-all-master and test-all-release in CI results. And test/externals/ruby1.?/openssl should not be tested against jruby-openssl. (JRuby-OSSL is using tests in its repository which is in sync with CRuby repo with some modifications)