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
Pass WSA_FLAG_NO_HANDLE_INHERIT flag to the WSASocketA() to avoid handle leaking on the Windows in case of using CreateProcess() on the server #18060
Conversation
handle leaking on the Windows in case of using CreateProcess() on the server
Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement. After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.
Regards, |
Please sign cla. |
@frazenshtein is this PR an attempt to resolve #17704? |
Check WSA_FLAG_NO_HANDLE_INHERIT is supported.
@nicolasnoble opinions? |
Seeing this error in the linux artifact build:
|
is the header that contains the new socket option also available to mingw? That build failure is a mingw issue |
I'm also wondering has this been verified to fix the issue. A test would be best but barring that it would be good to know that this has been manually verified |
@frazenshtein, are you planning to address review feedback? |
Yes, I will try to take into account the comments in the nearest future. I have some difficulties with the allocation of free time. |
Yes, I really mixed up NULL and 0. Fixed.
Haven't found this one. Looks strange, because we have added #ifndef to the src/core/lib/iomgr/socket_windows.h Can you provide an error message or a link and keywords to grep?
Fixed. However, I'm happy to rename it to your liking. I didn't find a good example in the code, so it turned out a bit long.
I was unable to reproduce the problem from the #17704 issue. If the author provides a minimal example it will be easier. |
I triggered an adhoc package build (the nugets) to be able to verify if this patch fixes #17704 |
According to #17704 (comment) this would fix #17704 if merged. |
Do we want to use the default flags for resolver_component_test.cc too?
|
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.
LGTM for general sanity and we also have a confirmation that this fixes #17704.
@apolcyn besides what I mentioned in #18060 (comment), I'm mostly happy with the code in this PR, do you want to give it a quick pass and merge if it looks good?
Could you please make clear for me is something expected from my side? |
grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc Line 448 in 69b2d57
Update: ignore my comment. |
@apolcyn I believe this is good to do, can you give owners approval so we can merge? |
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.
LGTM, sorry for the delay
https://docs.microsoft.com/en-us/windows/desktop/api/winsock2/nf-winsock2-wsasocketa