Skip to content

Java::JavaLang::ArrayIndexOutOfBoundsException on jruby-9.3.2.0 #6984

@klobuczek

Description

@klobuczek

When running specs with simplecov on jruby-9.3.2.0 I'm getting the below problem. This does not happen when specs are run without coverage. On jruby-9.2.20.1 it works with or without coverage.

I have created a very minimal crippled down rails app to reproduce the problem: https://github.com/klobuczek/bug-app
You can see the executed GH actions here: https://github.com/klobuczek/bug-app/actions/runs/1655924098

Failures:

  1) BugMailer bug
     Failure/Error: Unable to find org/jruby/RubyKernel.java to read failed line

     LoadError:
       load error: mail/parsers/address_lists_parser -- java.lang.ArrayIndexOutOfBoundsException: -32624
     # org/jruby/RubyKernel.java:1017:in `require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `block in require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299:in `load_dependency'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/parsers.rb:6:in `<main>'
     # org/jruby/RubyKernel.java:1017:in `require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `block in require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299:in `load_dependency'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/parsers/content_type_parser.rb:6:in `<main>'
     # org/jruby/RubyKernel.java:1017:in `require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `block in require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299:in `load_dependency'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/elements/content_type_element.rb:3:in `<main>'
     # org/jruby/RubyKernel.java:1017:in `require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `block in require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299:in `load_dependency'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/fields/content_type_field.rb:39:in `element'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/fields/content_type_field.rb:33:in `parse'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/fields/content_type_field.rb:25:in `initialize'
     # org/jruby/RubyClass.java:893:in `new'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/field.rb:277:in `new_field'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/field.rb:266:in `create_field'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/field.rb:187:in `field'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/field.rb:239:in `method_missing'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/header.rb:186:in `[]='
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/message.rb:1213:in `default'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/mail-2.7.1/lib/mail/message.rb:613:in `content_type'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/actionmailer-6.1.4.4/lib/action_mailer/test_case.rb:102:in `set_expected_mail'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-rails-5.0.2/lib/rspec/rails/adapters.rb:113:in `block in setup'
     # org/jruby/RubyBasicObject.java:2673:in `instance_exec'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:455:in `instance_exec'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:365:in `run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:529:in `block in run_owned_hooks_for'
     # org/jruby/RubyArray.java:1865:in `each'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:528:in `run_owned_hooks_for'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:615:in `block in run_example_hooks_for'
     # org/jruby/RubyArray.java:1947:in `reverse_each'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:614:in `run_example_hooks_for'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:484:in `run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:502:in `run_before_example'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:261:in `block in run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:508:in `block in with_around_and_singleton_context_hooks'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:465:in `block in with_around_example_hooks'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:486:in `block in run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:350:in `call'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-rails-5.0.2/lib/rspec/rails/adapters.rb:75:in `block in MinitestLifecycleAdapter'
     # org/jruby/RubyBasicObject.java:2673:in `instance_exec'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:455:in `instance_exec'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:390:in `execute_with'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:628:in `block in run_around_example_hooks_for'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:350:in `call'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:486:in `run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:465:in `with_around_example_hooks'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:508:in `with_around_and_singleton_context_hooks'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:259:in `run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:644:in `block in run_examples'
     # org/jruby/RubyArray.java:2642:in `map'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:640:in `run_examples'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:606:in `run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:in `block in run_specs'
     # org/jruby/RubyArray.java:2642:in `map'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:in `block in run_specs'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:2067:in `with_suite_hooks'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:116:in `block in run_specs'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:74:in `report'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:115:in `run_specs'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:89:in `run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71:in `run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45:in `invoke'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/rspec-core-3.10.1/exe/rspec:4:in `<main>'
     # org/jruby/RubyKernel.java:1052:in `load'
     # /home/runner/.rubies/jruby-9.3.2.0/bin/rspec:25:in `<main>'
     # org/jruby/RubyKernel.java:1052:in `load'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/lib/bundler/cli/exec.rb:58:in `kernel_load'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/lib/bundler/cli/exec.rb:23:in `run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/lib/bundler/cli.rb:484:in `exec'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/lib/bundler/cli.rb:31:in `dispatch'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/lib/bundler/cli.rb:25:in `start'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/exe/bundle:48:in `block in <main>'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
     # /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/bundler-2.3.4/exe/bundle:36:in `<main>'
     # org/jruby/RubyKernel.java:1052:in `load'
     # /home/runner/.rubies/jruby-9.3.2.0/bin/bundle:23:in `<main>'
     # 
     #   Showing full backtrace because every line was filtered out.
     #   See docs for RSpec::Configuration#backtrace_exclusion_patterns and
     #   RSpec::Configuration#backtrace_inclusion_patterns for more information.
     # ------------------
     # --- Caused by: ---
     # Java::JavaLang::ArrayIndexOutOfBoundsException:
     #   -32624
     #   org.jruby.parser.ParserConfiguration.coverLine(ParserConfiguration.java:193)

Environment Information

Provide at least:

  • JRuby version 9.3.20
  • Operating system and platform Mac OSX and Ubuntu

Other relevant info you may wish to add:

  • Installed or activated gems
  • Application/framework version rails 6.1.4.4
  • Environment variables

Expected Behavior

  • Describe your expectation of how JRuby should behave, perhaps by showing how CRuby/MRI behaves.
  • Provide an executable Ruby script or a link to an example repository.

Actual Behavior

  • Describe or show the actual behavior.
  • Provide text or screen capture showing the behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions