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

Rescue Errno::EBADF in Client#close #2748

Merged
merged 1 commit into from Nov 6, 2021
Merged

Conversation

dentarg
Copy link
Member

@dentarg dentarg commented Nov 3, 2021

Spotted happening in CI: https://github.com/puma/puma/runs/4095295281?check_suite_focus=true

2021-11-03 16:34:54 +0000 Exception handling servers: #<Errno::EBADF: Bad file descriptor>/Users/runner/work/puma/puma/lib/puma/client.rb:163:in `close': Bad file descriptor (Errno::EBADF)
TestRackServer#test_large_post_body =
        from /Users/runner/work/puma/puma/lib/puma/client.rb:163:in `close'

Related to #2700? (that changed rescue Object to IOError, Errno::EBADF and re-raises these two)

See also #2312 that added Errno::EBADF (and #2745 that improves on that)

Spotted happening in CI: https://github.com/puma/puma/runs/4095295281?check_suite_focus=true

    2021-11-03 16:34:54 +0000 Exception handling servers: #<Errno::EBADF: Bad file descriptor>/Users/runner/work/puma/puma/lib/puma/client.rb:163:in `close': Bad file descriptor (Errno::EBADF)
    TestRackServer#test_large_post_body =
            from /Users/runner/work/puma/puma/lib/puma/client.rb:163:in `close'
@MSP-Greg
Copy link
Member

MSP-Greg commented Nov 3, 2021

@dentarg

These macOS errors are getting a little frustrating. I had this and some other changes to test code, running more CI tonite. I don't think that I've seen the error on Ubuntu or Widows (or non-MRI?) , so I added a comment that Errno::EBADF was for darwin...

@dentarg
Copy link
Member Author

dentarg commented Nov 3, 2021

@MSP-Greg Feel free to add/change anything in this PR if you want. I created this quickly to be able to discuss it.

Is some of the various exceptions we see in CI the fall out from #2700?

@MSP-Greg
Copy link
Member

MSP-Greg commented Nov 4, 2021

Is some of the various exceptions we see in CI the fall out from #2700?

I don't think so, but I'll look at it again. I'm not sure what the cause is, but most of the problems have been in integration tests, which involve sub-processes. I.think.

@dentarg dentarg merged commit bc37bcf into puma:master Nov 6, 2021
@dentarg dentarg deleted the rescue/EBADF branch November 6, 2021 11:13
JuanitoFatas pushed a commit to JuanitoFatas/puma that referenced this pull request Sep 9, 2022
Spotted happening in CI: https://github.com/puma/puma/runs/4095295281?check_suite_focus=true

    2021-11-03 16:34:54 +0000 Exception handling servers: #<Errno::EBADF: Bad file descriptor>/Users/runner/work/puma/puma/lib/puma/client.rb:163:in `close': Bad file descriptor (Errno::EBADF)
    TestRackServer#test_large_post_body =
            from /Users/runner/work/puma/puma/lib/puma/client.rb:163:in `close'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants