You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org> on 2018/04/24 19:30:27 UTC

[Impala-ASF-CR] IMPALA-6740: Fix flaky test cancellation

Thomas Tauber-Marshall has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10177


Change subject: IMPALA-6740: Fix flaky test_cancellation
......................................................................

IMPALA-6740: Fix flaky test_cancellation

test_shall_commandline:test_cancellation starts an Impala shell
process, runs a query, sleeps briefly, and then cancels the query by
sending a SIGINT to the process. This has been occasionally failing
with the error 'KeyboardInterrupt'.

The problem occurs if the process hasn't fully started up before the
SIGINT is sent - in particular, if ImpalaShell:__init__ hasn't
installed the signal handler, which happens sometimes depending on
concurrent load on the machine.

The solution is to increase the time spent sleeping.

Testing:
- I can reliably repro the problem locally by reduing the sleep time.

Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
---
M tests/shell/test_shell_commandline.py
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/77/10177/1
-- 
To view, visit http://gerrit.cloudera.org:8080/10177
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
Gerrit-Change-Number: 10177
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>

[Impala-ASF-CR] IMPALA-6740: Fix flaky test cancellation

Posted by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org>.
Thomas Tauber-Marshall has posted comments on this change. ( http://gerrit.cloudera.org:8080/10177 )

Change subject: IMPALA-6740: Fix flaky test_cancellation
......................................................................


Patch Set 3: Code-Review+2

(1 comment)

carrying forward

http://gerrit.cloudera.org:8080/#/c/10177/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10177/2//COMMIT_MSG@25
PS2, Line 25: - I can reliably repro the problem locally by reducing the sleep time.
> reducing
Done



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
Gerrit-Change-Number: 10177
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Comment-Date: Tue, 24 Apr 2018 21:17:08 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-6740: Fix flaky test cancellation

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

Change subject: IMPALA-6740: Fix flaky test_cancellation
......................................................................


Patch Set 2: Code-Review+2

It's totally academic, but if you want to see if a Linux process is listening to a signal, you can figure it out based on /proc/self/status:

>>> print bin(int([x for x in file("/proc/self/status").readlines() if "SigCgt" in x][0].split("\t")[1].strip(), 16))
0b110001000000000000000000000000010

>>> def f():
...        pass
>>> import signal
>>> signal.signal(8, f)
0
>>> print bin(int([x for x in file("/proc/self/status").readlines() if "SigCgt" in x][0].split("\t")[1].strip(), 16))
0b110001000000000000000000010000010

Note how signal 8 had its bit flipped.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
Gerrit-Change-Number: 10177
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Comment-Date: Tue, 24 Apr 2018 20:54:54 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6740: Fix flaky test cancellation

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

Change subject: IMPALA-6740: Fix flaky test_cancellation
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/10177/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10177/2//COMMIT_MSG@25
PS2, Line 25: - I can reliably repro the problem locally by reduing the sleep time.
reducing



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
Gerrit-Change-Number: 10177
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Comment-Date: Tue, 24 Apr 2018 20:55:05 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-6740: Fix flaky test cancellation

Posted by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org>.
Thomas Tauber-Marshall has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/10177 )

Change subject: IMPALA-6740: Fix flaky test_cancellation
......................................................................

IMPALA-6740: Fix flaky test_cancellation

test_shall_commandline:test_cancellation starts an Impala shell
process, runs a query, sleeps briefly, and then cancels the query by
sending a SIGINT to the process. This has been occasionally failing
with either the error 'KeyboardInterrupt' or with the query succeeding
instead of being cancelled.

The problem occurs if the process hasn't fully started up before the
SIGINT is sent - in particular, if ImpalaShell:__init__ hasn't
installed the signal handler, which happens sometimes depending on
concurrent load on the machine. Depending on the exact timing, this
may cause a 'KeyboardInterrupt' that isn't handled, or the signal
may be ignored and the query allowed to run to completion.

The solution is to increase the time spent sleeping.

Testing:
- I can reliably repro the problem locally by reduing the sleep time.

Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
---
M tests/shell/test_shell_commandline.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/77/10177/2
-- 
To view, visit http://gerrit.cloudera.org:8080/10177
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
Gerrit-Change-Number: 10177
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>

[Impala-ASF-CR] IMPALA-6740: Fix flaky test cancellation

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10177 )

Change subject: IMPALA-6740: Fix flaky test_cancellation
......................................................................

IMPALA-6740: Fix flaky test_cancellation

test_shall_commandline:test_cancellation starts an Impala shell
process, runs a query, sleeps briefly, and then cancels the query by
sending a SIGINT to the process. This has been occasionally failing
with either the error 'KeyboardInterrupt' or with the query succeeding
instead of being cancelled.

The problem occurs if the process hasn't fully started up before the
SIGINT is sent - in particular, if ImpalaShell:__init__ hasn't
installed the signal handler, which happens sometimes depending on
concurrent load on the machine. Depending on the exact timing, this
may cause a 'KeyboardInterrupt' that isn't handled, or the signal
may be ignored and the query allowed to run to completion.

The solution is to increase the time spent sleeping.

Testing:
- I can reliably repro the problem locally by reducing the sleep time.

Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
Reviewed-on: http://gerrit.cloudera.org:8080/10177
Reviewed-by: Thomas Tauber-Marshall <tm...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M tests/shell/test_shell_commandline.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Thomas Tauber-Marshall: Looks good to me, approved
  Impala Public Jenkins: Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
Gerrit-Change-Number: 10177
Gerrit-PatchSet: 4
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>

[Impala-ASF-CR] IMPALA-6740: Fix flaky test cancellation

Posted by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org>.
Hello Philip Zeyliger, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10177

to look at the new patch set (#3).

Change subject: IMPALA-6740: Fix flaky test_cancellation
......................................................................

IMPALA-6740: Fix flaky test_cancellation

test_shall_commandline:test_cancellation starts an Impala shell
process, runs a query, sleeps briefly, and then cancels the query by
sending a SIGINT to the process. This has been occasionally failing
with either the error 'KeyboardInterrupt' or with the query succeeding
instead of being cancelled.

The problem occurs if the process hasn't fully started up before the
SIGINT is sent - in particular, if ImpalaShell:__init__ hasn't
installed the signal handler, which happens sometimes depending on
concurrent load on the machine. Depending on the exact timing, this
may cause a 'KeyboardInterrupt' that isn't handled, or the signal
may be ignored and the query allowed to run to completion.

The solution is to increase the time spent sleeping.

Testing:
- I can reliably repro the problem locally by reducing the sleep time.

Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
---
M tests/shell/test_shell_commandline.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/77/10177/3
-- 
To view, visit http://gerrit.cloudera.org:8080/10177
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
Gerrit-Change-Number: 10177
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>

[Impala-ASF-CR] IMPALA-6740: Fix flaky test cancellation

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/10177 )

Change subject: IMPALA-6740: Fix flaky test_cancellation
......................................................................


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/2355/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
Gerrit-Change-Number: 10177
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Comment-Date: Tue, 24 Apr 2018 21:17:43 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6740: Fix flaky test cancellation

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/10177 )

Change subject: IMPALA-6740: Fix flaky test_cancellation
......................................................................


Patch Set 3: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d13de6207807e4ba2e2e406a29d670f01d6c3a0
Gerrit-Change-Number: 10177
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Comment-Date: Wed, 25 Apr 2018 01:25:32 +0000
Gerrit-HasComments: No