Skip to content
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

Closed
wants to merge 5 commits into from
Closed

Investigate issues on Ruby 3.1 Windows #3585

wants to merge 5 commits into from

Conversation

ashie
Copy link
Member

@ashie ashie commented Dec 27, 2021

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:

@ashie
Copy link
Member Author

ashie commented Jan 5, 2022

It seems that we have to adapt to async-2.0.0:

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>'

ashie added a commit that referenced this pull request Jan 6, 2022
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]>
ashie added a commit that referenced this pull request Jan 6, 2022
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]>
@ashie ashie force-pushed the ci-ruby-3.1 branch 2 times, most recently from d14a5ab to e05d208 Compare January 14, 2022 04:45
@ashie ashie marked this pull request as ready for review January 24, 2022 04:42
@ashie
Copy link
Member Author

ashie commented Jan 24, 2022

Still something seems broken, it always fails on Ruby 3.1 on Windows:

https://github.com/fluent/fluentd/runs/4917418896?check_suite_focus=true

TailInputTest: 
  test_EACCES:						.: (0.516122)
  test_ENOENT_error_after_setup_watcher:		.: (0.518166)
  test_encoding[flat default encoding]:			E, [2022-01-24T05:41:26.232360 #472] ERROR -- : unexpected error while close, Errno::EBADF:Bad file descriptor
E, [2022-01-24T05:41:26.232885 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/plugin/in_tail.rb:1013:in `close'
E, [2022-01-24T05:41:26.233105 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/plugin/in_tail.rb:1013:in `close'
E, [2022-01-24T05:41:26.233225 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/plugin/in_tail.rb:797:in `close'
E, [2022-01-24T05:41:26.233296 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/plugin/in_tail.rb:484:in `block in close_watcher_handles'
E, [2022-01-24T05:41:26.233359 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/plugin/in_tail.rb:481:in `each'
E, [2022-01-24T05:41:26.233409 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/plugin/in_tail.rb:481:in `close_watcher_handles'
E, [2022-01-24T05:41:26.233493 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/plugin/in_tail.rb:280:in `close'
E, [2022-01-24T05:41:26.233564 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/test/driver/base.rb:166:in `block in instance_shutdown'
E, [2022-01-24T05:41:26.233613 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/test/driver/base.rb:144:in `block in instance_shutdown'
E, [2022-01-24T05:41:26.233663 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/test/driver/base.rb:166:in `instance_shutdown'
E, [2022-01-24T05:41:26.233759 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/test/driver/base.rb:99:in `run'
E, [2022-01-24T05:41:26.234088 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/test/driver/base_owner.rb:130:in `run'
E, [2022-01-24T05:41:26.234197 #472] ERROR -- : 	D:/a/fluentd/fluentd/test/plugin/test_in_tail.rb:982:in `test_encoding'
E, [2022-01-24T05:41:26.234264 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:868:in `run_test'
E, [2022-01-24T05:41:26.234334 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:566:in `block (2 levels) in run'
E, [2022-01-24T05:41:26.234388 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
E, [2022-01-24T05:41:26.234526 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
E, [2022-01-24T05:41:26.234622 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
E, [2022-01-24T05:41:26.234672 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:257:in `run_fixture'
E, [2022-01-24T05:41:26.234722 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:292:in `run_setup'
E, [2022-01-24T05:41:26.234776 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:564:in `block in run'
E, [2022-01-24T05:41:26.235007 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:563:in `catch'
E, [2022-01-24T05:41:26.235061 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:563:in `run'
E, [2022-01-24T05:41:26.235112 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:124:in `run_test'
E, [2022-01-24T05:41:26.235163 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:53:in `run'
E, [2022-01-24T05:41:26.235213 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:124:in `run_test'
E, [2022-01-24T05:41:26.235261 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:53:in `run'
E, [2022-01-24T05:41:26.235310 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:67:in `run_suite'
E, [2022-01-24T05:41:26.235359 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:45:in `block (2 levels) in run'
E, [2022-01-24T05:41:26.235431 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:102:in `with_listener'
E, [2022-01-24T05:41:26.235504 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:41:in `block in run'
E, [2022-01-24T05:41:26.235554 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:39:in `catch'
E, [2022-01-24T05:41:26.235622 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:39:in `run'
E, [2022-01-24T05:41:26.235674 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunner.rb:40:in `start_mediator'
E, [2022-01-24T05:41:26.235723 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunner.rb:25:in `start'
E, [2022-01-24T05:41:26.235940 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnerutilities.rb:24:in `run'
E, [2022-01-24T05:41:26.236025 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:458:in `block in run'
E, [2022-01-24T05:41:26.236106 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:514:in `change_work_directory'
E, [2022-01-24T05:41:26.236156 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:457:in `run'
E, [2022-01-24T05:41:26.236206 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:66:in `run'
E, [2022-01-24T05:41:26.236256 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit.rb:518:in `block (2 levels) in <top (required)>'
.: (56.261167)
#<Thread:0x0000021a4658cc78@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a42216d90@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a3f92f698@http_server_helper_test_tls D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:102:in `block (2 levels) in http_server_create_https_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a44123828@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
Unexpected error An operation was attempted on something that is not a socket.
#<Thread:0x0000021a4645cd80@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a43e732b8@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a411dd168@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a45d3e760@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a45fbfe58@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a467cb0c0@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
Unexpected error stream closed in another thread
#<Thread:0x0000021a46a1e458@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a41e21ca8@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a3de2d6b0@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a44397e10@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
#<Thread:0x0000021a42014858@in_monitor_http_server_helper D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK)
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
	from C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
	from D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
  C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/serverengine-2.2.5/lib/serverengine/socket_manager_win.rb:116:in `accept'
  C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/serverengine-2.2.5/lib/serverengine/socket_manager_win.rb:116:in `accept'
  C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/serverengine-2.2.5/lib/serverengine/socket_manager_win.rb:116:in `block in start_server'
log writing failed. An operation was attempted on something that is not a socket.
log writing failed. An operation was attempted on something that is not a socket.
log writing failed. An operation was attempted on something that is not a socket.
log writing failed. An operation was attempted on something that is not a socket.
log writing failed. An operation was attempted on something that is not a socket.
log writing failed. An operation was attempted on something that is not a socket.
log writing failed. An operation was attempted on something that is not a socket.
log writing failed. An operation was attempted on something that is not a socket.
log writing failed. An operation was attempted on something that is not a socket.
log writing failed. An operation was attempted on something that is not a socket.
log writing failed. An operation was attempted on something that is not a socket.
  C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/serverengine-2.2.5/lib/serverengine/socket_manager_win.rb:116:in `block in start_server'
  test_encoding[flat explicit encoding config]:		E, [2022-01-24T05:41:26.406220 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select'
E, [2022-01-24T05:41:26.406657 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
E, [2022-01-24T05:41:26.407171 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
E, [2022-01-24T05:41:26.407340 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
E, [2022-01-24T05:41:26.407598 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
E, [2022-01-24T05:41:26.407717 #472] ERROR -- : 	C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
E, [2022-01-24T05:41:26.407846 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
E, [2022-01-24T05:41:26.407989 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
E, [2022-01-24T05:41:26.408128 #472] ERROR -- : 	D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
E
===============================================================================
Error: test_encoding[flat explicit encoding config](TailInputTest): Errno::ENOTSOCK: An operation was attempted on something that is not a socket.
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `select'
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:94:in `block in select'
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `synchronize'
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/lib/nio/selector.rb:84:in `select'
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:257:in `run_once'
C:/hostedtoolcache/windows/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/async-1.30.1/lib/async/reactor.rb:286:in `run'
D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server/server.rb:57:in `start'
D:/a/fluentd/fluentd/lib/fluent/plugin_helper/http_server.rb:75:in `block (2 levels) in http_server_create_http_server'
D:/a/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
===============================================================================
: (0.534875)
rake aborted!
SignalException: SIGSEGV

@ashie ashie marked this pull request as draft January 25, 2022 02:24
@ashie ashie changed the title GitHub Actions: Add Ruby 3.1 Investigate issues on Ruby 3.1 Windows Feb 4, 2022
@ashie
Copy link
Member Author

ashie commented Feb 4, 2022

I've found other several odd issues on Windows.
So I use this pull request for investigating them.
For Linux & macOS, I'll create another pull request.

ashie added a commit that referenced this pull request Feb 4, 2022
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]>
@ashie ashie mentioned this pull request Feb 4, 2022
@ashie
Copy link
Member Author

ashie commented Feb 18, 2022

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 ===============================================================================

@ashie ashie force-pushed the ci-ruby-3.1 branch 5 times, most recently from b69908c to d7fe2f5 Compare February 18, 2022 14:02
@ashie
Copy link
Member Author

ashie commented Feb 19, 2022

2022-02-18T21:01:31.9175116Z ===============================================================================
2022-02-18T21:01:31.9180487Z Failure: test: #on_notify load file content and passed it to receive_lines method(IntailIOHandlerTest)
2022-02-18T21:01:31.9181566Z D:/a/fluentd/fluentd/test/plugin/in_tail/test_io_handler.rb:47:in `block in <class:IntailIOHandlerTest>'
2022-02-18T21:01:31.9182266Z      44:     end
2022-02-18T21:01:31.9182834Z      45: 
2022-02-18T21:01:31.9183311Z      46:     r.on_notify
2022-02-18T21:01:31.9183959Z   => 47:     assert_equal text.bytesize, update_pos
2022-02-18T21:01:31.9184661Z      48:     assert_equal text, returned_lines
2022-02-18T21:01:31.9185179Z      49: 
2022-02-18T21:01:31.9185708Z      50:     r.on_notify
2022-02-18T21:01:31.9186315Z <36> expected but was
2022-02-18T21:01:31.9254075Z <0>
2022-02-18T21:01:31.9254763Z ===============================================================================
2022-02-18T21:01:31.9805651Z ===============================================================================
2022-02-18T21:01:31.9807637Z Failure: test: open new IO and change pos to 0 and read it(IntailIOHandlerTest::when open_on_every_update is true and read_pos returns always 0)
2022-02-18T21:01:31.9808537Z D:/a/fluentd/fluentd/test/plugin/in_tail/test_io_handler.rb:79:in `block (2 levels) in <class:IntailIOHandlerTest>'
2022-02-18T21:01:31.9809131Z      76:       end
2022-02-18T21:01:31.9809508Z      77: 
2022-02-18T21:01:31.9809834Z      78:       r.on_notify
2022-02-18T21:01:31.9810390Z   => 79:       assert_equal text.bytesize, update_pos
2022-02-18T21:01:31.9811018Z      80:       assert_equal text, returned_lines
2022-02-18T21:01:31.9811408Z      81: 
2022-02-18T21:01:31.9811801Z      82:       r.on_notify
2022-02-18T21:01:31.9812165Z <36> expected but was
2022-02-18T21:01:31.9867393Z <0>
2022-02-18T21:01:31.9869766Z ===============================================================================

@ashie
Copy link
Member Author

ashie commented Apr 18, 2022

Now I've found that File.for_fd always raises #<Errno::EBADF: Bad file descriptor> here:

io = File.for_fd(fd, @mode)

@ashie ashie force-pushed the ci-ruby-3.1 branch 3 times, most recently from f46404e to 3b2abb2 Compare May 24, 2022 08:22
@ashie
Copy link
Member Author

ashie commented May 30, 2022

Now I've found that File.for_fd always raises #<Errno::EBADF: Bad file descriptor> here:

io = File.for_fd(fd, @mode)

I've investigated it with my own custom build Ruby.
It fails on fstat() in rb_io_initialize() despite passing a valid fd retrieved by _open_osfhandle() at fluentd.

https://github.com/ruby/ruby/blob/c7bbed299493d0fe5323916b83dab04021bc570f/io.c#L8788

8788     if (fstat(fd, &st) < 0) rb_sys_fail(0);

rb_io_initialize() isn't so changed from Ruby-2.7, so I think it's caused by UCRT.

@ashie
Copy link
Member Author

ashie commented May 30, 2022

A simple test code:

require 'fluent/load'
require 'fluent/plugin/file_wrapper.rb'
Fluent::FileWrapper.open("fluent.conf")

@ashie
Copy link
Member Author

ashie commented May 30, 2022

Finally I've found a way to resolve this issue.
Recent Ruby has File::Constants::SHARE_DELETE, we can use this instead of Fluent::FileWrapper. Note that it's enabled only when use with File::Constants::BINARY:

https://github.com/ruby/ruby/blob/d6684f063bc53e3cab025bd39526eca3b480b5e7/win32/win32.c#L6332-L6345

    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;
    }

File::Constants::SHARE_DELETE was originaly added for Fluentd, and we already abandon Ruby 2.6 or former support, so we should use this!
https://bugs.ruby-lang.org/issues/11218

@ashie ashie added this to the v1.15.0 milestone May 30, 2022
ashie added 5 commits May 30, 2022 18:14
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]>
@ashie ashie closed this in #3766 May 31, 2022
@ashie ashie deleted the ci-ruby-3.1 branch May 31, 2022 07:47
@ashie
Copy link
Member Author

ashie commented Jun 7, 2022

I've investigated it with my own custom build Ruby. It fails on fstat() in rb_io_initialize() despite passing a valid fd retrieved by _open_osfhandle() at fluentd.

Now I've got the root cause.
Because window-pr gem refers msvcrt's _open_osfhandle, not ucvrt:
https://github.com/cosmo0920/windows-pr/blob/78b922594ae1314f3f995c8bc9f99e10cc339c91/lib/windows/handle.rb#L21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant