You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Zoram Thanga (Code Review)" <ge...@cloudera.org> on 2018/08/29 22:06:56 UTC

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

Zoram Thanga has uploaded this change for review. ( http://gerrit.cloudera.org:8080/11352


Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................

IMPALA-7508: Add Impala Python GDB module

This patch adds a new Impala Python GDB module, and implements
a couple of covenience commands to make core dump analysis
easier.

The initial commands let us find queries and fragment instances
currently executing in an impalad at the time the daemon crashes:

(gdb) source impala-gdb.py
(gdb) find-query-ids
f74c863dff66a34d:1d983cc300000000
364525e12495932b:73f5dd0200000000
bc4a3eec25481981:edda04b800000000

(gdb) find-fragment-instances
Fragment Instance Id    Thread IDs

364525e12495932b:73f5dd02000000a2       [69]
364525e12495932b:73f5dd0200000171       [196, 136]
bc4a3eec25481981:edda04b8000001a8       [252, 237, 206]
f74c863dff66a34d:1d983cc30000009b       [200, 14, 13, 12, 6, 5, 3, 2]
f74c863dff66a34d:1d983cc30000013a       [4]

The commands have only been tested with Impala 2.12, and are not
expected to work with older versions since it uses ThreadDebugInfo
stuff from IMPALA-6416.

It is hoped that people contribute more commands to the module.

Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
---
A infra/gdb/impala-gdb.py
1 file changed, 101 insertions(+), 0 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 1
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 3: Code-Review+2

Thanks!


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 3
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Thu, 30 Aug 2018 22:31:57 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 4:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/555/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 4
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Fri, 31 Aug 2018 17:29:15 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 4: Code-Review+2

Carrying Phil's +2 from before the addition of the rat_exclude_files.txt.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 4
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Fri, 31 Aug 2018 19:38:55 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 5: Code-Review+2


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 5
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Sat, 01 Sep 2018 00:34:36 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 5:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/3106/ DRY_RUN=false


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 5
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Sat, 01 Sep 2018 00:34:37 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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/11352 )

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................

IMPALA-7508: Add Impala Python GDB module

This patch adds a new Impala Python GDB module, and implements
a couple of covenience commands to make core dump analysis
easier.

The initial commands let us find queries and fragment instances
currently executing in an impalad at the time the daemon crashed:

(gdb) source impala-gdb.py
(gdb) find-query-ids
f74c863dff66a34d:1d983cc300000000
364525e12495932b:73f5dd0200000000
bc4a3eec25481981:edda04b800000000

(gdb) find-fragment-instances
Fragment Instance Id    Thread IDs

364525e12495932b:73f5dd02000000a2       [69]
364525e12495932b:73f5dd0200000171       [196, 136]
bc4a3eec25481981:edda04b8000001a8       [252, 237, 206]
f74c863dff66a34d:1d983cc30000009b       [200, 14, 13, 12, 6, 5, 3, 2]
f74c863dff66a34d:1d983cc30000013a       [4]

The commands have only been tested with Impala 2.12, and are not
expected to work with older versions since it uses ThreadDebugInfo
stuff from IMPALA-6416.

It is hoped that people contribute more commands to the module.

Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Reviewed-on: http://gerrit.cloudera.org:8080/11352
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M bin/rat_exclude_files.txt
A lib/python/impala_py_lib/gdb/README.md
A lib/python/impala_py_lib/gdb/impala-gdb.py
3 files changed, 143 insertions(+), 0 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 6
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/527/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 1
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Aug 2018 22:49:32 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 1:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py
File infra/gdb/impala-gdb.py:

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@29
PS1, Line 29:     # Walk the threadlist to find fragment instance ids. Assumes IMPALA-6416, so
Use triple " for docstring.


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@34
PS1, Line 34:     def getFragmentInstances(self):
Python's convention is to use snake_case instead of camelCase.


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@40
PS1, Line 40: while f is not None
nit: can be simplified to while f:


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@80
PS1, Line 80:     "Find IDs of all queries this impalad is currently executing."
Use triple " for docstring.


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@95
PS1, Line 95: qid_hi + ':' + qid_low
nit: usually it's preferable to use string format instead of +



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 1
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Aug 2018 22:29:34 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 3:

Build Failed 

https://jenkins.impala.io/job/gerrit-code-review-checks/542/ : Initial code review checks failed. See linked job for details on the failure.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 3
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Thu, 30 Aug 2018 23:13:14 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/11352/2/lib/python/impala_py_lib/gdb/impala-gdb.py
File lib/python/impala_py_lib/gdb/impala-gdb.py:

http://gerrit.cloudera.org:8080/#/c/11352/2/lib/python/impala_py_lib/gdb/impala-gdb.py@30
PS2, Line 30: def get_fragment_instances():
> flake8: E302 expected 2 blank lines, found 1
Fixed.


http://gerrit.cloudera.org:8080/#/c/11352/2/lib/python/impala_py_lib/gdb/impala-gdb.py@44
PS2, Line 44: s
> flake8: F841 local variable 'symbol' is assigned to but never used
Fixed



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 2
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Thu, 30 Aug 2018 22:26:32 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 5: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 5
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Sat, 01 Sep 2018 03:54:27 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

Posted by "Zoram Thanga (Code Review)" <ge...@cloudera.org>.
Hello Fredy Wijaya, Philip Zeyliger, David Knupp, Impala Public Jenkins, 

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

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

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................

IMPALA-7508: Add Impala Python GDB module

This patch adds a new Impala Python GDB module, and implements
a couple of covenience commands to make core dump analysis
easier.

The initial commands let us find queries and fragment instances
currently executing in an impalad at the time the daemon crashed:

(gdb) source impala-gdb.py
(gdb) find-query-ids
f74c863dff66a34d:1d983cc300000000
364525e12495932b:73f5dd0200000000
bc4a3eec25481981:edda04b800000000

(gdb) find-fragment-instances
Fragment Instance Id    Thread IDs

364525e12495932b:73f5dd02000000a2       [69]
364525e12495932b:73f5dd0200000171       [196, 136]
bc4a3eec25481981:edda04b8000001a8       [252, 237, 206]
f74c863dff66a34d:1d983cc30000009b       [200, 14, 13, 12, 6, 5, 3, 2]
f74c863dff66a34d:1d983cc30000013a       [4]

The commands have only been tested with Impala 2.12, and are not
expected to work with older versions since it uses ThreadDebugInfo
stuff from IMPALA-6416.

It is hoped that people contribute more commands to the module.

Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
---
A lib/python/impala_py_lib/gdb/README.md
A lib/python/impala_py_lib/gdb/impala-gdb.py
2 files changed, 142 insertions(+), 0 deletions(-)


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 3
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/11352/2/lib/python/impala_py_lib/gdb/impala-gdb.py
File lib/python/impala_py_lib/gdb/impala-gdb.py:

http://gerrit.cloudera.org:8080/#/c/11352/2/lib/python/impala_py_lib/gdb/impala-gdb.py@30
PS2, Line 30: def get_fragment_instances():
flake8: E302 expected 2 blank lines, found 1


http://gerrit.cloudera.org:8080/#/c/11352/2/lib/python/impala_py_lib/gdb/impala-gdb.py@44
PS2, Line 44: s
flake8: F841 local variable 'symbol' is assigned to but never used



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 2
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Thu, 30 Aug 2018 22:17:48 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py
File infra/gdb/impala-gdb.py:

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@1
PS1, Line 1: #
> I feel like this file should more properly be added to:
That would be fine by me.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 1
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Aug 2018 23:15:27 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py
File infra/gdb/impala-gdb.py:

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@1
PS1, Line 1: #
I feel like this file should more properly be added to:

  $IMPALA_HOME/lib/python/impala_py_lib/gdb/

Perhaps Philz has an opinion on this?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 1
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Aug 2018 23:06:40 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

Posted by "Zoram Thanga (Code Review)" <ge...@cloudera.org>.
Hello Fredy Wijaya, Philip Zeyliger, David Knupp, Impala Public Jenkins, 

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

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

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................

IMPALA-7508: Add Impala Python GDB module

This patch adds a new Impala Python GDB module, and implements
a couple of covenience commands to make core dump analysis
easier.

The initial commands let us find queries and fragment instances
currently executing in an impalad at the time the daemon crashed:

(gdb) source impala-gdb.py
(gdb) find-query-ids
f74c863dff66a34d:1d983cc300000000
364525e12495932b:73f5dd0200000000
bc4a3eec25481981:edda04b800000000

(gdb) find-fragment-instances
Fragment Instance Id    Thread IDs

364525e12495932b:73f5dd02000000a2       [69]
364525e12495932b:73f5dd0200000171       [196, 136]
bc4a3eec25481981:edda04b8000001a8       [252, 237, 206]
f74c863dff66a34d:1d983cc30000009b       [200, 14, 13, 12, 6, 5, 3, 2]
f74c863dff66a34d:1d983cc30000013a       [4]

The commands have only been tested with Impala 2.12, and are not
expected to work with older versions since it uses ThreadDebugInfo
stuff from IMPALA-6416.

It is hoped that people contribute more commands to the module.

Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
---
M bin/rat_exclude_files.txt
A lib/python/impala_py_lib/gdb/README.md
A lib/python/impala_py_lib/gdb/impala-gdb.py
3 files changed, 143 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/52/11352/4
-- 
To view, visit http://gerrit.cloudera.org:8080/11352
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 4
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 1:

(10 comments)

Thanks for the comments. Uploading PS#2.

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py
File infra/gdb/impala-gdb.py:

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@1
PS1, Line 1: #
> I feel like this file should more properly be added to:
Done


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@1
PS1, Line 1: #
> That would be fine by me.
Done


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@22
PS1, Line 22: import gdb
> Please add a README.md in this directory or include usage here.
Added a README.md.


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@28
PS1, Line 28: class ImpalaGDB:
> I think we usually use new-style classes.
Done


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@29
PS1, Line 29:     # Walk the threadlist to find fragment instance ids. Assumes IMPALA-6416, so
> Use triple " for docstring.
I meant this as a comment, not a doc string. Leaving is as is.


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@34
PS1, Line 34:     def getFragmentInstances(self):
> Python's convention is to use snake_case instead of camelCase.
Done


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@40
PS1, Line 40: while f is not None
> nit: can be simplified to while f:
Done


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@62
PS1, Line 62: class FindFragmentInstances(gdb.Command, ImpalaGDB):
            :     "Find all query fragment instance to thread Id mappings in this impalad."
            : 
            :     def __init__(self):
            :         super(FindFragmentInstances, self).__init__(
> multiple-inheritance and inheritance in general seem unnecessary here.
Thanks! I wasn't happy with the inheritance either. Made get_fragment_instances() a free function.


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@80
PS1, Line 80:     "Find IDs of all queries this impalad is currently executing."
> Use triple " for docstring.
Done


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@95
PS1, Line 95: qid_hi + ':' + qid_low
> nit: usually it's preferable to use string format instead of +
Done



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 1
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Thu, 30 Aug 2018 22:11:07 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

Posted by "Zoram Thanga (Code Review)" <ge...@cloudera.org>.
Hello Fredy Wijaya, Philip Zeyliger, David Knupp, Impala Public Jenkins, 

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

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

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................

IMPALA-7508: Add Impala Python GDB module

This patch adds a new Impala Python GDB module, and implements
a couple of covenience commands to make core dump analysis
easier.

The initial commands let us find queries and fragment instances
currently executing in an impalad at the time the daemon crashed:

(gdb) source impala-gdb.py
(gdb) find-query-ids
f74c863dff66a34d:1d983cc300000000
364525e12495932b:73f5dd0200000000
bc4a3eec25481981:edda04b800000000

(gdb) find-fragment-instances
Fragment Instance Id    Thread IDs

364525e12495932b:73f5dd02000000a2       [69]
364525e12495932b:73f5dd0200000171       [196, 136]
bc4a3eec25481981:edda04b8000001a8       [252, 237, 206]
f74c863dff66a34d:1d983cc30000009b       [200, 14, 13, 12, 6, 5, 3, 2]
f74c863dff66a34d:1d983cc30000013a       [4]

The commands have only been tested with Impala 2.12, and are not
expected to work with older versions since it uses ThreadDebugInfo
stuff from IMPALA-6416.

It is hoped that people contribute more commands to the module.

Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
---
A lib/python/impala_py_lib/gdb/README.md
A lib/python/impala_py_lib/gdb/impala-gdb.py
2 files changed, 140 insertions(+), 0 deletions(-)


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 2
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 2:

Build Failed 

https://jenkins.impala.io/job/gerrit-code-review-checks/540/ : Initial code review checks failed. See linked job for details on the failure.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 2
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com>
Gerrit-Comment-Date: Thu, 30 Aug 2018 22:48:10 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py
File infra/gdb/impala-gdb.py:

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@96
PS1, Line 96: *
flake8: E999 SyntaxError: invalid syntax



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 1
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Aug 2018 22:08:45 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-7508: Add Impala Python GDB module

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

Change subject: IMPALA-7508: Add Impala Python GDB module
......................................................................


Patch Set 1:

(3 comments)

Thanks for contributing this. Seems great to share this kind of thing, and also to have examples.

I don't have much experience organizing these things, but the inheritance structure seems strange. I'd prefer not having inheritance and just composing your way into the common code. If you do have inheritance, you can avoid multiple-inheritance by having the superclass inherit from gdb.Command.

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py
File infra/gdb/impala-gdb.py:

http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@22
PS1, Line 22: import gdb
Please add a README.md in this directory or include usage here.


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@28
PS1, Line 28: class ImpalaGDB:
I think we usually use new-style classes.

class ImpalaGDB(object):
  ...


http://gerrit.cloudera.org:8080/#/c/11352/1/infra/gdb/impala-gdb.py@62
PS1, Line 62: class FindFragmentInstances(gdb.Command, ImpalaGDB):
            :     "Find all query fragment instance to thread Id mappings in this impalad."
            : 
            :     def __init__(self):
            :         super(FindFragmentInstances, self).__init__(
multiple-inheritance and inheritance in general seem unnecessary here.

You could replace the class ImpalaGDB with:

instances = get_fragment_instances(gdb)

And then use that in your wrapper gdb Commands.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I24e7026f2265954ed592d6f62110cf8cb2c2202a
Gerrit-Change-Number: 11352
Gerrit-PatchSet: 1
Gerrit-Owner: Zoram Thanga <zo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Aug 2018 22:16:02 +0000
Gerrit-HasComments: Yes