[
https://issues.apache.org/jira/browse/IMPALA-7407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16586480#comment-16586480
]
ASF subversion and git services commented on IMPALA-7407:
---------------------------------------------------------
Commit dccc2de86a01e1a109f215c1a08d118471f57ca4 in impala's branch
refs/heads/master from [~twmarshall]
[ https://git-wip-us.apache.org/repos/asf?p=impala.git;h=dccc2de ]
IMPALA-7407: Fix test_cancellation failure on KeyboardInterrupt
test_cancellation runs a shell process, executes a query, sleeps,
sends a sigint to the process, and then checks that the query is
cancelled. If the sigint is sent prior to the shell installing its
signal handler, the test can fail with a KeyboardInterrupt.
This patch removes the reliance on the sleep being long enough by
actually reading the output of the shell and only cancelling the
query once the shell shows that it has started running.
Testing:
- Ran test_cancellation in a loop.
Change-Id: I65302ffb838d5185f77853bc2e53296f3a701d93
Reviewed-on: http://gerrit.cloudera.org:8080/11255
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Thomas Marshall <[email protected]>
> TestImpalaShell.test_cancellation failure
> -----------------------------------------
>
> Key: IMPALA-7407
> URL: https://issues.apache.org/jira/browse/IMPALA-7407
> Project: IMPALA
> Issue Type: Bug
> Components: Infrastructure
> Affects Versions: Impala 3.1.0
> Reporter: Vuk Ercegovac
> Assignee: Thomas Tauber-Marshall
> Priority: Blocker
> Labels: broken-build, flaky-test
>
> Hit during a parallel test run on jenkins.io:
> {noformat}
> 20:37:39 ] assert "Cancelling Query" in result.stderr, result.stderr
> 20:37:39 ] E AssertionError: Starting Impala Shell without Kerberos
> authentication
> 20:37:39 ] E Traceback (most recent call last):
> 20:37:39 ] E File "/home/ubuntu/Impala/shell/impala_shell.py", line
> 1706, in <module>
> 20:37:39 ] E execute_queries_non_interactive_mode(options,
> query_options)
> 20:37:39 ] E File "/home/ubuntu/Impala/shell/impala_shell.py", line
> 1562, in execute_queries_non_interactive_mode
> 20:37:39 ] E shell = ImpalaShell(options, query_options)
> 20:37:39 ] E File "/home/ubuntu/Impala/shell/impala_shell.py", line
> 232, in __init__
> 20:37:39 ] E self.do_connect(options.impalad)
> 20:37:39 ] E File "/home/ubuntu/Impala/shell/impala_shell.py", line
> 798, in do_connect
> 20:37:39 ] E self._connect()
> 20:37:39 ] E File "/home/ubuntu/Impala/shell/impala_shell.py", line
> 842, in _connect
> 20:37:39 ] E result = self.imp_client.connect()
> 20:37:39 ] E File "/home/ubuntu/Impala/shell/impala_client.py", line
> 257, in connect
> 20:37:39 ] E result = self.ping_impala_service()
> 20:37:39 ] E File "/home/ubuntu/Impala/shell/impala_client.py", line
> 262, in ping_impala_service
> 20:37:39 ] E return self.imp_service.PingImpalaService()
> 20:37:39 ] E File
> "/home/ubuntu/Impala/shell/gen-py/ImpalaService/ImpalaService.py", line 229,
> in PingImpalaService
> 20:37:39 ] E return self.recv_PingImpalaService()
> 20:37:39 ] E File
> "/home/ubuntu/Impala/shell/gen-py/ImpalaService/ImpalaService.py", line 240,
> in recv_PingImpalaService
> 20:37:39 ] E (fname, mtype, rseqid) = iprot.readMessageBegin()
> 20:37:39 ] E File
> "/home/ubuntu/Impala/toolchain/thrift-0.9.3-p4/python/lib/python2.7/site-packages/thrift/protocol/TBinaryProtocol.py",
> line 126, in readMessageBegin
> 20:37:39 ] E sz = self.readI32()
> 20:37:39 ] E File
> "/home/ubuntu/Impala/toolchain/thrift-0.9.3-p4/python/lib/python2.7/site-packages/thrift/protocol/TBinaryProtocol.py",
> line 206, in readI32
> 20:37:39 ] E buff = self.trans.readAll(4)
> 20:37:39 ] E File
> "/home/ubuntu/Impala/toolchain/thrift-0.9.3-p4/python/lib/python2.7/site-packages/thrift/transport/TTransport.py",
> line 58, in readAll
> 20:37:39 ] E chunk = self.read(sz - have)
> 20:37:39 ] E File
> "/home/ubuntu/Impala/toolchain/thrift-0.9.3-p4/python/lib/python2.7/site-packages/thrift/transport/TTransport.py",
> line 159, in read
> 20:37:39 ] E self.__rbuf = StringIO(self.__trans.read(max(sz,
> self.__rbuf_size)))
> 20:37:39 ] E File
> "/home/ubuntu/Impala/toolchain/thrift-0.9.3-p4/python/lib/python2.7/site-packages/thrift/transport/TSocket.py",
> line 105, in read
> 20:37:39 ] E buff = self.handle.recv(sz)
> 20:37:39 ] E KeyboardInterrupt
> 20:37:39 ] E
> 20:37:39 ] E assert 'Cancelling Query' in 'Starting Impala Shell without
> Kerberos authentication\nTraceback (most recent call last):\n File
> "/home/ubuntu/Impal....7/site-packages/thrift/transport/TSocket.py", line
> 105, in read\n buff = self.handle.recv(sz)\nKeyboardInterrupt\n'
> 20:37:39 ] E + where 'Starting Impala Shell without Kerberos
> authentication\nTraceback (most recent call last):\n File
> "/home/ubuntu/Impal....7/site-packages/thrift/transport/TSocket.py", line
> 105, in read\n buff = self.handle.recv(sz)\nKeyboardInterrupt\n' =
> <tests.shell.util.ImpalaShellResult object at 0x7f2f1a436910>.stderr{noformat}
> Looks identical to https://issues.apache.org/jira/browse/IMPALA-6740 so it
> may be worth it to just re-open that one.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]