Issue #12874 has been updated by Kazuki Yamaguchi.

Status changed from Open to Third Party's Issue

Judging from the backtrace, the issue is in EventMachine. Please report to the EventMachine project.

----------------------------------------
Bug #12874: Eventmachine recompile with openssl-win64 error
https://bugs.ruby-lang.org/issues/12874#change-61375

* Author: Binh Minh Nguyen
* Status: Third Party's Issue
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.5p319 (2016-04-26 revision 54774) [x64-mingw32]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
eventmachine recompile with ruby225-32 and Win32 OpenSSL v1.0.2j run ok (almost only way) but can't run when recompile with ruby225-64 and (Win64 OpenSSL v1.0.2j or Win64 OpenSSL v1.1.0b)

detail:

```

PS C:\Code\Gems\eventmachine> gem install eventmachine --platform ruby -- --with-ssl-dir=C:\openssl-win64
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-ssl-dir=C:\openssl-win64'
This could take a while...
Successfully installed eventmachine-1.2.0.1
Parsing documentation for eventmachine-1.2.0.1
Installing ri documentation for eventmachine-1.2.0.1
Done installing documentation for eventmachine after 6 seconds
1 gem installed
PS C:\Code\Gems\eventmachine> ruby

require "eventmachine"
module Handler
  def post_init
    puts "Starting TLS"
    start_tls
  end

  def ssl_handshake_completed
    puts get_peer_cert
    close_connection
  end

  def unbind
    EventMachine::stop_event_loop
  end
end

 EventMachine.run do
   EventMachine.connect "mail.google.com", 443, Handler
end
^Z
Starting TLS
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/connection.rb:459: [BUG] Segmentation fault
ruby 2.2.5p319 (2016-04-26 revision 54774) [x64-mingw32]

-- Control frame information -----------------------------------------------
c:0014 p:---- s:0069 e:000068 CFUNC  :start_tls
c:0013 p:0267 s:0065 e:000064 METHOD C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/connection.rb:45
9
c:0012 p:0015 s:0051 e:000050 METHOD -:6
c:0011 p:0024 s:0048 e:000047 BLOCK  C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/connection.rb:58
 [FINISH]
c:0010 p:---- s:0046 e:000045 CFUNC  :instance_eval
c:0009 p:0009 s:0043 e:000042 METHOD C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/connection.rb:49
c:0008 p:0107 s:0038 e:000037 METHOD C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:683
c:0007 p:0027 s:0026 e:000025 METHOD C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:653
c:0006 p:0024 s:0018 e:000017 BLOCK  -:20 [FINISH]
c:0005 p:---- s:0016 e:000015 CFUNC  :call
c:0004 p:---- s:0014 e:000013 CFUNC  :run_machine
c:0003 p:0307 s:0011 e:000010 METHOD C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194
c:0002 p:0029 s:0004 E:000ae0 EVAL   -:19 [FINISH]
c:0001 p:0000 s:0002 E:000010 TOP    [FINISH]

-- Ruby level backtrace information ----------------------------------------
-:19:in `<main>'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in `run'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in `run_machine'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in `call'
-:20:in `block in <main>'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:653:in `connect'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:683:in `bind_connect'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/connection.rb:49:in `new'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/connection.rb:49:in `instance_eval'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/connection.rb:58:in `block in new'
-:6:in `post_init'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/connection.rb:459:in `start_tls'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/connection.rb:459:in `start_tls'

-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(ZwWaitForSingleObject+0x14) [0x00007FFFBD1C4ED4]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObjectEx+0x8f) [0x00007FFFBA3A75FF]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_bugreport+0xa4) [0x00000000649A1AB4]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_bug_context+0x62) [0x000000006484BDD2]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_check_safe_obj+0x3b2) [0x000000006491C332]
 [0x0000000000401A85]
C:\WINDOWS\SYSTEM32\ntdll.dll(_C_specific_handler+0x96) [0x00007FFFBD1B5946]
C:\WINDOWS\SYSTEM32\ntdll.dll(_chkstk+0x11d) [0x00007FFFBD1C991D]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlImageNtHeaderEx+0x483) [0x00007FFFBD1686D3]
C:\WINDOWS\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x3a) [0x00007FFFBD1C8A3A]
C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\eventmachine-1.2.0.1\lib\rubyeventmachine.so(Init_rubyeventmachine+0x47d3) [0x000
00000673E4148]
C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\eventmachine-1.2.0.1\lib\rubyeventmachine.so(Init_rubyeventmachine+0x24f1) [0x000
00000673E1E66]
C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\eventmachine-1.2.0.1\lib\rubyeventmachine.so(Init_rubyeventmachine+0x35d2) [0x000
00000673E2F47]
 [0x00000000673CAB2A]
 [0x00000000673C45A3]
 [0x00000000673DC949]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_error_arity+0x1f3) [0x000000006498B3F3]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_f_send+0x771) [0x000000006499A991]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_localjump_error+0x1dab) [0x000000006499095B]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_localjump_error+0x6171) [0x0000000064994D21]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_funcall+0x9b6) [0x00000000649987D6]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_invoke_proc+0x4a3) [0x0000000064999063]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_obj_instance_eval+0x121) [0x000000006499D0E1]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_error_arity+0x1f3) [0x000000006498B3F3]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_f_send+0x771) [0x000000006499A991]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_localjump_error+0x1d0c) [0x00000000649908BC]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_localjump_error+0x6171) [0x0000000064994D21]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_funcall+0x9b6) [0x00000000649987D6]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_funcall+0xd78) [0x0000000064998B98]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_invoke_proc+0x27) [0x0000000064998BE7]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_obj_singleton_method+0x54b) [0x0000000064859E0B]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_localjump_error+0x66db) [0x000000006499528B]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_call+0x116) [0x0000000064995636]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_funcall+0xdc) [0x0000000064997EFC]
 [0x00000000673DC332]
 [0x00000000673DC585]
 [0x00000000673D27CB]
 [0x00000000673D10FE]
 [0x00000000673D10D5]
 [0x00000000673C3BA4]
 [0x00000000673DC708]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_error_arity+0x1f3) [0x000000006498B3F3]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_f_send+0x771) [0x000000006499A991]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_localjump_error+0x1dab) [0x000000006499095B]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_vm_localjump_error+0x6171) [0x0000000064994D21]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_iseq_eval_main+0x1d0) [0x000000006499E050]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(rb_check_copyable+0x3131) [0x0000000064850DF1]
C:\Ruby22-x64\bin\x64-msvcrt-ruby220.dll(ruby_run_node+0x51) [0x0000000064853D31]
 [0x0000000000402D14]
 [0x00000000004013D7]
 [0x00000000004014F8]
C:\WINDOWS\System32\KERNEL32.DLL(BaseThreadInitThunk+0x14) [0x00007FFFBD078364]

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

* Loaded script: -

* Loaded features:

    0 enumerator.so
    1 rational.so
    2 complex.so
    3 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/enc/encdb.so
    4 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/enc/trans/transdb.so
    5 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/enc/windows_1252.so
    6 C:/Ruby22-x64/lib/ruby/2.2.0/unicode_normalize.rb
    7 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/rbconfig.rb
    8 thread.rb
    9 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/thread.so
   10 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/compatibility.rb
   11 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/defaults.rb
   12 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/deprecate.rb
   13 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/errors.rb
   14 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/version.rb
   15 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/requirement.rb
   16 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/platform.rb
   17 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb
   18 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/stub_specification.rb
   19 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/util/list.rb
   20 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/stringio.so
   21 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb
   22 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/exceptions.rb
   23 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/defaults/operating_system.rb
   24 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb
   25 C:/Ruby22-x64/lib/ruby/2.2.0/monitor.rb
   26 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb
   27 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems.rb
   28 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/path_support.rb
   29 C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb
   30 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/rubyeventmachine.so
   31 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/version.rb
   32 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/pool.rb
   33 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/deferrable.rb
   34 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/future.rb
   35 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/streamer.rb
   36 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/spawnable.rb
   37 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/processes.rb
   38 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/iterator.rb
   39 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/buftok.rb
   40 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/timers.rb
   41 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/protocols.rb
   42 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/connection.rb
   43 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/callback.rb
   44 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/queue.rb
   45 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/channel.rb
   46 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/file_watch.rb
   47 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/process_watch.rb
   48 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/tick_loop.rb
   49 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/fiddle.so
   50 C:/Ruby22-x64/lib/ruby/2.2.0/fiddle/function.rb
   51 C:/Ruby22-x64/lib/ruby/2.2.0/fiddle/closure.rb
   52 C:/Ruby22-x64/lib/ruby/2.2.0/fiddle.rb
   53 C:/Ruby22-x64/lib/ruby/2.2.0/fiddle/value.rb
   54 C:/Ruby22-x64/lib/ruby/2.2.0/fiddle/pack.rb
   55 C:/Ruby22-x64/lib/ruby/2.2.0/fiddle/struct.rb
   56 C:/Ruby22-x64/lib/ruby/2.2.0/fiddle/cparser.rb
   57 C:/Ruby22-x64/lib/ruby/2.2.0/fiddle/import.rb
   58 C:/Ruby22-x64/lib/ruby/2.2.0/win32/importer.rb
   59 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/enc/utf_16le.so
   60 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/enc/trans/utf_16_32.so
   61 C:/Ruby22-x64/lib/ruby/2.2.0/win32/registry.rb
   62 C:/Ruby22-x64/lib/ruby/2.2.0/win32/resolv.rb
   63 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/resolver.rb
   64 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/completion.rb
   65 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/em/threaded_resource.rb
   66 C:/Ruby22-x64/lib/ruby/2.2.0/shellwords.rb
   67 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/socket.so
   68 C:/Ruby22-x64/lib/ruby/2.2.0/socket.rb
   69 C:/Ruby22-x64/lib/ruby/2.2.0/timeout.rb
   70 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/digest.so
   71 C:/Ruby22-x64/lib/ruby/2.2.0/digest.rb
   72 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/openssl.so
   73 C:/Ruby22-x64/lib/ruby/2.2.0/openssl/bn.rb
   74 C:/Ruby22-x64/lib/ruby/2.2.0/openssl/cipher.rb
   75 C:/Ruby22-x64/lib/ruby/2.2.0/openssl/config.rb
   76 C:/Ruby22-x64/lib/ruby/2.2.0/openssl/digest.rb
   77 C:/Ruby22-x64/lib/ruby/2.2.0/openssl/x509.rb
   78 C:/Ruby22-x64/lib/ruby/2.2.0/openssl/buffering.rb
   79 C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32/fcntl.so
   80 C:/Ruby22-x64/lib/ruby/2.2.0/openssl/ssl.rb
   81 C:/Ruby22-x64/lib/ruby/2.2.0/openssl.rb
   82 C:/Ruby22-x64/lib/ruby/2.2.0/securerandom.rb
   83 C:/Ruby22-x64/lib/ruby/2.2.0/resolv.rb
   84 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/eventmachine-1.2.0.1/lib/eventmachine.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


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
```



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>