vnmakarov / ruby

The Ruby Programming Language
http://www.ruby-lang.org/
Other
207 stars 1 forks source link

Exception when running with JIT in Rails Ruby Bench #10

Open noahgibbs opened 5 years ago

noahgibbs commented 5 years ago

RRB is a pretty heavy usage test and I don't think you need to prioritize this.

The RTL branch ran RRB just fine without JIT, at basically the same speed as release Ruby 2.6. But it crashed rapidly when run with --jit. Here's the stack traces I got when it did:

Exception in worker thread: undefined method `setsockopt' for nil:NilClass
/home/ubuntu/mount-mjit/lib/ruby/2.6.0/net/http.rb:953:in `connect'
/home/ubuntu/mount-mjit/lib/ruby/2.6.0/net/http.rb:930:in `do_start'
/home/ubuntu/mount-mjit/lib/ruby/2.6.0/net/http.rb:919:in `start'
/home/ubuntu/.rvm/gems/ext-rtl-mjit/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in `transmit'
/home/ubuntu/.rvm/gems/ext-rtl-mjit/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute'
/home/ubuntu/.rvm/gems/ext-rtl-mjit/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
/home/ubuntu/rails_ruby_bench/user_simulator.rb:53:in `request'
/home/ubuntu/rails_ruby_bench/user_simulator.rb:72:in `action_from_args'
/home/ubuntu/rails_ruby_bench/user_simulator.rb:150:in `block in time_actions'
/home/ubuntu/rails_ruby_bench/user_simulator.rb:149:in `each'
/home/ubuntu/rails_ruby_bench/user_simulator.rb:149:in `time_actions'
/home/ubuntu/rails_ruby_bench/user_simulator.rb:179:in `block (2 levels) in multithreaded_actions'
#<Thread:0x0000562a0645be20@/home/ubuntu/rails_ruby_bench/user_simulator.rb:170 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
    11: from /home/ubuntu/rails_ruby_bench/user_simulator.rb:179:in `block (2 levels) in multithreaded_actions'
    10: from /home/ubuntu/rails_ruby_bench/user_simulator.rb:149:in `time_actions'
     9: from /home/ubuntu/rails_ruby_bench/user_simulator.rb:149:in `each'
     8: from /home/ubuntu/rails_ruby_bench/user_simulator.rb:150:in `block in time_actions'
     7: from /home/ubuntu/rails_ruby_bench/user_simulator.rb:72:in `action_from_args'
     6: from /home/ubuntu/rails_ruby_bench/user_simulator.rb:53:in `request'
     5: from /home/ubuntu/.rvm/gems/ext-rtl-mjit/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
     4: from /home/ubuntu/.rvm/gems/ext-rtl-mjit/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute'
     3: from /home/ubuntu/.rvm/gems/ext-rtl-mjit/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in `transmit'
     2: from /home/ubuntu/mount-mjit/lib/ruby/2.6.0/net/http.rb:919:in `start'
     1: from /home/ubuntu/mount-mjit/lib/ruby/2.6.0/net/http.rb:930:in `do_start'
/home/ubuntu/mount-mjit/lib/ruby/2.6.0/net/http.rb:953:in `connect': undefined method `setsockopt' for nil:NilClass (NoMethodError)

Release Ruby 2.6 didn't get these errors on the same EC2 instance.

vnmakarov commented 5 years ago

Noah, thank you for reporting this. I'll investigate this problem. Unfortunately, I am busy with GCC-9 release work for now. So I'll do this only after the GCC release (probably at the end of April).

noahgibbs commented 5 years ago

Very reasonable. I just didn't want it to surprise you when I wrote that I couldn't use JIT for evaluating the RTL stuff in an upcoming blog post.