Project

General

Profile

Actions

Bug #18024

closed

Ractor crashes when connections are closed in multiple Ractors

Added by tagomoris (Satoshi Tagomori) over 3 years ago. Updated 12 months ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin20]
[ruby-dev:51080]

Description

When multiple Ractors will accept and close connections, that script caused the crash shown below.
This pattern is taken when we want to distribute the overhead of accept to multiple CPU cores.

Script:

require 'socket'

try_times = 10
worker_num = 2

listener = TCPServer.new("127.0.0.1", 8228)
listener.listen(100)
workers = worker_num.times.map do |i|
  Ractor.new(i, listener.dup) do |index, sock|
    while conn = sock.accept
      begin
        data = conn.read
        p "Worker|#{index} Data: #{data}"
        conn.close
      rescue => e
        p "Worker|#{index} #{e.full_message}"
      end
    end
  rescue => e
    $stderr.puts "Error, worker#{index}: #{e.full_message}"
  end
end

p "Starting a sender"
sender = Ractor.new(try_times) do |tries|
  tries.times.each do
    s = TCPSocket.new("127.0.0.1", 8228)
    s.write("yay")
  ensure
    s.close rescue nil
  end
end

sender.take
workers.each{|w| w.take}
p "End"

Crash report:

<internal:ractor>:267: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues.
"Starting a sender"
"Worker|1 Data: yay"
snippets/ractor_accept.rb:30: [BUG] Bus Error at 0x00000014000001f5
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin20]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:                    
     * ~/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:0006 p:---- s:0023 e:000022 CFUNC  :close
c:0005 p:0028 s:0019 e:000017 BLOCK  snippets/ractor_accept.rb:30 [FINISH]
c:0004 p:---- s:0014 e:000013 CFUNC  :times
c:0003 p:---- s:0011 e:000010 CFUNC  :each
c:0002 p:0008 s:0007 e:000006 BLOCK  snippets/ractor_accept.rb:26 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
snippets/ractor_accept.rb:26:in `block in <main>'
snippets/ractor_accept.rb:26:in `each'
snippets/ractor_accept.rb:26:in `times'
snippets/ractor_accept.rb:30:in `block (2 levels) in <main>'
snippets/ractor_accept.rb:30:in `close'

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

* Loaded script: snippets/ractor_accept.rb

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 ruby2_keywords.rb
    5 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
    6 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/trans/transdb.bundle
    7 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/rbconfig.rb
    8 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/compatibility.rb
    9 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/defaults.rb
   10 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/deprecate.rb
   11 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/errors.rb
   12 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/exceptions.rb
   13 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/basic_specification.rb
   14 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/stub_specification.rb
   15 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/text.rb
   16 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/user_interaction.rb
   17 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/specification_policy.rb
   18 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/util/list.rb
   19 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/platform.rb
   20 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/version.rb
   21 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/requirement.rb
   22 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/specification.rb
   23 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/util.rb
   24 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/dependency.rb
   25 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_gem.rb
   26 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/monitor.bundle
   27 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/monitor.rb
   28 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb
   29 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_warn.rb
   30 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems.rb
   31 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/path_support.rb
   32 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/version.rb
   33 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/core_ext/name_error.rb
   34 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/levenshtein.rb
   35 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/jaro_winkler.rb
   36 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/spell_checker.rb
   37 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   38 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   39 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/spell_checkers/name_error_checkers.rb
   40 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/spell_checkers/method_name_checker.rb
   41 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/spell_checkers/key_error_checker.rb
   42 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/spell_checkers/null_checker.rb
   43 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/tree_spell_checker.rb
   44 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/spell_checkers/require_path_checker.rb
   45 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/formatters/plain_formatter.rb
   46 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean.rb
   47 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/socket.bundle
   48 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/io/wait.bundle
   49 /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/socket.rb

* Process memory map:

1042f8000-1042fc000 r-x /Users/tagomoris/.rbenv/versions/3.0.0/bin/ruby
1042fc000-104300000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/bin/ruby
104300000-104304000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/bin/ruby
104304000-104308000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/bin/ruby
104308000-104310000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104310000-104314000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104314000-104318000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104318000-10431c000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
10431c000-104320000 --- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104320000-104328000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104328000-10432c000 --- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
10432c000-104330000 --- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104330000-104338000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104338000-10433c000 --- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
10433c000-104340000 --- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104340000-104348000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104348000-10434c000 --- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
10434c000-104350000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104350000-104354000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104354000-104394000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104394000-104398000 r-x /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
104398000-10439c000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
10439c000-1043a0000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
1043a0000-1043a4000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/encdb.bundle
1043a4000-1043a8000 r-x /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/trans/transdb.bundle
1043a8000-1043ac000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/trans/transdb.bundle
1043ac000-1043b0000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/trans/transdb.bundle
1043b0000-1043b4000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/enc/trans/transdb.bundle
1043b4000-1043b8000 r-x /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/monitor.bundle
1043b8000-1043bc000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/monitor.bundle
1043bc000-1043c0000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/monitor.bundle
1043c0000-1043c4000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/monitor.bundle
1043c4000-1043e8000 r-x /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/socket.bundle
1043e8000-1043ec000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/socket.bundle
1043ec000-1043f0000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/socket.bundle
1043f0000-104400000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/socket.bundle
104400000-104404000 r-x /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/io/wait.bundle
104404000-104408000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/io/wait.bundle
104408000-10440c000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/io/wait.bundle
10440c000-104410000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/ruby/3.0.0/arm64-darwin20/io/wait.bundle
104568000-1045e8000 r-x /usr/lib/dyld
1045e8000-1045f0000 r-- /usr/lib/dyld
1045f0000-1045f4000 rw- /usr/lib/dyld
1045f4000-104628000 rw- /usr/lib/dyld
104628000-10466c000 r-- /usr/lib/dyld
10466c000-104670000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/libruby.3.0.dylib
104670000-104974000 r-x /Users/tagomoris/.rbenv/versions/3.0.0/lib/libruby.3.0.dylib
104974000-10497c000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/libruby.3.0.dylib
10497c000-104980000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/libruby.3.0.dylib
104980000-10498c000 rw- /Users/tagomoris/.rbenv/versions/3.0.0/lib/libruby.3.0.dylib
10498c000-104a7c000 r-- /Users/tagomoris/.rbenv/versions/3.0.0/lib/libruby.3.0.dylib
104a7c000-104a80000 ---
104a80000-104b24000 rw-
104b24000-104b28000 ---
104b28000-104bcc000 rw-
104bcc000-104bd0000 ---
104bd0000-104c74000 rw-
104c74000-104c78000 ---
104c78000-104d1c000 rw-
104d1c000-104d20000 ---
104d20000-104dc4000 rw-
104dc4000-104dc8000 ---
104dc8000-104e6c000 rw-
104e6c000-104e70000 ---
104e70000-104f14000 rw-
104f14000-104f18000 ---
104f18000-104fbc000 rw-
104fbc000-104fc0000 ---
104fc0000-105064000 rw-
105064000-105068000 ---
105068000-10510c000 rw-
10510c000-105110000 ---
105110000-1051b4000 rw-
1051b4000-1051b8000 ---
1051b8000-10525c000 rw-
10525c000-105260000 ---
105260000-105304000 rw-
105304000-105308000 ---
105308000-1053ac000 rw-
1053ac000-1053b0000 ---
1053b0000-105454000 rw-
105454000-105458000 ---
105458000-1054fc000 rw-
1054fc000-105500000 ---
105500000-1055a4000 rw-
1055a4000-1055a8000 ---
1055a8000-10564c000 rw-
10564c000-105650000 ---
105650000-1056f4000 rw-
1056f4000-1056f8000 ---
1056f8000-10579c000 rw-
10579c000-1057a0000 ---
1057a0000-105844000 rw-
105844000-105848000 ---
105848000-1058ec000 rw-
1058ec000-1058f0000 ---
1058f0000-105994000 rw-
105994000-105998000 ---
105998000-105a3c000 rw-
105a3c000-105a40000 ---
105a40000-105ae4000 rw-
105ae4000-105ae8000 ---
105ae8000-105b8c000 rw-
105b8c000-105b90000 ---
105b90000-105c34000 rw-
105c34000-105c38000 ---
105c38000-105cdc000 rw-
105cdc000-105ce0000 ---
105ce0000-105d84000 rw-
105d84000-105d88000 ---
105d88000-105e2c000 rw-
105e2c000-105e30000 ---
105e30000-105ed4000 rw-
105ed4000-105ed8000 ---
105ed8000-105f7c000 rw-
131e00000-131f00000 rw-
132000000-132800000 rw-
132800000-133000000 rw-
138000000-138800000 rw-
138800000-139000000 rw-
139000000-139800000 rw-
139800000-13a000000 rw-
13a000000-13a800000 rw-
13a800000-13b000000 rw-
13b000000-13b800000 rw-
13b800000-13c000000 rw-
13c000000-13c800000 rw-
13c800000-13d000000 rw-
13d000000-13d800000 rw-
13d800000-13e000000 rw-
13e000000-13e800000 rw-
13e800000-13f000000 rw-
13f000000-13f800000 rw-
13f800000-140000000 rw-
141e00000-141f00000 rw-
141f00000-142000000 rw-
142000000-142800000 rw-
148000000-148800000 rw-
148800000-149000000 rw-
149000000-149800000 rw-
149800000-14a000000 rw-
14a000000-14a800000 rw-
14a800000-14b000000 rw-
14b000000-14b800000 rw-
14b800000-14c000000 rw-
14c000000-14c800000 rw-
14c800000-14d000000 rw-
14d000000-14d800000 rw-
14d800000-14e000000 rw-
14e000000-14e800000 rw-
14e800000-14f000000 rw-
14f000000-14f800000 rw-
14f800000-150000000 rw-
151e00000-151f00000 rw-
151f00000-152000000 rw-
152000000-152800000 rw-
152800000-153000000 rw-
153000000-155000000 rw-
155000000-155004000 rw-
155100000-155200000 rw-
158000000-158800000 rw-
158800000-159000000 rw-
159000000-159800000 rw-
159800000-15a000000 rw-
15a000000-15a800000 rw-
15a800000-15b000000 rw-
15b000000-15b800000 rw-
15b800000-15c000000 rw-
15c000000-15c800000 rw-
15c800000-15d000000 rw-
15d000000-15d800000 rw-
15d800000-15e000000 rw-
15e000000-15e800000 rw-
15e800000-15f000000 rw-
15f000000-15f800000 rw-
15f800000-160000000 rw-
167b08000-16b30c000 ---
16b30c000-16bb08000 rw-
16bb08000-16bb0c000 ---
16bb0c000-16bb94000 rw-
16bb94000-16bb98000 ---
16bb98000-16bda0000 rw-
16bda0000-16bda4000 ---
16bda4000-16bfac000 rw-
16bfac000-16bfb0000 ---
16bfb0000-16c1b8000 rw-
180000000-190000000 r--
190000000-1a0000000 r--
1a0000000-1b0000000 r--
1b0000000-1c0000000 r--
1c0000000-1d0000000 r--
1d0000000-1e0000000 r--
1e0000000-1e6000000 r--
1e6000000-1e6e2c000 r--
1e6e2c000-1e8000000 rw-
1e8000000-1f0000000 r--
1f0000000-1f2000000 r--
1f2000000-1f2bcc000 r--
1f2bcc000-1f4864000 rw-
1f4864000-1f6000000 r--
1f6000000-1f6864000 r--
1f6864000-1fa57c000 r--
1fa57c000-1fc000000 r--
1fc000000-200000000 r--
200000000-210000000 r--
210000000-220000000 r--
220000000-230000000 r--
230000000-240000000 r--
240000000-250000000 r--
250000000-260000000 r--
260000000-270000000 r--
270000000-280000000 r--
fc0000000-1000000000 ---
1000000000-7000000000 ---
[IMPORTANT]
Don't forget to include the Crash Report log file under
DiagnosticReports directory in bug reports.

Abort trap: 6

Files

Updated by tagomoris (Satoshi Tagomori) about 3 years ago

As a follow-up of this report, I found that the same thing happens when:

  • a Ractor accepts connections, then send connections to other Ractor workers
  • Ractor workers read/write from/to connections, then close those

This is a very common server design, so this problem will be caused in many different places in the future.

Script:

require 'socket'

worker_num = 2

sock = TCPServer.new("127.0.0.1", 8228)
workers = worker_num.times.map do |i|
  Ractor.new(i) do |index|
    while conn = Ractor.receive
      begin
        data = conn.readline
        conn.write "HTTP/1.1 200 OK\r\n\r\n"
        conn.close
        conn = nil
      rescue => e
        p "Worker|#{index} #{e.full_message}"
      end
    end
  end
end

p "Starting a listener"
listener = Ractor.new(sock, workers) do |sock, workers|
  workers_num = workers.size
  i = 0
  begin
    while conn = sock.accept
      worker = workers[i % workers_num]
      worker.send(conn, move: true)
      i += 1
    end
  rescue => e
    p "Listener| #{e.full_message}"
  end
end

workers.each{|w| w.take}
p "End"

Run it, then send HTTP requests to 127.0.0.1:8228 with 2 or more parallel connections/threads like wrk -d 3s https:://127.0.0.1:8228/.
https://github.com/wg/wrk

Crash report:

snippets/ractor_server.rb:12: [BUG] Segmentation fault at 0x0000000000000000
ruby 3.1.0dev (2021-08-24T07:18:24Z master bcc5a2b67e) [arm64-darwin20]

-- Crash Report log information --------------------------------------------
   See Crash Report log file in one of the following locations:             
     * ~/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:0014 e:000013 CFUNC  :close
c:0002 p:0024 s:0010 e:000009 BLOCK  snippets/ractor_server.rb:12 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
snippets/ractor_server.rb:12:in `block (2 levels) in <main>'
snippets/ractor_server.rb:12:in `close'

-- Machine register context ------------------------------------------------
 x[0: 0x0000000000000000 x[1: 0x000000014300ac00 x[2: 0x0000000000000000
 x[3: 0x0000000000000000 x[4: 0x000000016d05e734 x[5: 0x0000000000000003
 x[6: 0x000000000000000a x[7: 0x0000000000000000 x[1: 0x0000000000000000
 x[1: 0x000000016d05e798 x[2: 0x000000000000000d x[2: 0x000000014300ac00
 x[2: 0x000000010325af10 x[2: 0x000000014300ad60 x[2: 0x0000000000000000
 x[2: 0x0000000000000002 x[2: 0x0000000143937580 x[2: 0x0000000000000000
 x[2: 0x0000000055550083  lr: 0x000000010312ae30  fp: 0x000000016d05e780
  sp: 0x000000016d05e730

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

* Loaded script: snippets/ractor_server.rb

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 fiber.so
    3 rational.so
    4 complex.so
    5 ruby2_keywords.rb
    6 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
    7 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/trans/transdb.bundle
    8 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/rbconfig.rb
    9 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/compatibility.rb
   10 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/defaults.rb
   11 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/deprecate.rb
   12 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/errors.rb
   13 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/unknown_command_spell_checker.rb
   14 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/exceptions.rb
   15 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/basic_specification.rb
   16 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/stub_specification.rb
   17 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/text.rb
   18 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/user_interaction.rb
   19 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/specification_policy.rb
   20 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/util/list.rb
   21 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/platform.rb
   22 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/version.rb
   23 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/requirement.rb
   24 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/specification.rb
   25 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/util.rb
   26 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/dependency.rb
   27 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/core_ext/kernel_gem.rb
   28 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
   29 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/monitor.rb
   30 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb
   31 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/core_ext/kernel_warn.rb
   32 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems.rb
   33 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/path_support.rb
   34 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/error_highlight/version.rb
   35 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/error_highlight/base.rb
   36 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/error_highlight/formatter.rb
   37 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/error_highlight/core_ext.rb
   38 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/error_highlight.rb
   39 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/version.rb
   40 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/core_ext/name_error.rb
   41 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/levenshtein.rb
   42 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/jaro_winkler.rb
   43 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/spell_checker.rb
   44 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   45 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   46 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/spell_checkers/name_error_checkers.rb
   47 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/spell_checkers/method_name_checker.rb
   48 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/spell_checkers/key_error_checker.rb
   49 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/spell_checkers/null_checker.rb
   50 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/tree_spell_checker.rb
   51 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/spell_checkers/require_path_checker.rb
   52 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean/formatters/plain_formatter.rb
   53 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/did_you_mean.rb
   54 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/socket.bundle
   55 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/io/wait.bundle
   56 /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/socket.rb

* Process memory map:

102f34000-103244000 r-x /Users/tagomoris/.rbenv/versions/3.1.0-dev/bin/ruby
103244000-10324c000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/bin/ruby
10324c000-103250000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/bin/ruby
103250000-10325c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/bin/ruby
10325c000-103348000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/bin/ruby
103348000-103350000 rw- /usr/lib/dyld
103350000-103354000 r-- /usr/lib/dyld
103354000-103358000 r-- /usr/lib/dyld
103358000-10335c000 rw- /usr/lib/dyld
10335c000-1033dc000 r-x /usr/lib/dyld
1033dc000-1033e4000 r-- /usr/lib/dyld
1033e4000-1033e8000 rw- /usr/lib/dyld
1033e8000-10341c000 rw- /usr/lib/dyld
10341c000-103460000 r-- /usr/lib/dyld
103460000-103464000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103464000-103468000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103468000-103470000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103470000-103474000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103474000-103478000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103478000-103480000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103480000-103484000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103484000-103488000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103488000-103490000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103490000-103494000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103494000-103498000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103498000-10349c000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
10349c000-1034dc000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1034e0000-1034e4000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1034e8000-1034ec000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1034f0000-1034f4000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1034f8000-1034fc000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103500000-103504000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103508000-10350c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103510000-103514000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103518000-10351c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103520000-103524000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103528000-10352c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103530000-103534000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103538000-10353c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103540000-103544000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103548000-10354c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103550000-103554000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103558000-10355c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103560000-103564000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103568000-10356c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103570000-103574000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103578000-10357c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103580000-103584000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103588000-10358c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103590000-103594000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
103598000-10359c000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1035a0000-1055a0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1055a0000-1055a4000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1055a4000-105648000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105648000-10564c000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
10564c000-1056f0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1056f0000-1056f4000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1056f4000-105798000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105798000-10579c000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
10579c000-105840000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105840000-105844000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105844000-1058e8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1058e8000-1058ec000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1058ec000-105990000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105990000-105994000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105994000-105a38000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105a38000-105a3c000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105a3c000-105ae0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105ae0000-105ae4000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105ae4000-105b88000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105b88000-105b8c000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105b8c000-105c30000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105c30000-105c34000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105c34000-105cd8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105cd8000-105cdc000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105cdc000-105d80000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105d80000-105d84000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105d84000-105e28000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105e28000-105e2c000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105e2c000-105ed0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105ed0000-105ed4000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105ed4000-105f78000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105f78000-105f7c000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
105f7c000-106020000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106020000-106024000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106024000-1060c8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1060c8000-1060cc000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1060cc000-106170000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106170000-106174000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106174000-106218000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106218000-10621c000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
10621c000-1062c0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1062c0000-1062c4000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1062c4000-106368000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106368000-10636c000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
10636c000-106410000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106410000-106414000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106414000-1064b8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1064b8000-1064bc000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1064bc000-106560000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106560000-106564000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106564000-106608000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106608000-10660c000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
10660c000-1066b0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1066b0000-1066b4000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1066b4000-106758000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106758000-10675c000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
10675c000-106800000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106800000-106804000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106804000-1068a8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1068a8000-1068ac000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1068ac000-106950000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106950000-106954000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106954000-1069f8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1069f8000-1069fc000 --- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
1069fc000-106aa0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106aa0000-106aa4000 r-x /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106aa4000-106aa8000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106aa8000-106aac000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106aac000-106ab0000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/encdb.bundle
106ab0000-106ab4000 r-x /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/trans/transdb.bundle
106ab4000-106ab8000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/trans/transdb.bundle
106ab8000-106abc000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/trans/transdb.bundle
106abc000-106ac0000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/enc/trans/transdb.bundle
106ac4000-106ac8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106acc000-106ad0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106ad4000-106ad8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106adc000-106ae0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106ae4000-106ae8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106aec000-106af0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106af4000-106af8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106afc000-106b00000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b04000-106b08000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b0c000-106b10000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b14000-106b18000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b1c000-106b20000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b24000-106b28000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b2c000-106b30000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b34000-106b38000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b3c000-106b40000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b44000-106b48000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b4c000-106b50000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b54000-106b58000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b5c000-106b60000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b64000-106b68000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b6c000-106b70000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b74000-106b78000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b7c000-106b80000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b84000-106b88000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b8c000-106b90000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b94000-106b98000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106b9c000-106ba0000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106ba0000-106ba4000 r-x /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106ba4000-106ba8000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106ba8000-106bac000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106bac000-106bb0000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/monitor.bundle
106bb0000-106bd4000 r-x /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/socket.bundle
106bd4000-106bd8000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/socket.bundle
106bd8000-106bdc000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/socket.bundle
106bdc000-106bec000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/socket.bundle
106bec000-106bf0000 r-x /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/io/wait.bundle
106bf0000-106bf4000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/io/wait.bundle
106bf4000-106bf8000 rw- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/io/wait.bundle
106bf8000-106bfc000 r-- /Users/tagomoris/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/arm64-darwin20/io/wait.bundle
106c00000-106c04000 rw-
122e00000-122f00000 rw-
123000000-123800000 rw-
123800000-124000000 rw-
124000000-124800000 rw-
124800000-125000000 rw-
128000000-128800000 rw-
128800000-129000000 rw-
129000000-129800000 rw-
129800000-12a000000 rw-
12a000000-12a800000 rw-
12a800000-12b000000 rw-
12b000000-12b800000 rw-
12b800000-12c000000 rw-
12c000000-12c800000 rw-
12c800000-12d000000 rw-
12d000000-12d800000 rw-
12d800000-12e000000 rw-
12e000000-12e800000 rw-
12e800000-12f000000 rw-
12f000000-12f800000 rw-
12f800000-130000000 rw-
132e00000-132f00000 rw-
138000000-138800000 rw-
138800000-139000000 rw-
139000000-139800000 rw-
139800000-13a000000 rw-
13a000000-13a800000 rw-
13a800000-13b000000 rw-
13b000000-13b800000 rw-
13b800000-13c000000 rw-
13c000000-13c800000 rw-
13c800000-13d000000 rw-
13d000000-13d800000 rw-
13d800000-13e000000 rw-
13e000000-13e800000 rw-
13e800000-13f000000 rw-
13f000000-13f800000 rw-
13f800000-140000000 rw-
142e00000-142f00000 rw-
142f00000-143000000 rw-
143000000-143800000 rw-
143800000-143900000 rw-
143900000-143a00000 rw-
143a00000-143b00000 rw-
144000000-144800000 rw-
144800000-145000000 rw-
148000000-148800000 rw-
148800000-149000000 rw-
149000000-149800000 rw-
149800000-14a000000 rw-
14a000000-14a800000 rw-
14a800000-14b000000 rw-
14b000000-14b800000 rw-
14b800000-14c000000 rw-
14c000000-14c800000 rw-
14c800000-14d000000 rw-
14d000000-14d800000 rw-
14d800000-14e000000 rw-
14e000000-14e800000 rw-
14e800000-14f000000 rw-
14f000000-14f800000 rw-
14f800000-150000000 rw-
168ecc000-16c6d0000 ---
16c6d0000-16cecc000 rw-
16cecc000-16ced0000 ---
16ced0000-16cf58000 rw-
16cf58000-16cf5c000 ---
16cf5c000-16d164000 rw-
16d164000-16d168000 ---
16d168000-16d370000 rw-
16d370000-16d374000 ---
16d374000-16d57c000 rw-
180000000-190000000 r--
190000000-1a0000000 r--
1a0000000-1b0000000 r--
1b0000000-1c0000000 r--
1c0000000-1d0000000 r--
1d0000000-1e0000000 r--
1e0000000-1f0000000 r--
1f0000000-1f6000000 r--
1f6000000-1f6d64000 r--
1f6d64000-1f8000000 rw-
1f8000000-200000000 r--
200000000-202000000 r--
202000000-202b14000 r--
202b14000-2047b0000 rw-
2047b0000-206000000 r--
206000000-2067b0000 r--
2067b0000-20a4d0000 r--
20a4d0000-20c000000 r--
20c000000-210000000 r--
210000000-220000000 r--
220000000-230000000 r--
230000000-240000000 r--
240000000-250000000 r--
250000000-260000000 r--
260000000-270000000 r--
270000000-280000000 r--
fc0000000-1000000000 ---
1000000000-7000000000 ---
[IMPORTANT]
Don't forget to include the Crash Report log file under
DiagnosticReports directory in bug reports.

Abort trap: 6

Updated by tagomoris (Satoshi Tagomori) about 3 years ago

I built Ruby from HEAD, and got the crash report again. rb_vm_lock_enter() seems to cause SEGV.
I'm wondering how I can investigate it more.

Thread 3 Crashed:
0   libsystem_kernel.dylib              0x0000000197d08e68 __pthread_kill + 8
1   libsystem_pthread.dylib             0x0000000197d3b43c pthread_kill + 292
2   libsystem_c.dylib                   0x0000000197c83454 abort + 124
3   ruby                                0x0000000102fb08e4 die + 12 (error.c:779)
4   ruby                                0x0000000102fb0ab4 rb_bug_for_fatal_signal + 464 (error.c:819)
5   ruby                                0x00000001030d34b0 sigsegv + 96 (signal.c:961)
6   libsystem_platform.dylib            0x0000000197d86c44 _sigtramp + 56
7   ruby                                0x000000010310ee74 rb_vm_lock_enter + 8 (vm_sync.h:75) [inlined]
8   ruby                                0x000000010310ee74 rb_notify_fd_close + 108 (thread.c:2612)
9   ruby                                0x0000000102fef278 io_close_fptr + 120 (io.c:5017)
10  ruby                                0x0000000102ff9d04 rb_io_close + 4 (io.c:5039) [inlined]
11  ruby                                0x0000000102ff9d04 rb_io_close_m + 52 (io.c:5066)
12  ruby                                0x00000001031636a4 vm_call_cfunc_with_frame + 232 (vm_insnhelper.c:2989)
13  ruby                                0x000000010315c908 vm_sendish + 1208
14  ruby                                0x000000010314494c vm_exec_core + 11448 (insns.def:775)
15  ruby                                0x000000010315831c rb_vm_exec + 2912
16  ruby                                0x0000000103156638 invoke_block + 192 (vm.c:1264) [inlined]
17  ruby                                0x0000000103156638 invoke_iseq_block_from_c + 324 (vm.c:1336) [inlined]
18  ruby                                0x0000000103156638 invoke_block_from_c_proc + 796 (vm.c:1436) [inlined]
19  ruby                                0x0000000103156638 vm_invoke_proc + 888 (vm.c:1466)
20  ruby                                0x0000000103116168 thread_do_start_proc + 352 (thread.c:716)
21  ruby                                0x0000000103115ab8 thread_do_start + 328 (thread.c:760) [inlined]
22  ruby                                0x0000000103115ab8 thread_start_func_2 + 1196 (thread.c:835)
23  ruby                                0x00000001031154a0 thread_start_func_1 + 272 (thread_pthread.c:1051)
24  libsystem_pthread.dylib             0x0000000197d3b878 _pthread_start + 320
25  libsystem_pthread.dylib             0x0000000197d365e0 thread_start + 8

Updated by hsbt (Hiroshi SHIBATA) almost 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to ko1 (Koichi Sasada)

Updated by ko1 (Koichi Sasada) almost 3 years ago

I couldn't repro it on WSL.
now only on MacOS?

Updated by niku (niku _) almost 2 years ago

I also couldn't reproduce it on m2 mac with both ruby versions 3.0.0 which is reported and 3.2.0 the latest.
I hope it helps.

~/src/confirm_bugs.ruby-lang.org/18024 ()
asdf local ruby 3.0.0
~/src/confirm_bugs.ruby-lang.org/18024 ()
ruby --version       
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin22]
~/src/confirm_bugs.ruby-lang.org/18024 ()
ruby description.rb  
<internal:ractor>:267: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues.
"Starting a sender"
"Worker|0 Data: yay"
"Worker|0 Data: yay"
"Worker|0 Data: yay"
"Worker|1 Data: yay"
"Worker|1 Data: yay"
"Worker|1 Data: yay"
"Worker|0 Data: yay"
"Worker|0 Data: yay"
"Worker|1 Data: yay"
"Worker|0 Data: yay"
^C<internal:ractor>:694:in `take': Interrupt
        from description.rb:35:in `block in <main>'
        from description.rb:35:in `each'
        from description.rb:35:in `<main>'

~/src/confirm_bugs.ruby-lang.org/18024 ()
asdf local ruby 3.2.0
~/src/confirm_bugs.ruby-lang.org/18024 ()
ruby --version
ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin22]
~/src/confirm_bugs.ruby-lang.org/18024 ()
ruby description.rb  
description.rb:9: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues.
"Starting a sender"
"Worker|0 Data: yay"
"Worker|0 Data: yay"
"Worker|0 Data: yay"
"Worker|0 Data: yay"
"Worker|0 Data: yay"
"Worker|1 Data: yay"
"Worker|0 Data: yay"
"Worker|1 Data: yay"
"Worker|1 Data: yay"
"Worker|0 Data: yay"
^C<internal:ractor>:698:in `take': Interrupt
        from description.rb:35:in `block in <main>'
        from description.rb:35:in `each'
        from description.rb:35:in `<main>'

Updated by dazuma (Daniel Azuma) 12 months ago

Also not able to reproduce on ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin22] or ruby 3.3.0dev (2023-11-13T21:00:10Z master e8ab3f7010) [x86_64-darwin23]. I wonder if this was an environment issue in the original report.

Updated by tagomoris (Satoshi Tagomori) 12 months ago

I retried this script on my laptop (macOS Ventura) and Ruby 3.2.2, and I also couldn't reproduce the crash.
So the problem could be an environment-specific one.

Could someone close this?

Actions #8

Updated by hsbt (Hiroshi SHIBATA) 12 months ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0