Skip to content

profiler crashes with java.lang.RuntimeException: BUG: refined marker called as method #6038

@ilikeorangutans

Description

@ilikeorangutans

Environment

Provide at least:

  • JRuby version: jruby 9.2.9.0 (2.5.7) 2019-10-30 458ad3e OpenJDK 64-Bit Server VM 25.232-b09 on 1.8.0_232-b09 +jit [darwin-x86_64]
  • Operating system and platform Darwin 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64

Other relevant info you may wish to add:

  • Installed or activated gems: graphql
  • Enabled profiler via profile

Expected Behavior

Not crash.

Actual Behavior

Jruby crashes when loading the graphql gem which uses Refinements.

Full stack trace, excerpt:

java.lang.RuntimeException: BUG: refined marker called as method
        at org.jruby.internal.runtime.methods.RefinedWrapper.call(RefinedWrapper.java:68)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:196)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.internal.runtime.methods.ProfilingDynamicMethod.call(ProfilingDynamicMethod.java:54)
        at org.jruby.runtime.callsite.RefinedCachingCallSite.call(RefinedCachingCallSite.java:59)
        at Users.jakob.$_dot_gem.jruby.$2_dot_5_dot_7.gems.graphql_minus_1_dot_9_dot_13.lib.graphql.schema.field.invokeOther16:-@(/Users/jakob/.gem/jruby/2.5.7/gems/graphql-1.9.13/lib/graphql/schema/field.rb:177)
        at Users.jakob.$_dot_gem.jruby.$2_dot_5_dot_7.gems.graphql_minus_1_dot_9_dot_13.lib.graphql.schema.field.RUBY$method$initialize$0(/Users/jakob/.gem/jruby/2.5.7/gems/graphql-1.9.13/lib/graphql/schema/field.rb:177)
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:84)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70)

Reproduce

jruby --profile -e 'module X; refine(String) { def blah; end }; end; using X; "foo".blah'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions