Bug #17864
closed[BUG] try to mark T_NONE object (in Ractors)
Description
Hello,
I tried to make an experiment with Ractors, computing SHA1 using Ractors (I was hopping to divide the computation time because SHA1 hashing does not release GVL and I'm running a "GUI" that has time constraint).
When I test with StringIO everything works fine, I can compute 400 StringIO that are like 100MB without issues. But when I use files (what I need to do in real environment) I face a internal bug (that doesn't not spawn in all attempt, it's very random).
And here's all the information about the bug:
ruby -v = ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [i386-mingw32]
Error log:
<OBJ_INFO:gc_mark_ptr@../ruby-3.0.0/gc.c:6106> 0x053fbf68 [0 M ] T_NONE
D:/nuriy/persoWork/game_launcher/src/IODigester.rb:105: [BUG] try to mark T_NONE object
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [i386-mingw32]
-- Control frame information -----------------------------------------------
c:0003 p:---- s:0017 e:000016 CFUNC :read
c:0002 p:0056 s:0012 e:000011 BLOCK D:/nuriy/persoWork/game_launcher/src/IODigester.rb:105 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
D:/nuriy/persoWork/game_launcher/src/IODigester.rb:105:in `block in make_ractor'
D:/nuriy/persoWork/game_launcher/src/IODigester.rb:105:in `read'
-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(ZwWaitForSingleObject+0xc) [0x775729ac]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObject+0x12) [0x767d0452]
D:\nuriy\persoWork\game_launcher\msvcrt-ruby300.dll(rb_vm_bugreport+0x669) [0x68134f29]
D:\nuriy\persoWork\game_launcher\msvcrt-ruby300.dll(rb_source_location+0x53) [0x68118d83]
C:\WINDOWS\System32\KERNELBASE.dll(CreateEventA+0x24) [0x767e1914]
D:\nuriy\persoWork\game_launcher\msvcrt-ruby300.dll(rb_vm_proc_local_ep+0xd81) [0x680d8741]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlGetAppContainerNamedObjectPath+0x11e) [0x77567a4e]
-- Other runtime information -----------------------------------------------
* Loaded script: src/IODigester.ytest copy.rb
* Loaded features:
0 enumerator.so
1 thread.rb
2 rational.so
3 complex.so
4 ruby2_keywords.rb
5 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/i386-mingw32/enc/encdb.so
6 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/i386-mingw32/enc/trans/transdb.so
7 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/i386-mingw32/rbconfig.rb
8 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/compatibility.rb
9 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/defaults.rb
10 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/deprecate.rb
11 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/errors.rb
12 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/exceptions.rb
13 D:/nuriy/persoWork/game_launcher/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/singleton.rb
14 D:/nuriy/persoWork/game_launcher/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime.rb
15 D:/nuriy/persoWork/game_launcher/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/msys2_installation.rb
16 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/i386-mingw32/fiddle.so
17 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/fiddle/closure.rb
18 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/fiddle/function.rb
19 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/fiddle/version.rb
20 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/fiddle.rb
21 D:/nuriy/persoWork/game_launcher/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/dll_directory.rb
22 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/fiddle/value.rb
23 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/fiddle/pack.rb
24 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/fiddle/struct.rb
25 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/fiddle/cparser.rb
26 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/fiddle/import.rb
27 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/i386-mingw32/enc/utf_16le.so
28 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/i386-mingw32/enc/trans/utf_16_32.so
29 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/win32/registry.rb
30 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/i386-mingw32/enc/trans/single_byte.so
31 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/defaults/operating_system.rb
32 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/basic_specification.rb
33 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/stub_specification.rb
34 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/text.rb
35 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/user_interaction.rb
36 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/specification_policy.rb
37 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/util/list.rb
38 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/platform.rb
39 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/version.rb
40 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/requirement.rb
41 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/specification.rb
42 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/util.rb
43 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/dependency.rb
44 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/core_ext/kernel_gem.rb
45 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/i386-mingw32/monitor.so
46 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/monitor.rb
47 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb
48 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/core_ext/kernel_warn.rb
49 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems.rb
50 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/rubygems/path_support.rb
51 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/version.rb
52 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/core_ext/name_error.rb
53 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/levenshtein.rb
54 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/jaro_winkler.rb
55 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/spell_checker.rb
56 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
57 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
58 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/spell_checkers/name_error_checkers.rb
59 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/spell_checkers/method_name_checker.rb
60 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/spell_checkers/key_error_checker.rb
61 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/spell_checkers/null_checker.rb
62 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/tree_spell_checker.rb
63 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/spell_checkers/require_path_checker.rb
64 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean/formatters/plain_formatter.rb
65 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/did_you_mean.rb
66 D:/nuriy/persoWork/game_launcher/src/IODigester.rb
67 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/i386-mingw32/digest.so
68 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/digest.rb
69 D:/nuriy/persoWork/game_launcher/lib/ruby/3.0.0/i386-mingw32/digest/sha1.so
Note: I noticed while writing the thread that my ruby version in this project was not updated, I tried with ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [i386-mingw32]
and I have nothing but Idk if that's luck or not. If someone can confirm that this bug is solved that would be nice because I really hope to use that in production even if Ractors are still experimental.
Additional info
Here's the class I wrote to handle the SHA1 computation over ractors:
# Class responsive of digesting data (hashing) over several CPU core using Ractors
#
# How to use ?
# 1. First of all encapsulate all your data into IO object (File or StringIO)
# 2. Then create a new IODigester object by passing the Digest class you need and all the IO to digest in a Hash
# 3. Call the start function to let the system instanciate everything
# * You can check the overall progress using #progess, it's a number between 0 & 1
# 4. If failed? respond true, you can grab the failure info using #failures (key = IO key, value = StandardError object)
#
# @example Demo
# digester = IODigester.new(Digest::SHA1, { 'test' => io1, 'test2' => io2 })
# digester.start { |d| print format("\r%<progress>.2f%%", progress: d.progress * 100) }
# digester.hashes # => { 'test' => '<SHA1 of test>', 'test2' => '<SHA1 of test2>' }
#
# @note IODigester requires the IO to respond to size and give accurate value for size (in bytes)!
class IODigester
# Get the hashes
# @return [Hash{ String => String }]
attr_reader :hashes
# Get the failures
# @return [Hash{ String => StandardError }]
attr_reader :failures
# Create a new IODigester
# @param klass [Class<Digest::Base>] digest class to use to digest data
# @param ios [Hash{ String => IO }] io to digest (key can be symbol if you want)
def initialize(klass, ios)
@klass = klass
@ios = ios.clone
@progresses = @ios.keys.map { |k| [k, 0] }.to_h
@hashes = {}
@failures = {}
end
# Start the process
# @return [self]
# @yieldparam d [self] current digester
def start(&block)
raise 'Already started' if @ractors
@ractors = @ios.map { |key, value| make_ractor(key, value) }
process_ractors(block)
return self
end
# Test if the process has failures
# @return [Boolean]
def failed?
return !@failures.empty?
end
# Get the progress
# @return [Float]
def progress
@progresses.reduce(0.0) { |prev, curr| prev + curr.last } / @progresses.size
end
private
# Function that processes all the ractors (in a Thread in order to not lock the GVL)
# @param block [Proc]
def process_ractors(block)
until @ractors.empty?
begin
ractor, object = Ractor.select(*@ractors)
parse_ractor_response(ractor, object)
block&.call(self)
rescue Ractor::RemoteError => e
@failures[e.ractor.name] = e.cause
@ractors.delete(e.ractor)
end
end
end
# Function that analyzes the payload of the received object from Ractor.select
# @param ractor [Ractor] ractor object that we're talking about
# @param object [Array] response from the ractor
def parse_ractor_response(ractor, object)
message, body = object
case message
when :progress
@progresses[ractor.name] = body
when :result
@progresses[ractor.name] = 1
@hashes[ractor.name] = body
@ractors.delete(ractor)
end
end
# Function that creates the ractor
# @param name [String] name of the io (hash key)
# @param io [IO] io to process
# @return [Ractor]
def make_ractor(name, io)
ractor = Ractor.new(@klass, io, name: name) do |digest_klass, io_to_process|
close_incoming
# @type [Integer]
io_size = io_to_process.size
io_read = 0
# @type [Digest::Base]
digest = digest_klass.new
while io_size > io_read
Ractor.yield [:progress, io_read.to_f / io_size]
# @type [String]
data = io_to_process.read(20_971_520)
io_read += data.bytesize
digest << data
end
Ractor.yield [:result, digest.hexdigest]
end
return ractor
end
end
Here's the script I use to try to reproduce the bug:
require_relative 'IODigester'
require 'digest'
ios = (
Dir['D:/nuriy/Work/pokemonsdk/Release/Data/*'] +
Dir['D:/nuriy/Work/pokemonsdk/Release/pokemonsdk/**/*']
).reject { |f| File.directory?(f) }.map { |f| [f, File.new(f, 'rb')] }.to_h
digester = IODigester.new(Digest::SHA1, ios)
digester.start { |d| print format("\r%<progress>.2f%%", progress: d.progress * 100) }
p digester.hashes
(I'm not closing the files because I don't actually care in that test since the bug appears in "start")
Here's the files in case you need it: https://www.mediafire.com/file/wt0eqzthxpb1nc8/Release.7z/file (it's over 2MB)
Updated by NuriYuri (Youri Nouri) over 3 years ago
- ruby -v set to ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [i386-mingw32]
Updated by xtkoba (Tee KOBAYASHI) over 3 years ago
Yeah, I believe this has already been fixed (or at least the probability of segfault has been made much lower).
Updated by NuriYuri (Youri Nouri) over 3 years ago
I've run this ruby -e"200.times { system('ruby src/IODigester.ytest_copy.rb') }"
to check the probability, 88% success rate with ruby 3.0.1p64
.
I guess I'll wait before playing with Ractors like this.
Updated by jeremyevans0 (Jeremy Evans) over 3 years ago
- Status changed from Open to Feedback
NuriYuri (Youri Nouri) wrote in #note-3:
I've run this
ruby -e"200.times { system('ruby src/IODigester.ytest_copy.rb') }"
to check the probability, 88% success rate withruby 3.0.1p64
.
I guess I'll wait before playing with Ractors like this.
Can you test with the master branch and see if you can reproduce this?
Updated by NuriYuri (Youri Nouri) over 3 years ago
Hi, I tried to build Ruby with last version of master. I got this result during build (with nmake):
<OBJ_INFO:gc_mark_ptr@gc.c:6576> 0x0099df40 [2 M ] T_NONE
./tool/generic_erb.rb:7: [BUG] try to mark T_NONE object
ruby 3.1.0dev (2021-05-21T04:42:24Z master 0ee24b4fab) [i386-mswin32_140]
-- Control frame information -----------------------------------------------
c:0003 p:---- s:0023 e:000022 CFUNC :require
c:0002 p:0011 s:0018 E:0012f0 EVAL ./tool/generic_erb.rb:7 [FINISH]
c:0001 p:0000 s:0003 E:001eb0 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
./tool/generic_erb.rb:7:in `<main>'
./tool/generic_erb.rb:7:in `require'
-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xc) [0x76F929DC]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObject+0x12) [0x75690452]
D:\nuriy\Downloads\ruby\miniruby.exe(rb_print_backtrace+0x2f) [0x002F8C49] D:\nuriy\Downloads\ruby\vm_dump.c:778
D:\nuriy\Downloads\ruby\miniruby.exe(rb_vm_bugreport+0xd1) [0x002F8D1C] D:\nuriy\Downloads\ruby\vm_dump.c:1044
D:\nuriy\Downloads\ruby\miniruby.exe(rb_bug_without_die+0x43) [0x00220231] D:\nuriy\Downloads\ruby\error.c:777
D:\nuriy\Downloads\ruby\miniruby.exe(rb_bug+0xf) [0x00220186] D:\nuriy\Downloads\ruby\error.c:785
D:\nuriy\Downloads\ruby\miniruby.exe(gc_mark_ptr+0x7f) [0x0022CC35] D:\nuriy\Downloads\ruby\gc.c:6577
D:\nuriy\Downloads\ruby\miniruby.exe(cc_table_mark_i+0x4f) [0x0022B0A8] D:\nuriy\Downloads\ruby\gc.c:2964
D:\nuriy\Downloads\ruby\miniruby.exe(rb_id_table_foreach+0x46) [0x002CB392] D:\nuriy\Downloads\ruby\id_table.c:299
D:\nuriy\Downloads\ruby\miniruby.exe(cc_table_mark+0x2f) [0x0022B054] D:\nuriy\Downloads\ruby\gc.c:2979
D:\nuriy\Downloads\ruby\miniruby.exe(gc_mark_children+0x1cc) [0x0022C668] D:\nuriy\Downloads\ruby\gc.c:6797
D:\nuriy\Downloads\ruby\miniruby.exe(rgengc_rememberset_mark+0xa5) [0x00233E21] D:\nuriy\Downloads\ruby\gc.c:8184
D:\nuriy\Downloads\ruby\miniruby.exe(gc_marks_start+0xce) [0x0022D2F5] D:\nuriy\Downloads\ruby\gc.c:7744
D:\nuriy\Downloads\ruby\miniruby.exe(gc_start+0x1d8) [0x0022E733] D:\nuriy\Downloads\ruby\gc.c:8854
D:\nuriy\Downloads\ruby\miniruby.exe(heap_prepare+0x6d) [0x00230594] D:\nuriy\Downloads\ruby\gc.c:2148
D:\nuriy\Downloads\ruby\miniruby.exe(newobj_slowpath_wb_protected+0x5b) [0x00230ED6] D:\nuriy\Downloads\ruby\gc.c:2537
D:\nuriy\Downloads\ruby\miniruby.exe(newobj_of0+0x62) [0x00230E5F] D:\nuriy\Downloads\ruby\gc.c:2579
D:\nuriy\Downloads\ruby\miniruby.exe(newobj_of+0x1a) [0x00230DE6] D:\nuriy\Downloads\ruby\gc.c:2591
D:\nuriy\Downloads\ruby\miniruby.exe(rb_wb_protected_newobj_of+0x1c) [0x00233AA3] D:\nuriy\Downloads\ruby\gc.c:2614
D:\nuriy\Downloads\ruby\miniruby.exe(str_new0+0x1d) [0x002C5CBA] D:\nuriy\Downloads\ruby\string.c:795
D:\nuriy\Downloads\ruby\miniruby.exe(str_new+0x13) [0x002C5C98] D:\nuriy\Downloads\ruby\string.c:814
D:\nuriy\Downloads\ruby\miniruby.exe(rb_str_new+0x14) [0x002C0BB2] D:\nuriy\Downloads\ruby\string.c:820
D:\nuriy\Downloads\ruby\miniruby.exe(rb_io_getline_fast+0x87) [0x00243F74] D:\nuriy\Downloads\ruby\io.c:3477
D:\nuriy\Downloads\ruby\miniruby.exe(rb_io_getline_0+0xee) [0x00243BF6] D:\nuriy\Downloads\ruby\io.c:3613
D:\nuriy\Downloads\ruby\miniruby.exe(rb_io_gets_internal+0x2c) [0x002440B0] D:\nuriy\Downloads\ruby\io.c:3743
D:\nuriy\Downloads\ruby\miniruby.exe(lex_io_gets+0xb) [0x002738EE] D:\nuriy\Downloads\ruby\parse.y:6381
D:\nuriy\Downloads\ruby\miniruby.exe(lex_getline+0xf) [0x002738A4] D:\nuriy\Downloads\ruby\parse.y:6332
D:\nuriy\Downloads\ruby\miniruby.exe(nextline+0x42) [0x002754C7] D:\nuriy\Downloads\ruby\parse.y:6499
D:\nuriy\Downloads\ruby\miniruby.exe(nextc+0x27) [0x00275456] D:\nuriy\Downloads\ruby\parse.y:6541
D:\nuriy\Downloads\ruby\miniruby.exe(parser_yylex+0x1b3) [0x00277C7F] D:\nuriy\Downloads\ruby\parse.y:9212
D:\nuriy\Downloads\ruby\miniruby.exe(ruby_yyparse+0x36f) [0x0027AFB7] D:\nuriy\Downloads\ruby\parse.c:6800
D:\nuriy\Downloads\ruby\miniruby.exe(yycompile0+0x78) [0x00281C66] D:\nuriy\Downloads\ruby\parse.y:6244
D:\nuriy\Downloads\ruby\miniruby.exe(rb_suppress_tracing+0xad) [0x002FAAA5] D:\nuriy\Downloads\ruby\vm_trace.c:436
D:\nuriy\Downloads\ruby\miniruby.exe(yycompile+0x58) [0x00281BD3] D:\nuriy\Downloads\ruby\parse.y:6292
D:\nuriy\Downloads\ruby\miniruby.exe(rb_parser_compile_file_path+0x37) [0x0027982F] D:\nuriy\Downloads\ruby\parse.y:6395
D:\nuriy\Downloads\ruby\miniruby.exe(load_file_internal+0x2ff) [0x002AD026] D:\nuriy\Downloads\ruby\ruby.c:2200
D:\nuriy\Downloads\ruby\miniruby.exe(rb_ensure+0x9d) [0x002235A6] D:\nuriy\Downloads\ruby\eval.c:1166
D:\nuriy\Downloads\ruby\miniruby.exe(load_file+0x38) [0x002ACD22] D:\nuriy\Downloads\ruby\ruby.c:2334
D:\nuriy\Downloads\ruby\miniruby.exe(rb_parser_load_file+0x2d) [0x002AEF7B] D:\nuriy\Downloads\ruby\ruby.c:2356
D:\nuriy\Downloads\ruby\miniruby.exe(load_iseq_eval+0x31) [0x0024CCC8] D:\nuriy\Downloads\ruby\load.c:588
D:\nuriy\Downloads\ruby\miniruby.exe(require_internal+0x175) [0x0024DD58] D:\nuriy\Downloads\ruby\load.c:1076
D:\nuriy\Downloads\ruby\miniruby.exe(rb_require_string+0x16) [0x0024DB21] D:\nuriy\Downloads\ruby\load.c:1142
D:\nuriy\Downloads\ruby\miniruby.exe(rb_f_require+0xb) [0x0024D37A] D:\nuriy\Downloads\ruby\load.c:838
D:\nuriy\Downloads\ruby\miniruby.exe(ractor_safe_call_cfunc_1+0xe) [0x002E972E] D:\nuriy\Downloads\ruby\vm_insnhelper.c:2767
D:\nuriy\Downloads\ruby\miniruby.exe(vm_call_cfunc_with_frame+0xe2) [0x002EFC93] D:\nuriy\Downloads\ruby\vm_insnhelper.c:2945
D:\nuriy\Downloads\ruby\miniruby.exe(vm_sendish+0x130) [0x002F66BE] D:\nuriy\Downloads\ruby\vm_insnhelper.c:4516
D:\nuriy\Downloads\ruby\miniruby.exe(vm_exec_core+0xa8d) [0x002F2B07] D:\nuriy\Downloads\ruby\vm_exec.c:143
D:\nuriy\Downloads\ruby\miniruby.exe(rb_vm_exec+0xa8) [0x002ED27A] D:\nuriy\Downloads\ruby\vm.c:2173
D:\nuriy\Downloads\ruby\miniruby.exe(rb_iseq_eval_main+0x1c) [0x002EB30F] D:\nuriy\Downloads\ruby\vm.c:2417
D:\nuriy\Downloads\ruby\miniruby.exe(rb_ec_exec_node+0xb3) [0x002232A8] D:\nuriy\Downloads\ruby\eval.c:317
D:\nuriy\Downloads\ruby\miniruby.exe(ruby_run_node+0x3e) [0x00224987] D:\nuriy\Downloads\ruby\eval.c:375
D:\nuriy\Downloads\ruby\miniruby.exe(main+0x41) [0x001E1041] D:\nuriy\Downloads\ruby\main.c:47
D:\nuriy\Downloads\ruby\miniruby.exe(__scrt_common_main_seh+0xfa) [0x003077CE] d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
C:\WINDOWS\System32\KERNEL32.DLL(BaseThreadInitThunk+0x19) [0x75CBFA29]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlGetAppContainerNamedObjectPath+0x11e) [0x76F87A7E]
-- Other runtime information -----------------------------------------------
* Loaded script: ./tool/generic_erb.rb
* Loaded features:
0 enumerator.so
1 thread.rb
2 fiber.so
3 rational.so
4 complex.so
5 ruby2_keywords.rb
6 D:/nuriy/Downloads/ruby/lib/cgi/util.rb
7 D:/nuriy/Downloads/ruby/lib/erb/version.rb
8 D:/nuriy/Downloads/ruby/lib/erb.rb
NMAKE : fatal error U1077: '.\miniruby.exe' : code retour '0x3'
Updated by xtkoba (Tee KOBAYASHI) over 3 years ago
NuriYuri (Youri Nouri) #note-5 seems to be a distinct bug, as Ractor is not used during a build process (I believe). Can you create a separate ticket about that?
Updated by xtkoba (Tee KOBAYASHI) over 3 years ago
Now #note-5 has a separate ticket: #17923
Back to the main issue, there are pre-built binaries of Ruby master (head) in the wild. You may want to use them if you fail to build yourself, although they might not be the latest.
https://github.com/MSP-Greg/ruby-loco
https://github.com/oneclick/rubyinstaller2/releases/tag/rubyinstaller-head
Updated by NuriYuri (Youri Nouri) over 3 years ago
I didn't know those existed, thanks a lot.
I could test with: ruby 3.1.0dev (2021-04-28 master 8e2ac2140d) [i386-mingw32]
I ran my 200 times command twice and both had a success rate of 100%. I guess ruby 3.1.0dev solves the issue :)
We can probably close the ticket.
Updated by jeremyevans0 (Jeremy Evans) over 3 years ago
- Status changed from Feedback to Closed