-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
activesupport 4.2.1 breaks timeout.rb on jruby 1.7.19 and 1.7.20 #2940
Comments
as notes by @enebo already on the gist, there's probably another runtime-exception the NPE hides require 'timeout'
Timeout.module_eval do
class << self
alias_method :_timeout_impl, :timeout
def timeout(*args, &block)
puts "Timeout.timeout(#{args.inspect})"
_timeout_impl(*args, &block)
end
end
end |
Thanks, I'll try that |
@kares: I got |
@ggayan or not .. seems like an AS::Duration rather than a Fixnum could you inspect the class and caller e.g. |
Gotcha!
I'm using |
I guess that I was giving a wrong argument to |
re-opening as we still need to find the route cause for this :
... it's probably a 4.2 "bug" of how Duration is converted or |
turns out there's difference between 4.1 and 4.2 around the type of argument passed to
after 1e2d2dd the underlying issue reveals itself (on JRuby) :
|
… MRI does ... wasn't noticeable too much previously but now Rails 4.2 started using respond_to_missing? on places such as AS::Duration thus it's require for us to get things such as `sleep 5.seconds` working (fixes jruby#2940)
* jruby-1_7: (54 commits) [travis-ci] re-try sudo: false dry out the two (Java helper) respond_to_p19 methods respondsTo JRuby API under 1.9.3 does not do respond_to_missing? like MRI does sleep should convert it's "time interval" argument the same way as MRI respond_to_missing? should always get a symbol name passed (fixes #2946) add a respond_to_missing unit test (on 1.9) introduce and use conversion( just like MRI does) on #timeout's sec argument add missing ' ' (space) in exception message ... TypeError from `sleep('invalid')` DateTime.iso8601 fails with an error if a second fraction is present [build] switch to 1.7.21-SNAPSHOT for test-jruby-jars refactor Timeout's scheduled tasks to an inner class (for easier identification) further hand drying of the Timeout module impl less (int) casting noiz add some (internal) generics for an improved readability xp inner class' Finalizer fields id and finalized can be final generix-ize the environment field (at least internally) + use a StringBuilder unnecessary (int) cast missing throw statement in RubyString's concat tune timeout to work when scheduling or argument convenrsion throws (see #2940) return empty Ruby array for empty dir list ... Conflicts: .gitignore .travis.yml VERSION core/pom.xml core/src/main/java/org/jruby/RubyArray.java core/src/main/java/org/jruby/RubyBasicObject.java core/src/main/java/org/jruby/RubyDir.java core/src/main/java/org/jruby/RubyEnumerable.java core/src/main/java/org/jruby/RubyFile.java core/src/main/java/org/jruby/RubyGlobal.java core/src/main/java/org/jruby/RubyIO.java core/src/main/java/org/jruby/RubyKernel.java core/src/main/java/org/jruby/RubyModule.java core/src/main/java/org/jruby/RubyString.java core/src/main/java/org/jruby/RubyTime.java core/src/main/java/org/jruby/ext/timeout/Timeout.java core/src/main/java/org/jruby/java/proxies/JavaProxy.java core/src/main/java/org/jruby/util/Dir.java core/src/main/java/org/jruby/util/encoding/CharsetTranscoder.java docs/man/pom.xml docs/pom.xml ext/pom.xml ext/readline/pom.xml ext/ripper/pom.xml lib/pom.xml lib/ruby/1.9/date/format.rb lib/ruby/1.9/io/linux_console.rb lib/ruby/shared/gauntlet_rubygems.rb lib/ruby/shared/rubygems.rb lib/ruby/shared/rubygems/available_set.rb lib/ruby/shared/rubygems/basic_specification.rb lib/ruby/shared/rubygems/command.rb lib/ruby/shared/rubygems/command_manager.rb lib/ruby/shared/rubygems/commands/cert_command.rb lib/ruby/shared/rubygems/commands/cleanup_command.rb lib/ruby/shared/rubygems/commands/contents_command.rb lib/ruby/shared/rubygems/commands/dependency_command.rb lib/ruby/shared/rubygems/commands/environment_command.rb lib/ruby/shared/rubygems/commands/generate_index_command.rb lib/ruby/shared/rubygems/commands/help_command.rb lib/ruby/shared/rubygems/commands/install_command.rb lib/ruby/shared/rubygems/commands/list_command.rb lib/ruby/shared/rubygems/commands/mirror_command.rb lib/ruby/shared/rubygems/commands/outdated_command.rb lib/ruby/shared/rubygems/commands/owner_command.rb lib/ruby/shared/rubygems/commands/pristine_command.rb lib/ruby/shared/rubygems/commands/push_command.rb lib/ruby/shared/rubygems/commands/query_command.rb lib/ruby/shared/rubygems/commands/search_command.rb lib/ruby/shared/rubygems/commands/setup_command.rb lib/ruby/shared/rubygems/commands/specification_command.rb lib/ruby/shared/rubygems/commands/uninstall_command.rb lib/ruby/shared/rubygems/commands/unpack_command.rb lib/ruby/shared/rubygems/commands/update_command.rb lib/ruby/shared/rubygems/commands/which_command.rb lib/ruby/shared/rubygems/commands/yank_command.rb lib/ruby/shared/rubygems/compatibility.rb lib/ruby/shared/rubygems/config_file.rb lib/ruby/shared/rubygems/core_ext/kernel_gem.rb lib/ruby/shared/rubygems/core_ext/kernel_require.rb lib/ruby/shared/rubygems/defaults.rb lib/ruby/shared/rubygems/dependency.rb lib/ruby/shared/rubygems/dependency_installer.rb lib/ruby/shared/rubygems/dependency_list.rb lib/ruby/shared/rubygems/deprecate.rb lib/ruby/shared/rubygems/doctor.rb lib/ruby/shared/rubygems/errors.rb lib/ruby/shared/rubygems/exceptions.rb lib/ruby/shared/rubygems/ext.rb lib/ruby/shared/rubygems/ext/builder.rb lib/ruby/shared/rubygems/ext/cmake_builder.rb lib/ruby/shared/rubygems/ext/configure_builder.rb lib/ruby/shared/rubygems/ext/ext_conf_builder.rb lib/ruby/shared/rubygems/ext/rake_builder.rb lib/ruby/shared/rubygems/gemcutter_utilities.rb lib/ruby/shared/rubygems/indexer.rb lib/ruby/shared/rubygems/install_update_options.rb lib/ruby/shared/rubygems/installer.rb lib/ruby/shared/rubygems/installer_test_case.rb lib/ruby/shared/rubygems/local_remote_options.rb lib/ruby/shared/rubygems/name_tuple.rb lib/ruby/shared/rubygems/package.rb lib/ruby/shared/rubygems/package/old.rb lib/ruby/shared/rubygems/package/tar_header.rb lib/ruby/shared/rubygems/package/tar_reader/entry.rb lib/ruby/shared/rubygems/package/tar_writer.rb lib/ruby/shared/rubygems/path_support.rb lib/ruby/shared/rubygems/platform.rb lib/ruby/shared/rubygems/psych_additions.rb lib/ruby/shared/rubygems/rdoc.rb lib/ruby/shared/rubygems/remote_fetcher.rb lib/ruby/shared/rubygems/request.rb lib/ruby/shared/rubygems/request_set.rb lib/ruby/shared/rubygems/request_set/gem_dependency_api.rb lib/ruby/shared/rubygems/requirement.rb lib/ruby/shared/rubygems/resolver/current_set.rb lib/ruby/shared/rubygems/security.rb lib/ruby/shared/rubygems/security/policy.rb lib/ruby/shared/rubygems/security/signer.rb lib/ruby/shared/rubygems/security/trust_dir.rb lib/ruby/shared/rubygems/server.rb lib/ruby/shared/rubygems/source.rb lib/ruby/shared/rubygems/source/installed.rb lib/ruby/shared/rubygems/source/local.rb lib/ruby/shared/rubygems/source/specific_file.rb lib/ruby/shared/rubygems/source_list.rb lib/ruby/shared/rubygems/spec_fetcher.rb lib/ruby/shared/rubygems/specification.rb lib/ruby/shared/rubygems/ssl_certs/AddTrustExternalCARoot.pem lib/ruby/shared/rubygems/stub_specification.rb lib/ruby/shared/rubygems/syck_hack.rb lib/ruby/shared/rubygems/test_case.rb lib/ruby/shared/rubygems/test_utilities.rb lib/ruby/shared/rubygems/text.rb lib/ruby/shared/rubygems/uninstaller.rb lib/ruby/shared/rubygems/uri_formatter.rb lib/ruby/shared/rubygems/user_interaction.rb lib/ruby/shared/rubygems/util/list.rb lib/ruby/shared/rubygems/validator.rb lib/ruby/shared/rubygems/version.rb maven/jruby-complete/pom.xml maven/jruby-dist/pom.xml maven/jruby-jars/pom.xml maven/jruby-noasm/pom.xml maven/jruby-rake-plugin/pom.xml maven/jruby-stdlib/pom.xml maven/jruby/pom.xml maven/pom.xml pom.xml test/pom.xml test/test_dir.rb test/test_kernel.rb test/test_respond_to.rb test/test_timeout.rb
Hey people,
I've just reported an issue on Adhearsion when using the latest gem versions: adhearsion/adhearsion#549
What I found is that in the context of our adhearsion app, Celluloid crashes un jruby when upgrading to activesupport 4.2.1, but not on MRI. Moving back to 4.1.0 solves the problem.
I'm still trying to reduce the issue to a simple case, but this is what I've found so far:
https://gist.github.com/ggayan/5c90f10c59c4c747b6be
Any insights are greatly appreciated.
NOTE: MRI 1.9.3 as well as 2.1.5 works.
The text was updated successfully, but these errors were encountered: