-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Aix, ibmi: Handle server hang when remote sends TCP RST #3482
Conversation
Workaround getsockname() not working for a TCP handle that has received RST from the remote.
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
@vtjnash included your comment suggestion |
Can you add a test for this? I suspect it is also an issue on macOS (per the man page), and might return ECONNRESET here on FreeBSD (per the man page) |
(e.g. take an existing |
Semi-relatedly: anyone know how we managed to end up with almost nearly the same code in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needs a test, and to merge this code path with uv_guess_handle
Working on a test case; Wasn't able to reproduce given failure by modifying existing shutdown test so far; Another approach I am thinking of is declaring an additional test helper server, that would work much like |
The echo_server will already call uv_tcp_close_reset if you need it, though this test should not require a separate process. |
Also, you must first merge the |
Please take a look! I had to make TCP RST handling more robust on IBMi by using |
Looks like |
Interestingly, The method Would it be better if we skip |
Yes, let's make it TEST_SKIP on Win32, since SOCKET is a different underlying type from HANDLE and fd. |
Skipped on Win32 |
Should I request anyone else to review it as well? |
@richardlau |
|
|
||
static uv_tcp_t tcp; | ||
static uv_connect_t connect_req; | ||
static uv_shutdown_t shutdown_req; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to call uv_shutdown
? Currently, this variable and called_shutdown_cb
are never used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not mean to call uv_shutdown
- only meant to check the handle type in the read callback; Should I make a separate PR to remove shutdown_req
& called_shutdown_cb
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look #3574
Workaround getsockname() not working for a TCP handle that has received RST from the remote. Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Workaround for getsockname() not working for a TCP handle that has received RST from the remote.
Issue: #3481