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

[close #2371] Do not log EOFError #2384

Merged
merged 3 commits into from Sep 27, 2020
Merged

Conversation

@schneems
Copy link
Contributor

@schneems schneems commented Sep 25, 2020

This is a continuation from #2382.

One of the ways that an EOFError can be triggered is by opening a connection, not writing to it, then closing it (there may be others). This should be an expected and non-exceptional activity. When it happens we should not log it.

The change to client.rb makes sense to me as this is the initial place where we're reading from the socket and then finding out the stream has been closed. I'm not quite sure why the code in server.rb is needed. I think this comes from when the server is shutting down and trying to finish out connections.

I don't think this is the 100% right way to do things. I'm guessing that if we get an EOFError on a connection we should somehow consider it "dead" and never try to read from it again. I don't know if there's a better way to signify this in the try_to_finish method of client.rb.

schneems added 2 commits Sep 25, 2020
The EOF can be triggered by opening a connection, not writing to it, then closing the connection. When this happens we can detect if an error was logged or not by inspecting the stderr string. 

This test fails
This is a continuation from #2382.

One of the ways that an EOFError can be triggered is by opening a connection, not writing to it, then closing it (there may be others). This should be an expected and non-exceptional activity. When it happens we should not log it.

This commit gets the test in the prior commit to pass.

The change to client.rb makes sense to me as this is the initial place where we're reading from the socket and then finding out the stream has been closed. Im not quite sure why the code in server.rb is needed. I think this comes from when the server is shutting down and trying to finish out connections.

I don't think this is the 100% right way to do things. I'm guessing that if we get an EOFError on a connection we should somehow consider it "dead" and never try to read from it again. I don't know if there's a better way to signify this in the `try_to_finish` method of client.rb
@nateberkopec nateberkopec merged commit f282c22 into master Sep 27, 2020
60 of 65 checks passed
60 of 65 checks passed
ubuntu-20.04 2.5
Details
ubuntu-20.04 2.5
Details
build
Details
ubuntu-20.04 2.7
Details
ubuntu-20.04 2.7
Details
ubuntu-20.04 2.7
Details
ubuntu-20.04 2.7
Details
ubuntu-20.04 jruby
Details
ubuntu-20.04 jruby
Details
ubuntu-20.04 head
Details
ubuntu-20.04 head
Details
windows-2019 2.7
Details
windows-2019 2.7
Details
ubuntu-18.04 2.2
Details
ubuntu-18.04 2.2
Details
ubuntu-18.04 2.3 ubuntu-18.04 2.3
Details
ubuntu-18.04 2.3
Details
ubuntu-18.04 2.4
Details
ubuntu-18.04 2.4
Details
ubuntu-18.04 2.5 ubuntu-18.04 2.5
Details
ubuntu-18.04 2.5
Details
ubuntu-18.04 2.6
Details
ubuntu-18.04 2.6
Details
ubuntu-18.04 2.7
Details
ubuntu-18.04 2.7
Details
ubuntu-18.04 head
Details
ubuntu-18.04 head
Details
ubuntu-18.04 jruby ubuntu-18.04 jruby
Details
ubuntu-18.04 jruby
Details
ubuntu-18.04 jruby-head ubuntu-18.04 jruby-head
Details
ubuntu-18.04 jruby-head ubuntu-18.04 jruby-head
Details
ubuntu-18.04 truffleruby-head
Details
ubuntu-18.04 truffleruby-head
Details
macos-10.15 2.2
Details
macos-10.15 2.2
Details
macos-10.15 2.3
Details
macos-10.15 2.3
Details
macos-10.15 2.4
Details
macos-10.15 2.4
Details
macos-10.15 2.5
Details
macos-10.15 2.5
Details
macos-10.15 2.6
Details
macos-10.15 2.6
Details
macos-10.15 2.7
Details
macos-10.15 2.7
Details
macos-10.15 head
Details
macos-10.15 head
Details
macos-10.15 jruby
Details
macos-10.15 jruby
Details
macos-10.15 truffleruby-head macos-10.15 truffleruby-head
Details
macos-10.15 truffleruby-head macos-10.15 truffleruby-head
Details
windows-2019 2.2
Details
windows-2019 2.2
Details
windows-2019 2.3
Details
windows-2019 2.3
Details
windows-2019 2.4
Details
windows-2019 2.4
Details
windows-2019 2.5
Details
windows-2019 2.5
Details
windows-2019 2.6
Details
windows-2019 2.6
Details
windows-2019 2.7
Details
windows-2019 2.7
Details
windows-2019 mingw
Details
windows-2019 mingw
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.