Skip to content

Pry-remote does not work with jruby-9.4.8.0 #8323

Open
@gacha

Description

@gacha

A Pry remote session fails using jruby-9.4.8.0 but works with jruby-9.3.15.0 and older versions. Tested different Java versions, the same result.

Environment Information

No JAVA_OPTS and no JRUBY_OPTS.

jruby 9.4.8.0 (3.1.4) 2024-07-02 4d41e55a67 OpenJDK 64-Bit Server VM 11.0.23+9-LTS on 11.0.23+9-LTS +jit [arm64-darwin]

Darwin m3.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:37 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6031 arm64

The code

require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'pry-remote'
end

a = 1
binding.remote_pry

Expected Behavior

Pry-remote connects to the process and we see a prompt.

Actual Behavior

We got an error

warning: thread "Ruby-0-Thread-1: /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:1555" terminated with exception (report_on_exception is true):
RangeError: 0x0000000000000fa4 is not id value
         _id2ref at org/jruby/RubyObjectSpace.java:151
          to_obj at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:366
          to_obj at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:1528
          to_obj at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:1847
           _load at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:1054
            load at org/jruby/RubyMarshal.java:151
            load at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:597
     synchronize at org/jruby/ext/thread/Mutex.java:171
            load at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:595
      recv_reply at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:640
      recv_reply at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:941
    send_message at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:1324
  method_missing at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:1143
            open at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:1302
  method_missing at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:1142
     with_friend at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:1161
  method_missing at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/stdlib/drb/drb.rb:1141
             run at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/gems/shared/gems/pry-remote-0.1.8/lib/pry-remote.rb:289
          <main> at /Users/username/.rbenv/versions/jruby-9.4.8.0/lib/ruby/gems/shared/gems/pry-remote-0.1.8/bin/pry-remote:4
            load at org/jruby/RubyKernel.java:1220
          <main> at /Users/username/.rbenv/versions/jruby-9.4.8.0/bin/pry-remote:25

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions