You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2018/07/13 06:06:00 UTC

[kudu-CR] [tools] ignore SIGPIPE in kudu CLI

Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10938


Change subject: [tools] ignore SIGPIPE in kudu CLI
......................................................................

[tools] ignore SIGPIPE in kudu CLI

Since OpenSSL does not provide much control over underlying socket's
options for SSL_write() and there is no analogous option for
SO_NOSIGPIPE on Linux, let's ignore SIGPIPE in the kudu CLI.  That
helps to avoid random crashes of the tool when the server abruptly
closes the connection.

The issue with the kudu CLI tool exiting on SIGPIPE surfaced while
running the TserverGoesDownDuringRebalancingTest scenario from
kudu-admin-test.

Change-Id: I379376e7856a167b590f90c20f82402f2b825db9
---
M src/kudu/tools/tool_main.cc
1 file changed, 5 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/38/10938/1
-- 
To view, visit http://gerrit.cloudera.org:8080/10938
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I379376e7856a167b590f90c20f82402f2b825db9
Gerrit-Change-Number: 10938
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>

[kudu-CR] [tools] ignore SIGPIPE in kudu CLI

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/10938 )

Change subject: [tools] ignore SIGPIPE in kudu CLI
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/10938/1/src/kudu/tools/tool_main.cc
File src/kudu/tools/tool_main.cc:

http://gerrit.cloudera.org:8080/#/c/10938/1/src/kudu/tools/tool_main.cc@268
PS1, Line 268:   kudu::InitGoogleLoggingSafe(argv[0]);
> I don't think so since the kudu CLI tool was exiting on SIGPIPE if during t
However, I think it requires some clarification.  I'll take a closer look.

Thank you for pointing at IgnoreSigPipe() in InitGoogleLoggingSafe()



-- 
To view, visit http://gerrit.cloudera.org:8080/10938
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I379376e7856a167b590f90c20f82402f2b825db9
Gerrit-Change-Number: 10938
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Fri, 13 Jul 2018 20:26:30 +0000
Gerrit-HasComments: Yes

[kudu-CR] [tools] ignore SIGPIPE in kudu CLI

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/10938 )

Change subject: [tools] ignore SIGPIPE in kudu CLI
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/10938/1/src/kudu/tools/tool_main.cc
File src/kudu/tools/tool_main.cc:

http://gerrit.cloudera.org:8080/#/c/10938/1/src/kudu/tools/tool_main.cc@268
PS1, Line 268:   kudu::InitGoogleLoggingSafe(argv[0]);
> Doesn't this already lead to an IgnoreSigPipe call?
I don't think so since the kudu CLI tool was exiting on SIGPIPE if during that TserverGoesDownDuringRebalancingTest.  

Probably, logging was already initialized at that point?

At least, after adding that IgnoreSigPipe() the issue with SIGPIPE during TserverGoesDownDuringRebalancingTest went away.



-- 
To view, visit http://gerrit.cloudera.org:8080/10938
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I379376e7856a167b590f90c20f82402f2b825db9
Gerrit-Change-Number: 10938
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Fri, 13 Jul 2018 20:23:27 +0000
Gerrit-HasComments: Yes

[kudu-CR] [tools] ignore SIGPIPE in kudu CLI

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/10938 )

Change subject: [tools] ignore SIGPIPE in kudu CLI
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/10938/1/src/kudu/tools/tool_main.cc
File src/kudu/tools/tool_main.cc:

http://gerrit.cloudera.org:8080/#/c/10938/1/src/kudu/tools/tool_main.cc@268
PS1, Line 268:   kudu::InitGoogleLoggingSafe(argv[0]);
> I don't think so since the kudu CLI tool was exiting on SIGPIPE if during t
I phrased it as a question, but I'm sure it does:

https://github.com/apache/kudu/blob/master/src/kudu/util/logging.cc#L272

Maybe something else is going on. Perhaps you can instrument the test to run under strace and see what sort of signal handling changes are being made?



-- 
To view, visit http://gerrit.cloudera.org:8080/10938
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I379376e7856a167b590f90c20f82402f2b825db9
Gerrit-Change-Number: 10938
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Fri, 13 Jul 2018 20:28:11 +0000
Gerrit-HasComments: Yes

[kudu-CR] [tools] ignore SIGPIPE in kudu CLI

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/10938 )

Change subject: [tools] ignore SIGPIPE in kudu CLI
......................................................................


Patch Set 1:

> (1 comment)

Yep, sure -- I'll do.

But so far I'm sure the SIGPIPE is not ignored since the kudu CLI tool binary exits upon SIGPIPE, and you can see that not only while running via kudu::tools::RunTool().

*****

vc1320:~$ ps axw | grep kudu                                                                        
14458 pts/1    S+     0:00 sudo -u kudu ./kudu cluster rebalance 127.0.0.1
14459 pts/1    Sl+    0:00 ./kudu cluster rebalance 127.0.0.1
14514 pts/2    S+     0:00 grep kudu
vc1320:~$ sudo kill -SIGPIPE 14459

*****

vc1320:~$ sudo -u kudu ./kudu cluster rebalance 127.0.0.1 > /tmp/kudu-rebalance.24.log 2>&1         
vc1320:~$ echo $?
141

*****


-- 
To view, visit http://gerrit.cloudera.org:8080/10938
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I379376e7856a167b590f90c20f82402f2b825db9
Gerrit-Change-Number: 10938
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Fri, 13 Jul 2018 20:55:37 +0000
Gerrit-HasComments: No

[kudu-CR] [tools] ignore SIGPIPE in kudu CLI

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/10938 )

Change subject: [tools] ignore SIGPIPE in kudu CLI
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/10938/1/src/kudu/tools/tool_main.cc
File src/kudu/tools/tool_main.cc:

http://gerrit.cloudera.org:8080/#/c/10938/1/src/kudu/tools/tool_main.cc@268
PS1, Line 268:   kudu::InitGoogleLoggingSafe(argv[0]);
Doesn't this already lead to an IgnoreSigPipe call?



-- 
To view, visit http://gerrit.cloudera.org:8080/10938
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I379376e7856a167b590f90c20f82402f2b825db9
Gerrit-Change-Number: 10938
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Fri, 13 Jul 2018 20:08:39 +0000
Gerrit-HasComments: Yes

[kudu-CR] [tools] ignore SIGPIPE in kudu CLI

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has abandoned this change. ( http://gerrit.cloudera.org:8080/10938 )

Change subject: [tools] ignore SIGPIPE in kudu CLI
......................................................................


Abandoned

Obsoleted by https://gerrit.cloudera.org/#/c/10946/
-- 
To view, visit http://gerrit.cloudera.org:8080/10938
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I379376e7856a167b590f90c20f82402f2b825db9
Gerrit-Change-Number: 10938
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins