arton / rjb

Ruby Java Bridge
https://www.artonx.org/collabo/backyard/?RubyJavaBridge
GNU Lesser General Public License v2.1
117 stars 34 forks source link

Segfault on macOS High Sierra #61

Open sometimesfood opened 6 years ago

sometimesfood commented 6 years ago

rjb seems to have stopped working on macOS High Sierra (10.13.4). Running Rjb::load results in the following error message:

Segmentation fault at 0x00000000000000

I happened to have a clean install lying around to verify the problem does not only occur in my specific environment.

Steps to reproduce on a fresh macOS High Sierra install (Mac Command Line Developer Tools installed):

bash-3.2$ gem install --no-ri --no-rdoc --user-install -v 1.5.5 rjb
# […]
bash-3.2$ ruby -e "require 'rjb'; Rjb::load"

Results:

-e:1: [BUG] Segmentation fault at 0x00000000000000
ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:                    
     * ~/Library/Logs/CrashReporter                                         
     * /Library/Logs/CrashReporter                                          
     * ~/Library/Logs/DiagnosticReports                                     
     * /Library/Logs/DiagnosticReports                                      
   for more details.                                                        
Don't forget to include the above Crash Report log file in bug reports.     

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0007 e:000006 CFUNC  :load
c:0002 p:0019 s:0004 E:000ac0 EVAL   -e:1 [FINISH]
c:0001 p:0000 s:0002 E:0019a0 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:1:in `<main>'
-e:1:in `load'

-- Machine register context ------------------------------------------------
 rax: 0x0000000000000000 rbx: 0x000000010cd2fc0c rcx: 0x0000000000000000
 rdx: 0x0000000000000008 rdi: 0x00007fff7ed12e00 rsi: 0x00007fffb72fc770
 rbp: 0x00007ffee4e2fc40 rsp: 0x00007ffee4e2fc28  r8: 0x000000000012f0e1
  r9: 0x00007fffb72fbda8 r10: 0x00007ffee4e2fc30 r11: 0x0000000000000206
 r12: 0x0000000000000001 r13: 0x0000000000000030 r14: 0x00007ffee4e320c0
 r15: 0x000000010af48ab8 rip: 0x0000000000000000 rfl: 0x0000000000010246

-- C level backtrace information -------------------------------------------

Environment:

bash-3.2$ which ruby
/usr/bin/ruby
bash-3.2$ ruby --version
ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
bash-3.2$ which java
/usr/bin/java
bash-3.2$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
bash-3.2$ /usr/libexec/java_home 
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home

Do you have any idea on what might be going wrong here? I would be happy to provide more information if needed.

arton commented 6 years ago

Hi I have no idea at this time. I wonder if you could show me the output of

ruby -d -e "require 'rjb'; p ENV['JAVA_HOME']; p ENV['JVM_LIB']"

Regards

sometimesfood commented 6 years ago

Thanks for your quick response!

Sure, no problem:

bash-3.2$ ruby -d -e "require 'rjb'; p ENV['JAVA_HOME']; p ENV['JVM_LIB']"
Exception `LoadError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb:1241 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb:1250 - cannot load such file -- rubygems/defaults/ruby
Exception `LoadError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- did_you_mean
Exception `LoadError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- rjb
Exception `LoadError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- rubinius/ffi
Exception `LoadError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:132 - cannot load such file -- rubinius/ffi
nil
"/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/server/libjvm.dylib"

I never set JAVA_HOME manually on macOS. /usr/libexec/java_home seems to detect the correct path:

bash-3.2$ /usr/libexec/java_home 
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
arton commented 5 years ago

Hum It seems that your version of rjb is not build with ruby of your version. I wonder if you could 'gem uninstall rjb; gem install rjb'

sometimesfood commented 4 years ago

Sorry for the extremely late reply, for some reason I did not see a notification for your original answer. I just ran into this bug again and thought I'd check the issue tracker.

It seems that your version of rjb is not build with ruby of your version. I wonder if you could 'gem uninstall rjb; gem install rjb'

I don't think that the 2.3.0 component in the path above corresponds to the exact Ruby version number I used to build rjb – that's just the library version. I just reinstalled rjb 1.6.1 with the exact same result as above.

sometimesfood commented 4 years ago

Btw, rjb works just fine whenever I use a Ruby different to the macOS default system version.

I just installed Ruby 2.5.8 using ruby-install and everything seems to be working without any problems.

arton commented 4 years ago

@sometimesfood Do you show the output of

 ruby -rrjb -e 'puts $LOADED_FEATURES'

to me?

sometimesfood commented 4 years ago

Sure, here you go:

~ % ruby -rrjb -e 'puts $LOADED_FEATURES'
enumerator.so
thread.rb
rational.so
complex.so
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/enc/encdb.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/enc/trans/transdb.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/unicode_normalize.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/compatibility.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/defaults.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/deprecate.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/errors.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/version.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/requirement.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/platform.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/basic_specification.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/stub_specification.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/util/list.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/stringio.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/rfc2396_parser.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/rfc3986_parser.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/common.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/generic.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/ftp.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/http.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/https.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/ldap.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/ldaps.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/mailto.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/specification.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/exceptions.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/monitor.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/path_support.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/version.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/levenshtein.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/jaro_winkler.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkable.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/delegate.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/method_name_checker.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/null_checker.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/formatter.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean.rb
/Users/testuser/.gem/ruby/2.3.0/gems/rjb-1.6.1/lib/rjbcore.bundle
/Users/testuser/.gem/ruby/2.3.0/gems/rjb-1.6.1/lib/rjb.rb
arton commented 4 years ago

Umm... It seems Ruby's version is correct, it shows that all libraries are loaded from 2.3.0 directories. I am curious and have no clue. If your ruby ran as 32bit side of universal binary, but Java was 64bit binary because of your previous comments, it should crush but I'm not certain.

sometimesfood commented 4 years ago

Both Ruby as well as Java are universal binaries:

~ % file =ruby
/usr/bin/ruby: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [i386:Mach-O executable i386]
/usr/bin/ruby (for architecture x86_64):    Mach-O 64-bit executable x86_64
/usr/bin/ruby (for architecture i386):  Mach-O executable i386
~ % file =java
/usr/bin/java: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [i386:Mach-O executable i386]
/usr/bin/java (for architecture x86_64):    Mach-O 64-bit executable x86_64
/usr/bin/java (for architecture i386):  Mach-O executable i386

Using a custom-built Ruby installed using ruby-install works fine as a workaround, but if there's anything I can do to help you diagnose this, just let me know!

arton commented 4 years ago

I wonder if you could show me the output of

 ruby -rfiddle -e 'puts $LOADED_FEATURES'

fiddle is the core dependency of Rjb which loads external library such as jvm.

sometimesfood commented 4 years ago
~ % ruby -rfiddle -e 'puts $LOADED_FEATURES'
enumerator.so
thread.rb
rational.so
complex.so
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/enc/encdb.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/enc/trans/transdb.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/unicode_normalize.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/compatibility.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/defaults.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/deprecate.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/errors.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/version.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/requirement.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/platform.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/basic_specification.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/stub_specification.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/util/list.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/stringio.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/rfc2396_parser.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/rfc3986_parser.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/common.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/generic.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/ftp.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/http.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/https.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/ldap.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/ldaps.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/mailto.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/specification.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/exceptions.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/monitor.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/path_support.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/version.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/levenshtein.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/jaro_winkler.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkable.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/delegate.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/method_name_checker.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/null_checker.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/formatter.rb
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/fiddle.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fiddle/function.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fiddle/closure.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fiddle.rb
sometimesfood commented 4 years ago

I just noticed that the error message in my initial bug report seems to have been truncated; here's the complete output (including a C level backtrace):

~ % ruby -rrjb -e 'Rjb.load'
-e:1: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:                    
     * ~/Library/Logs/CrashReporter                                         
     * /Library/Logs/CrashReporter                                          
     * ~/Library/Logs/DiagnosticReports                                     
     * /Library/Logs/DiagnosticReports                                      
   for more details.                                                        
Don't forget to include the above Crash Report log file in bug reports.     

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0007 e:000006 CFUNC  :load
c:0002 p:0012 s:0004 E:002330 EVAL   -e:1 [FINISH]
c:0001 p:0000 s:0002 E:000550 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:1:in `<main>'
-e:1:in `load'

-- Machine register context ------------------------------------------------
 rax: 0x0000000000000000 rbx: 0x000000010244bc0c rcx: 0x0000000000000000
 rdx: 0x0000000000000000 rdi: 0x00007fff7ed48d54 rsi: 0x00007fffb5489eb8
 rbp: 0x00007ffeedde7bf0 rsp: 0x00007ffeedde7bd8  r8: 0x000000000019f482
  r9: 0x00007fffb5489920 r10: 0x00007fffb5489928 r11: 0x0000000000000206
 r12: 0x0000000000000001 r13: 0x0000000000000030 r14: 0x00007ffeeddea070
 r15: 0x0000000101fd4ad0 rip: 0x0000000000000000 rfl: 0x0000000000010246

-- C level backtrace information -------------------------------------------
0   libruby.2.3.0.dylib                 0x00007fff5dc01102 rb_print_backtrace + 29
1   libruby.2.3.0.dylib                 0x00007fff5dc012d1 rb_vm_bugreport + 355
2   libruby.2.3.0.dylib                 0x00007fff5dafc711 rb_bug_context + 206
3   libruby.2.3.0.dylib                 0x00007fff5db9794c Init_signal + 3247
4   libsystem_platform.dylib            0x00007fff7ef23b5d _sigtramp + 29
5   ???                                 0x0000000000000000 0x0 + 0
6   libdyld.dylib                       0x00007fff7ed3969a _dyld_bind_fully_image_containing_address + 49
7   libjvm.dylib                        0x000000010244bcda _ZN2os4initEv + 206
8   libjvm.dylib                        0x0000000102525fee _ZN7Threads9create_vmEP14JavaVMInitArgsPb + 78
9   libjvm.dylib                        0x00000001022f6d15 JNI_CreateJavaVM + 118
10  rjbcore.bundle                      0x0000000101fca370 rjb_create_jvm + 745
11  rjbcore.bundle                      0x0000000101fcb463 rjb_s_load + 414
12  libruby.2.3.0.dylib                 0x00007fff5dbf9236 rb_vm_fstring_table + 4981
13  libruby.2.3.0.dylib                 0x00007fff5dbea1cd rb_vm_get_insns_address_table + 8278
14  libruby.2.3.0.dylib                 0x00007fff5dbf5915 rb_iseq_eval + 451
15  libruby.2.3.0.dylib                 0x00007fff5db0115c ruby_exec_node + 232
16  libruby.2.3.0.dylib                 0x00007fff5db0104f ruby_run_node + 39
17  ruby                                0x0000000101e161be main + 98

-- Other runtime information -----------------------------------------------

* Loaded script: -e

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/enc/encdb.bundle
    5 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/enc/trans/transdb.bundle
    6 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/unicode_normalize.rb
    7 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb
    8 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/compatibility.rb
    9 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/defaults.rb
   10 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/deprecate.rb
   11 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/errors.rb
   12 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/version.rb
   13 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/requirement.rb
   14 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/platform.rb
   15 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/basic_specification.rb
   16 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/stub_specification.rb
   17 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/util/list.rb
   18 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/stringio.bundle
   19 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/rfc2396_parser.rb
   20 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/rfc3986_parser.rb
   21 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/common.rb
   22 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/generic.rb
   23 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/ftp.rb
   24 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/http.rb
   25 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/https.rb
   26 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/ldap.rb
   27 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/ldaps.rb
   28 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri/mailto.rb
   29 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/uri.rb
   30 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/specification.rb
   31 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/exceptions.rb
   32 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency.rb
   33 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb
   34 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/monitor.rb
   35 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb
   36 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb
   37 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/path_support.rb
   38 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/version.rb
   39 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb
   40 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/levenshtein.rb
   41 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/jaro_winkler.rb
   42 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkable.rb
   43 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/delegate.rb
   44 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   45 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   46 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb
   47 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/method_name_checker.rb
   48 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/null_checker.rb
   49 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/formatter.rb
   50 /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean.rb
   51 /Users/testuser/.gem/ruby/2.3.0/gems/rjb-1.6.1/lib/rjbcore.bundle
   52 /Users/testuser/.gem/ruby/2.3.0/gems/rjb-1.6.1/lib/rjb.rb
   53 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/fiddle.bundle
   54 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fiddle/function.rb
   55 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fiddle/closure.rb
   56 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fiddle.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
arton commented 4 years ago

Hi

It seems the problem is behind your system, not rjb, ruby and jvm.

Because the stack trace (caller-callee bottom to up) show that

5   ???                                 0x0000000000000000 0x0 + 0
6   libdyld.dylib                       0x00007fff7ed3969a _dyld_bind_fully_image_containing_address + 49
7   libjvm.dylib                        0x000000010244bcda _ZN2os4initEv + 206
8   libjvm.dylib                        0x0000000102525fee _ZN7Threads9create_vmEP14JavaVMInitArgsPb + 78
9   libjvm.dylib                        0x00000001022f6d15 JNI_CreateJavaVM + 118
10  rjbcore.bundle 

This means 10:rjbcore called 9:libjvm. 9-7 is libjvm internal function call. 7:libjvm called 6:libdyld.dylib (= OSX system module) and libdyld crushed (5:) 4 - 1 is exception trapped code and not the crush itself.

Do you investigate OSX libdyld crush report in anyway?

sometimesfood commented 4 years ago

Thank you for your help. The system in question is a fairly vanilla macOS Mojave (10.14.6) machine. I can reproduce the same error on a different system (also a macOS Mojave system).

Do you investigate OSX libdyld crush report in anyway?

I saved the crash report and submitted it to Apple. However, I have not tried attaching a debugger to the process yet, since I would have to disable System Integrity Protection in order to do so. Also, I don't think I would know what to look for anyway, but if you would like to investigate any further, just let me know if there's anything I can help you with!

If you think that this is not an issue with rjb, please feel free to close this issue if you do not want to investigate any further. I'd be happy to help debugging this issue but I can completely understand if you would prefer not to devote any more time to this issue.