-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate issues on Ruby 3.1 Windows #3585
Conversation
It seems that we have to adapt to async-2.0.0:
|
Async-2.x causes the following error: #3585 (comment): ``` 2021-12-27T14:53:29.8037858Z Error: test: monunt given path(HttpHelperTest::Create a HTTP server): ArgumentError: unknown keyword: :logger 2021-12-27T14:53:29.8040011Z /opt/hostedtoolcache/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-2.0.0/lib/async/scheduler.rb:39:in `initialize' 2021-12-27T14:53:29.8041621Z /opt/hostedtoolcache/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-2.0.0/lib/async/reactor.rb:32:in `initialize' 2021-12-27T14:53:29.8043219Z /home/runner/work/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:41:in `new' 2021-12-27T14:53:29.8045446Z /home/runner/work/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:41:in `initialize' 2021-12-27T14:53:29.8046959Z /home/runner/work/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:69:in `new' 2021-12-27T14:53:29.8048253Z /home/runner/work/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:69:in `http_server_create_http_server' 2021-12-27T14:53:29.8049705Z /home/runner/work/fluentd/fluentd/test/plugin_helper/test_http_server_helper.rb:157:in `block (3 levels) in <class:HttpHelperTest>' 2021-12-27T14:53:29.8051313Z /home/runner/work/fluentd/fluentd/test/plugin_helper/test_http_server_helper.rb:36:in `on_driver' 2021-12-27T14:53:29.8052768Z /home/runner/work/fluentd/fluentd/test/plugin_helper/test_http_server_helper.rb:156:in `block (2 levels) in <class:HttpHelperTest>' ``` and we aren't ready for Async-2.0 yet. Signed-off-by: Takuro Ashie <[email protected]>
Async::HTTP unlocks using Async-2.x since v0.56.4. But we aren't ready for Async-2.0 yet, one of the known issue is that it causes the following error: #3585 (comment): ``` 2021-12-27T14:53:29.8037858Z Error: test: monunt given path(HttpHelperTest::Create a HTTP server): ArgumentError: unknown keyword: :logger 2021-12-27T14:53:29.8040011Z /opt/hostedtoolcache/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-2.0.0/lib/async/scheduler.rb:39:in `initialize' 2021-12-27T14:53:29.8041621Z /opt/hostedtoolcache/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-2.0.0/lib/async/reactor.rb:32:in `initialize' 2021-12-27T14:53:29.8043219Z /home/runner/work/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:41:in `new' 2021-12-27T14:53:29.8045446Z /home/runner/work/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:41:in `initialize' 2021-12-27T14:53:29.8046959Z /home/runner/work/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:69:in `new' 2021-12-27T14:53:29.8048253Z /home/runner/work/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:69:in `http_server_create_http_server' 2021-12-27T14:53:29.8049705Z /home/runner/work/fluentd/fluentd/test/plugin_helper/test_http_server_helper.rb:157:in `block (3 levels) in <class:HttpHelperTest>' 2021-12-27T14:53:29.8051313Z /home/runner/work/fluentd/fluentd/test/plugin_helper/test_http_server_helper.rb:36:in `on_driver' 2021-12-27T14:53:29.8052768Z /home/runner/work/fluentd/fluentd/test/plugin_helper/test_http_server_helper.rb:156:in `block (2 levels) in <class:HttpHelperTest>' ``` Signed-off-by: Takuro Ashie <[email protected]>
d14a5ab
to
e05d208
Compare
Still something seems broken, it always fails on Ruby 3.1 on Windows: https://github.com/fluent/fluentd/runs/4917418896?check_suite_focus=true
|
I've found other several odd issues on Windows. |
For windows, we have several known issues on RubyInstaller 3.1 so that we don't yet add for now: #3585 Signed-off-by: Takuro Ashie <[email protected]>
|
b69908c
to
d7fe2f5
Compare
|
Now I've found that fluentd/lib/fluent/plugin/file_wrapper.rb Line 141 in b04e808
|
f46404e
to
3b2abb2
Compare
I've investigated it with my own custom build Ruby. 8788 if (fstat(fd, &st) < 0) rb_sys_fail(0);
|
A simple test code: require 'fluent/load'
require 'fluent/plugin/file_wrapper.rb'
Fluent::FileWrapper.open("fluent.conf") |
Finally I've found a way to resolve this issue. share_delete = oflag & O_SHARE_DELETE ? FILE_SHARE_DELETE : 0;
oflag &= ~O_SHARE_DELETE;
if ((oflag & O_TEXT) || !(oflag & O_BINARY)) {
fd = _wopen(file, oflag, pmode);
if (fd == -1) {
switch (errno) {
case EACCES:
check_if_wdir(file);
break;
case EINVAL:
errno = map_errno(GetLastError());
break;
}
}
return fd;
}
|
Signed-off-by: Takuro Ashie <[email protected]>
Signed-off-by: Takuro Ashie <[email protected]>
Because in_tail test seems completely broken and it breaks also other test. It's too noisy to investivate other failed tests. Signed-off-by: Takuro Ashie <[email protected]>
For avoiding the following error: ``` 2022-02-18T01:36:00.3691879Z =============================================================================== 2022-02-18T01:36:00.3692453Z Failure: test: send tags in str (utf-8 strings)(ForwardOutputTest): 2022-02-18T01:36:00.3692799Z On subject , 2022-02-18T01:36:00.3693302Z unexpected method invocation: 2022-02-18T01:36:00.3693595Z process_wait(2088, 0) 2022-02-18T01:36:00.3702794Z expected invocations: 2022-02-18T01:36:00.3703495Z C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/serverengine-2.2.5/lib/serverengine/socket_manager.rb:79:in ``' 2022-02-18T01:36:00.3704338Z C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/serverengine-2.2.5/lib/serverengine/socket_manager.rb:79:in `block in generate_path' 2022-02-18T01:36:00.3705025Z C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/serverengine-2.2.5/lib/serverengine/socket_manager.rb:78:in `each' 2022-02-18T01:36:00.3705695Z C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/serverengine-2.2.5/lib/serverengine/socket_manager.rb:78:in `generate_path' 2022-02-18T01:36:00.3706156Z D:/a/fluentd/fluentd/lib/fluent/test/driver/base.rb:105:in `instance_start' 2022-02-18T01:36:00.3706550Z D:/a/fluentd/fluentd/lib/fluent/test/driver/base.rb:77:in `run' 2022-02-18T01:36:00.3706945Z D:/a/fluentd/fluentd/lib/fluent/test/driver/base_owner.rb:130:in `run' 2022-02-18T01:36:00.3707422Z D:/a/fluentd/fluentd/test/plugin/test_out_forward.rb:434:in `block in <class:ForwardOutputTest>' 2022-02-18T01:36:00.3707780Z 431: ] 2022-02-18T01:36:00.3708021Z 432: 2022-02-18T01:36:00.3708366Z 433: stub(d.instance.ack_handler).read_ack_from_sock(anything).never 2022-02-18T01:36:00.3708758Z => 434: target_input_driver.run(expect_records: 2) do 2022-02-18T01:36:00.3709053Z 435: d.run do 2022-02-18T01:36:00.3709364Z 436: emit_events.each do |tag, t, record| 2022-02-18T01:36:00.3709681Z 437: d.feed(tag, t, record) 2022-02-18T01:36:00.3709997Z =============================================================================== ``` Signed-off-by: Takuro Ashie <[email protected]>
Signed-off-by: Takuro Ashie <[email protected]>
Now I've got the root cause. |
Signed-off-by: Takuro Ashie [email protected]
Which issue(s) this PR fixes:
Fixes #
What this PR does / why we need it:
Docs Changes:
Release Note: