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

Invalid mode 0 for existing descriptor N (expected 1) (Errno::EINVAL) on macOS #2872

Closed
eregon opened this issue Feb 16, 2023 · 0 comments
Closed
Assignees
Labels

Comments

@eregon
Copy link
Member

eregon commented Feb 16, 2023

This happens with assert_separately on macOS on TruffleRuby 22.3.
It's already fixed on master: 448ba1c
So using truffleruby-head/truffleruby-dev fixes this.
This issue is to easily find this information if someone else runs in this issue.

For instance from https://github.com/ruby/openssl/actions/runs/4189906780/jobs/7262770704

5) Failure: test_openssl_engine_digest_sha1(OpenSSL::TestEngine):
  assert_separately failed with error message
  pid 6314 exit 1
  | <internal:core> core/io.rb:913:in `setup': Invalid argument - Invalid mode 0 for existing descriptor 13 (expected 1) (Errno::EINVAL)
  | 	from <internal:core> core/io.rb:947:in `initialize'
  | 	from /Users/runner/work/openssl/openssl/test/lib/core_assertions.rb:247:in `separated_runner'
  | 	from -:4:in `<main>'
  .
  <false> is not true.
/Users/runner/work/openssl/openssl/test/lib/core_assertions.rb:490:in `assert'
/Users/runner/work/openssl/openssl/test/lib/core_assertions.rb:314:in `assert_separately'
/Users/runner/work/openssl/openssl/test/openssl/test_engine.rb:85:in `with_openssl'
/Users/runner/work/openssl/openssl/test/openssl/test_engine.rb:45:in `test_openssl_engine_digest_sha1'
     42:   end
     43: 
     44:   def test_openssl_engine_digest_sha1
  => 45:     with_openssl <<-'end;'
     46:       engine = OpenSSL::Engine.by_id("openssl")
     47:       digest = engine.digest("SHA1")
     48:       assert_not_nil(digest)
<internal:core> core/throw_catch.rb:36:in `catch'
<internal:core> core/throw_catch.rb:36:in `catch'

Also in this form https://github.com/ruby/timeout/actions/runs/4189487236/jobs/7261869962:

 ===============================================================================
Failure: test_handling_enclosed_threadgroup(TestTimeout):
  assert_separately failed with error message
  pid 1849 exit 0
  | <internal:core> core/errno.rb:54:in `handle_errno': Broken pipe (Errno::EPIPE)
  | 	from <internal:core> core/posix.rb:512:in `write_string_native'
  | 	from <internal:core> core/io.rb:2369:in `write'
  | 	from <internal:core> core/truffle/io_operations.rb:67:in `block in puts'
  | 	from <internal:core> core/truffle/io_operations.rb:34:in `each'
  | 	from <internal:core> core/truffle/io_operations.rb:34:in `puts'
  | 	from <internal:core> core/io.rb:1713:in `puts'
  | 	from /Users/runner/work/timeout/timeout/test/lib/core_assertions.rb:251:in `block in separated_runner'
  .
  <false> is not true.
/Users/runner/work/timeout/timeout/test/lib/core_assertions.rb:489:in `assert'
/Users/runner/work/timeout/timeout/test/lib/core_assertions.rb:313:in `assert_separately'
/Users/runner/work/timeout/timeout/test/test_timeout.rb:177:in `test_handling_enclosed_threadgroup'
     174: 
     175:   # https://github.com/ruby/timeout/issues/24
     176:   def test_handling_enclosed_threadgroup
  => 177:     assert_separately(%w[-rtimeout], <<-'end;')
     178:       Thread.new {
     179:         t = Thread.current
     180:         group = ThreadGroup.new
<internal:core> core/throw_catch.rb:36:in `catch'
<internal:core> core/throw_catch.rb:36:in `catch'
===============================================================================
@eregon eregon added the macos label Feb 16, 2023
@eregon eregon added this to the 23.0.0 Release milestone Feb 16, 2023
@eregon eregon self-assigned this Feb 16, 2023
@eregon eregon closed this as completed Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant