You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Attila Bukor (Code Review)" <ge...@cloudera.org> on 2018/03/27 14:55:19 UTC
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Attila Bukor has uploaded this change for review. ( http://gerrit.cloudera.org:8080/9818
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote" and "recv error:"
don't contain the remote address, making it hard to locate the server
the connection failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
3 files changed, 110 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/1
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 1
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
Did you see my note about TlsSocket? It's fine if you don't want to take that on in this same patch, but be aware that TlsSocket is probably the more common case nowadays.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 05 Apr 2018 17:51:57 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Dan Burkert, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#8).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote" and "recv error:"
don't contain the remote address, making it hard to locate the server
the connection failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
3 files changed, 122 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/8
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 8
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
(9 comments)
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@1
PS9, Line 1: // Licensed to the Apache Software Foundation (ASF) under one
> nit: blank line at top of file
Done
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@45
PS9, Line 45: virtual void TearDown() override {
> style: indentation seems off in this file. we only indent private/public by
Done
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@46
PS9, Line 46: for (auto& thread : threads) {
: thread.join();
: }
> is this necessary?
you're right, I forgot deleting it after refactoring
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@56
PS9, Line 56:
> again strange indent
Done
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@63
PS9, Line 63: CHECK_OK(lis
> hrm, we don't really use std::promise and std::future elsewhere in the code
ok, changing it. would it make sense to rewrite Promise in util/promise.h to be a wrapper around std::future for now? I mean in a separate refactor commit of course
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@73
PS9, Line 73: istener_.Accept(
> should CHECK_OK this
Done
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@76
PS9, Line 76: SleepFor(MonoDelta::FromMilliseconds(200));
: CHECK_OK(lis
> these aren't needed in this scope - they can be inside 'if (accept)'
Done, also stayed there also refactoring...
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@80
PS9, Line 80:
> also CHECK_OK
Done
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@93
PS9, Line 93: UE(s.IsNetwork
> here too
Done
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 04 Apr 2018 11:37:26 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/9818/10/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/10/src/kudu/util/net/socket-test.cc@98
PS10, Line 98: TEST_F(SocketTest, TestRecvReset) {
: DoTest(false, "recv error from 127.0.0.1:[0-9]+: Resource temporarily unavailable");
: }
> I'm not 100% sure what this test is meant to test. It seems this is testing
I just needed to test the other code path as well. The problem is that if the connection is closed, it won't get you the actual IP address/port as there's no actual remote yet(so it logs out 0.0.0.0:0). I believe this shouldn't be a problem normally, as if it's a connection refused, it will be logged out somewhere else instead, but in the test I needed to open a connection and close it in a way that would result in a non-EOF error. I thought sending a RST instead, but for that I would need to get the actual C-level socket from the wrapper and send it there, so the time out was easier.
It might be a bit hacky, do you have another idea how to test it or should I put some comments explaining why it works this way?
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 05 Apr 2018 16:12:16 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
> Patch Set 10:
>
> (1 comment)
erm I guess I forgot to remove it after refactoring. basically I just needed a test case that went to the other recv error to make sure it prints the address too
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 05 Apr 2018 15:56:55 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/9818/10/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/10/src/kudu/util/net/socket-test.cc@98
PS10, Line 98: TEST_F(SocketTest, TestRecvReset) {
: DoTest(false, "recv error from 127.0.0.1:[0-9]+: Resource temporarily unavailable");
: }
I'm not 100% sure what this test is meant to test. It seems this is testing a timeout case, not a connection disconnection case -- the listening socket is sleeping 200ms before closing, but the connecting socket has a recv timeout of 100ms, so it's getting EAGAIN which just means a timeout. That stringifies to "Resource temporarily unavailable".
What is the case we're attempting to test here?
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 04 Apr 2018 19:39:02 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 15:
Failures look like they may be legit.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 15
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 19 Apr 2018 17:52:23 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 8:
> Patch Set 8: Verified-1
>
> Build Failed
>
> http://jenkins.kudu.apache.org/job/kudu-gerrit/12717/ : FAILURE
build failure seems to be from RELEASE/client_samples. I can reproduce this failure locally, but my change didn't introduce it, it's been failing for the last week or so at least:
+ make -j88 DESTDIR=/tmp/kudu-samples-test.D2r5KBBg9RhxC install
make: *** No rule to make target `install'. Stop.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 8
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 28 Mar 2018 12:39:25 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Dan Burkert, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#12).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote", "recv error:" and
"BlockingRecv error: failed to read from TLS socket" don't contain the
remote address, making it hard to locate the server the connection
failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
BlockingRecv error: failed to read from TLS socket (remote: \
127.0.0.1:7050): Can't send after socket shutdown
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/security/tls_socket-test.cc
M src/kudu/security/tls_socket.cc
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
5 files changed, 146 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/12
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 12
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Dan Burkert, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#7).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote" and "recv error:"
don't contain the remote address, making it hard to locate the server
the connection failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
3 files changed, 124 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/7
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 7
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#6).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote" and "recv error:"
don't contain the remote address, making it hard to locate the server
the connection failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
3 files changed, 112 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/6
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 6
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 14:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/9818/14/src/kudu/security/tls_socket-test.cc
File src/kudu/security/tls_socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/14/src/kudu/security/tls_socket-test.cc@224
PS14, Line 224: server.Stop();
I'm surprised this works, how does the server receive and respond to the write if it's already stopped? I expected the Stop() to have to occur in between the Recv calls. The test isn't failing, though, so I must be misunderstanding something.
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket.cc
File src/kudu/security/tls_socket.cc:
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket.cc@111
PS11, Line 111: CHECK(ssl_);
> thanks, moved it down under L118, so the save_errno != 0 case in L125 could
nice, that's even simpler.
http://gerrit.cloudera.org:8080/#/c/9818/14/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/14/src/kudu/util/net/socket-test.cc@65
PS14, Line 65: threads.emplace_back(std::thread([&]{
Could this thread be a local variable, and join at the end of the test? I think that's easier to follow than having cleanup happen in TearDown().
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 14
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 19 Apr 2018 17:05:30 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 6:
(3 comments)
You may also want to make these changes to the TlsSocket class in tls_socket.cc, which is used instead of the normal socket for encrypted RPCs.
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@46
PS6, Line 46: virtual void SetUp() OVERRIDE
prefer using the C++11 style for new code here and below:
void SetUp() override {
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@48
PS6, Line 48: address.ParseString("127.0.0.1", 11010);
Is this address being used anywhere? If possible avoid hard coded ports, since they make tests flaky and difficult to parallelize.
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@95
PS6, Line 95: TEST_F(SocketTest, TestRecvReset) {
gtest has a built-in feature that facilitates writing this style of test, check out https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md#value-parameterized-tests and grep kudu for 'TEST_P' to find examples.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 6
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 27 Mar 2018 19:06:29 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 7:
(10 comments)
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@48
PS6, Line 48: virtual void SetUp() override {
> Can't you bind to port 0 so it picks an empty one, and then report back the
Done
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@53
PS6, Line 53: for (auto& thread : threads) {
> nit: too much indentation
Done
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@59
PS6, Line 59:
> nit: indent by 1
Done
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@61
PS6, Line 61: Socket listener_;
> style: this member should end in _
Done
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@64
PS6, Line 64: d DoTes
> style: DoTest since this is a non-inline method
Done
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@66
PS6, Line 66: td::future<Sockaddr> sockaddr_future = sockaddr_promise.get_future();
: threads.emplace_back(std::thread([&]{
: Sockaddr address;
: address.ParseString("0.0.0.0", 0);
:
> nit: messy inentation. Please add CHECK_OK around all the call sites that r
Done
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@75
PS6, Line 75: listener_.GetSocketAddress(&sockaddr);
> we use SleepFor from monotime.h instead
Done
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@82
PS6, Line 82: sock.Close();
> isn't this racey? how do we know that the other thread is listening yet? I
Done
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@91
PS6, Line 91:
> in order to deal with the ephemeral port you can use ASSERT_STR_MATCHES ins
Done
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@95
PS6, Line 95: client.SetRecvTimeout(MonoDelta::FromMilliseconds(100));
> You can have it parameterized on std::pair<bool, std::string>, but I'm fine
let me know if you think it would be better with a std::pair<bool, std::string>, I can change it, but for me it didn't make sense contextually (on the other hand the more I think about it, the more sense it makes as it's still the same method just different error)
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 7
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 28 Mar 2018 10:49:36 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#4).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote" and "recv error:"
don't contain the remote address, making it hard to locate the server
the connection failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
3 files changed, 112 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/4
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 4
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 12:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket-test.cc
File src/kudu/security/tls_socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket-test.cc@231
PS11, Line 231: ASSERT_OK(client_sock->BlockingRecv(buf.get(), kEchoChunkSize, &nread,
> Can you add some explanation for why this requires a background thread? Se
makes sense, thanks
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket.cc
File src/kudu/security/tls_socket.cc:
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket.cc@111
PS11, Line 111: errno = 0;
> This is a really hot function, so the overhead of creating this message (al
thanks, moved it down under L118, so the save_errno != 0 case in L125 could use it as well without duplication. All cases except for one are cases where this is used, so I think it shouldn't have an impact, but let me know if I should still use lazy evaluation instead.
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket.cc@125
PS11, Line 125:
> probably worth prefixing this with the message as well.
Done
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/util/net/socket-test.cc@68
PS11, Line 68: Socket sock;
> Could this preamble be done in the main thread? Then you wouldn't need to
Done
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 12
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 19 Apr 2018 09:50:50 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Dan Burkert, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#17).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote", "recv error:" and
"BlockingRecv error: failed to read from TLS socket" don't contain the
remote address, making it hard to locate the server the connection
failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
BlockingRecv error: failed to read from TLS socket (remote: \
127.0.0.1:7050): Can't send after socket shutdown
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/security/tls_socket-test.cc
M src/kudu/security/tls_socket.cc
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
5 files changed, 138 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/17
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 17
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 11:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket-test.cc
File src/kudu/security/tls_socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket-test.cc@231
PS11, Line 231: threads.emplace_back(std::thread([&]{
Can you add some explanation for why this requires a background thread? Seems like you should just be able to call server.Stop() near line 241 between the two Recv() calls and it would work OK.
If it does need to be done in the background then the way the cleanup is written is unsafe: 'server' only lives for the scope of this test. The thread is holding onto a reference to 'server' until TearDown() is executed, which will be a dangling reference. To make it safe you need to call join() before the end of the scope of this test. That being said, I don't see why join() is necessary at all.
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket.cc
File src/kudu/security/tls_socket.cc:
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket.cc@111
PS11, Line 111: std::string kErrString = strings::Substitute("failed to read from TLS socket (remote: $0)",
This is a really hot function, so the overhead of creating this message (allocation + the GetPeerAddress syscall) could end up showing up. I suggest making it lazy, so that it's only created on demand:
auto err_string = [&] {
Sockaddr remote;
Socket::GetPeerAddress(&remote);
std::string kErrString = strings::Substitute("failed to read from TLS socket (remote: $0)",
};
and then change use-sites from 'kErrString' to 'err_string()'.
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/security/tls_socket.cc@125
PS11, Line 125: "SSL_read error"
probably worth prefixing this with the message as well.
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/11/src/kudu/util/net/socket-test.cc@68
PS11, Line 68: sockaddr_promise.Set(sockaddr);
Could this preamble be done in the main thread? Then you wouldn't need to use the promise. Seems like the if/else blocks are the only thing that needs to be done in the background.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 11
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 18 Apr 2018 23:23:57 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
> Patch Set 10:
>
> > Patch Set 10:
> >
> > > Patch Set 10:
> > >
> > > > Patch Set 10:
> > > >
> > > > > Patch Set 10:
> > > > >
> > > > > Did you see my note about TlsSocket? It's fine if you don't want to take that on in this same patch, but be aware that TlsSocket is probably the more common case nowadays.
> > > >
> > > > Sorry, I missed that one somehow. I'll change it in TlsSocket as well then, I kind of assumed it wraps Socket.
> > >
> > > Actually, it extends Socket, so I think it should be fine. Or do you have a specific error message I should look into?
> >
> > It does inherit from Socket, but it overrides Recv, so the error messages orginating there won't incude the IP address: https://github.com/apache/kudu/blob/master/src/kudu/security/tls_socket.cc#L105. I'm fine holding off on TLS socket if this isn't something that comes up in practice.
>
> interestingly, I haven't really seen any of these errors, but I'll fix it. Do you think I should just amend this commit or should it be in a separate commit?
Up to you, I don't think it will be big enough to be unwieldy if you include it here.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 10 Apr 2018 22:09:51 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Dan Burkert, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#13).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote", "recv error:" and
"BlockingRecv error: failed to read from TLS socket" don't contain the
remote address, making it hard to locate the server the connection
failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
BlockingRecv error: failed to read from TLS socket (remote: \
127.0.0.1:7050): Can't send after socket shutdown
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/security/tls_socket-test.cc
M src/kudu/security/tls_socket.cc
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
5 files changed, 145 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/13
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 13
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
> Patch Set 10:
>
> > Patch Set 10:
> >
> > > Patch Set 10:
> > >
> > > Did you see my note about TlsSocket? It's fine if you don't want to take that on in this same patch, but be aware that TlsSocket is probably the more common case nowadays.
> >
> > Sorry, I missed that one somehow. I'll change it in TlsSocket as well then, I kind of assumed it wraps Socket.
>
> Actually, it extends Socket, so I think it should be fine. Or do you have a specific error message I should look into?
It does inherit from Socket, but it overrides Recv, so the error messages orginating there won't incude the IP address: https://github.com/apache/kudu/blob/master/src/kudu/security/tls_socket.cc#L105. I'm fine holding off on TLS socket if this isn't something that comes up in practice.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Fri, 06 Apr 2018 17:03:41 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
> Patch Set 10:
>
> > Patch Set 10:
> >
> > Did you see my note about TlsSocket? It's fine if you don't want to take that on in this same patch, but be aware that TlsSocket is probably the more common case nowadays.
>
> Sorry, I missed that one somehow. I'll change it in TlsSocket as well then, I kind of assumed it wraps Socket.
Actually, it extends Socket, so I think it should be fine. Or do you have a specific error message I should look into?
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Fri, 06 Apr 2018 14:18:29 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
> Patch Set 10:
>
> > Patch Set 10:
> >
> > (1 comment)
>
> erm I guess I forgot to remove it after refactoring. basically I just needed a test case that went to the other recv error to make sure it prints the address too
^ disregard please, wrong place to comment and also I was wrong
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 05 Apr 2018 16:06:57 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Dan Burkert, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#15).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote", "recv error:" and
"BlockingRecv error: failed to read from TLS socket" don't contain the
remote address, making it hard to locate the server the connection
failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
BlockingRecv error: failed to read from TLS socket (remote: \
127.0.0.1:7050): Can't send after socket shutdown
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/security/tls_socket-test.cc
M src/kudu/security/tls_socket.cc
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
5 files changed, 137 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/15
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 15
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 6:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@95
PS6, Line 95: TEST_F(SocketTest, TestRecvReset) {
> yea I think for this case it's easier to just do what he's done here
You can have it parameterized on std::pair<bool, std::string>, but I'm fine skipping this.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 6
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 27 Mar 2018 22:11:37 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
> Patch Set 10:
>
> Did you see my note about TlsSocket? It's fine if you don't want to take that on in this same patch, but be aware that TlsSocket is probably the more common case nowadays.
Sorry, I missed that one somehow. I'll change it in TlsSocket as well then, I kind of assumed it wraps Socket.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Fri, 06 Apr 2018 10:10:12 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Dan Burkert, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#10).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote" and "recv error:"
don't contain the remote address, making it hard to locate the server
the connection failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
3 files changed, 115 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/10
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Dan Burkert, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#16).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote", "recv error:" and
"BlockingRecv error: failed to read from TLS socket" don't contain the
remote address, making it hard to locate the server the connection
failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
BlockingRecv error: failed to read from TLS socket (remote: \
127.0.0.1:7050): Can't send after socket shutdown
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/security/tls_socket-test.cc
M src/kudu/security/tls_socket.cc
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
5 files changed, 137 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/16
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 16
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 9:
(9 comments)
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@1
PS9, Line 1:
nit: blank line at top of file
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@45
PS9, Line 45: public:
style: indentation seems off in this file. we only indent private/public by 1 space, and then the stuff underneath them an additional 1 space, so that the total indentation is 2 within the class
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@46
PS9, Line 46: virtual void SetUp() override {
: KuduTest::SetUp();
: }
is this necessary?
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@56
PS9, Line 56: }
again strange indent
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@63
PS9, Line 63: std::promise
hrm, we don't really use std::promise and std::future elsewhere in the codebase. Can you switch this over to Promise from util/promise.h for now? Maybe we should switch at some point but for now let's prefer consistency
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@73
PS9, Line 73: GetSocketAddress
should CHECK_OK this
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@76
PS9, Line 76: Sockaddr new_addr;
: Socket sock;
these aren't needed in this scope - they can be inside 'if (accept)'
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@80
PS9, Line 80: sock.Close();
also CHECK_OK
http://gerrit.cloudera.org:8080/#/c/9818/9/src/kudu/util/net/socket-test.cc@93
PS9, Line 93: SetRecvTimeout
here too
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 9
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 04 Apr 2018 00:40:21 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 17: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 17
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 19 Apr 2018 20:07:15 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote", "recv error:" and
"BlockingRecv error: failed to read from TLS socket" don't contain the
remote address, making it hard to locate the server the connection
failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
BlockingRecv error: failed to read from TLS socket (remote: \
127.0.0.1:7050): Can't send after socket shutdown
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Reviewed-on: http://gerrit.cloudera.org:8080/9818
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <da...@apache.org>
---
M src/kudu/security/tls_socket-test.cc
M src/kudu/security/tls_socket.cc
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
5 files changed, 138 insertions(+), 5 deletions(-)
Approvals:
Kudu Jenkins: Verified
Dan Burkert: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 18
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 15: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 15
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 19 Apr 2018 17:17:13 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 10:
> Patch Set 10:
>
> > Patch Set 10:
> >
> > > Patch Set 10:
> > >
> > > > Patch Set 10:
> > > >
> > > > Did you see my note about TlsSocket? It's fine if you don't want to take that on in this same patch, but be aware that TlsSocket is probably the more common case nowadays.
> > >
> > > Sorry, I missed that one somehow. I'll change it in TlsSocket as well then, I kind of assumed it wraps Socket.
> >
> > Actually, it extends Socket, so I think it should be fine. Or do you have a specific error message I should look into?
>
> It does inherit from Socket, but it overrides Recv, so the error messages orginating there won't incude the IP address: https://github.com/apache/kudu/blob/master/src/kudu/security/tls_socket.cc#L105. I'm fine holding off on TLS socket if this isn't something that comes up in practice.
interestingly, I haven't really seen any of these errors, but I'll fix it. Do you think I should just amend this commit or should it be in a separate commit?
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 10
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Fri, 06 Apr 2018 21:53:40 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Dan Burkert, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#14).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote", "recv error:" and
"BlockingRecv error: failed to read from TLS socket" don't contain the
remote address, making it hard to locate the server the connection
failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
BlockingRecv error: failed to read from TLS socket (remote: \
127.0.0.1:7050): Can't send after socket shutdown
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/security/tls_socket-test.cc
M src/kudu/security/tls_socket.cc
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
5 files changed, 146 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/14
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 14
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 6:
(3 comments)
> Patch Set 6:
>
> (3 comments)
>
> You may also want to make these changes to the TlsSocket class in tls_socket.cc, which is used instead of the normal socket for encrypted RPCs.
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@46
PS6, Line 46: virtual void SetUp() OVERRIDE
> prefer using the C++11 style for new code here and below:
Done
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@48
PS6, Line 48: address.ParseString("127.0.0.1", 11010);
> Is this address being used anywhere? If possible avoid hard coded ports, s
address is used to check the error message, + I need to bind to something. This port number was used in ksck_remote-test.cc:
// Hard-coded ports for the masters. This is safe, as these tests run under
// a resource lock (see CMakeLists.txt in this directory).
// TODO we should have a generic method to obtain n free ports.
opts.master_rpc_ports = { 11010, 11011, 11012 };
On the other hand I didn't set up the resource lock here, so it's still valid. How should I resolve this?
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@95
PS6, Line 95: TEST_F(SocketTest, TestRecvReset) {
> gtest has a built-in feature that facilitates writing this style of test, c
I looked into it but I'm not sure if this is what I should use here as I need two completely different code paths with completely different error messages, I just use the same method for convenience, but they're distinct test cases.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 6
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 27 Mar 2018 19:56:25 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#3).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote" and "recv error:"
don't contain the remote address, making it hard to locate the server
the connection failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
3 files changed, 101 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/3
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 3
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 15:
> Patch Set 15:
>
> Failures look like they may be legit.
TestRecvFailure is definitely my bad, it seems like a race condition due to the socket in server.Start() not yet listening/set up properly. I introduced a 100ms sleep which should take care of it. I can wait for a promise if that approach is better, but that seems a bit of an overkill now. I added slice based on IWYU too, however that doesn't seem to be related to my change, but it seems persistent on wanting it. TabletCopyITest.TestBeginTabletCopySessionConcurrency seems random flake, it worked fine on my machine.
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 15
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 19 Apr 2018 18:12:44 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#2).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote" and "recv error:"
don't contain the remote address, making it hard to locate the server
the connection failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
3 files changed, 102 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/2
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 2
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 6:
(10 comments)
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@48
PS6, Line 48: address.ParseString("127.0.0.1", 11010);
> address is used to check the error message, + I need to bind to something.
Can't you bind to port 0 so it picks an empty one, and then report back the bound address of the socket from the listener thread back to the main thread?
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@53
PS6, Line 53: thread.join();
nit: too much indentation
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@59
PS6, Line 59: protected:
nit: indent by 1
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@61
PS6, Line 61: Sockaddr address;
style: this member should end in _
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@64
PS6, Line 64: do_test
style: DoTest since this is a non-inline method
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@66
PS6, Line 66: listener_.Init(0);
: listener_.BindAndListen(address, 0);
:
: Sockaddr new_addr;
: Socket sock;
nit: messy inentation. Please add CHECK_OK around all the call sites that return a Status in case they fail (also below in a few places)
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@75
PS6, Line 75: std::this_thread::sleep_for(std::chrono::milliseconds(200));
we use SleepFor from monotime.h instead
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@82
PS6, Line 82: ASSERT_OK(client.Connect(address));
isn't this racey? how do we know that the other thread is listening yet? I think the other thread should set a Promise<Sockaddr> with its listening address after binding to port 0, and then you can wait on that promise here to find out where to connect
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@91
PS6, Line 91: ASSERT_STR_CONTAINS(s.message().ToString(), message);
in order to deal with the ephemeral port you can use ASSERT_STR_MATCHES instead
http://gerrit.cloudera.org:8080/#/c/9818/6/src/kudu/util/net/socket-test.cc@95
PS6, Line 95: TEST_F(SocketTest, TestRecvReset) {
> I looked into it but I'm not sure if this is what I should use here as I ne
yea I think for this case it's easier to just do what he's done here
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 6
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 27 Mar 2018 22:07:41 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Dan Burkert, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#11).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote" and "recv error:"
don't contain the remote address, making it hard to locate the server
the connection failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/security/tls_socket-test.cc
M src/kudu/security/tls_socket.cc
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
5 files changed, 158 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/11
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 11
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
Patch Set 15:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/9818/14/src/kudu/security/tls_socket-test.cc
File src/kudu/security/tls_socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/14/src/kudu/security/tls_socket-test.cc@224
PS14, Line 224: server.Stop();
> I'm surprised this works, how does the server receive and respond to the wr
the while loop that starts in L157 starts with BlockingRecv, so by the time I call server.Stop() here it's already receiving. That's why I need to write and receive first, before I can attempt the BlockingRecv that fails due to the socket being closed.
http://gerrit.cloudera.org:8080/#/c/9818/14/src/kudu/util/net/socket-test.cc
File src/kudu/util/net/socket-test.cc:
http://gerrit.cloudera.org:8080/#/c/9818/14/src/kudu/util/net/socket-test.cc@65
PS14, Line 65:
> Could this thread be a local variable, and join at the end of the test? I
Done
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 15
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 19 Apr 2018 17:13:27 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2351 Add IP/port for Recv() failure
Posted by "Attila Bukor (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9818
to look at the new patch set (#5).
Change subject: KUDU-2351 Add IP/port for Recv() failure
......................................................................
KUDU-2351 Add IP/port for Recv() failure
Error messages like "Recv() got EOF from remote" and "recv error:"
don't contain the remote address, making it hard to locate the server
the connection failed to.
This change introduces adds the peer's IP address and port number to
these error messages.
Examples:
Recv() got EOF from remote 127.0.0.1:7050
recv error from 127.0.0.1:7050: Resource temporarily unavailable
Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
3 files changed, 112 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/9818/5
--
To view, visit http://gerrit.cloudera.org:8080/9818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 5
Gerrit-Owner: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>