Joe McDonnell has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18508 )

Change subject: IMPALA-11275: log thread info during minidump
......................................................................


Patch Set 3:

(6 comments)

This is looking great. I only have a few nits here and there. It's great to see 
all the tests.

http://gerrit.cloudera.org:8080/#/c/18508/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/18508/3//COMMIT_MSG@9
PS3, Line 9: Writes ThreadDebugInfo to stdout/stderr when a minidump is 
generated to
           : capture thread and query details related to the dump.
Nit: Can you add an example output as part of this commit message?


http://gerrit.cloudera.org:8080/#/c/18508/3/be/src/util/debug-util.h
File be/src/util/debug-util.h:

http://gerrit.cloudera.org:8080/#/c/18508/3/be/src/util/debug-util.h@95
PS3, Line 95: /// Converts id to a string representation without using any 
shared library calls.
Nit: Could we add a sentence saying this follows Breakpad's guidance for 
compromised contexts? Maybe point to where to get more info (Breakpad's 
client/linux/minidump-writer.cc).


http://gerrit.cloudera.org:8080/#/c/18508/3/be/src/util/minidump-test.cc
File be/src/util/minidump-test.cc:

http://gerrit.cloudera.org:8080/#/c/18508/3/be/src/util/minidump-test.cc@55
PS3, Line 55:   testing::internal::CaptureStdout();
            :   testing::internal::CaptureStderr();
In theory, googletest could eventually change this / lock this down, but for 
now this does exactly what we need. I think that is reasonable to use.


http://gerrit.cloudera.org:8080/#/c/18508/3/be/src/util/minidump-test.cc@58
PS3, Line 58: ThreadDebugInfo tdi;
One option you have is to set the query id / fragment id / thread name to your 
own custom values.


http://gerrit.cloudera.org:8080/#/c/18508/3/be/src/util/minidump.cc
File be/src/util/minidump.cc:

http://gerrit.cloudera.org:8080/#/c/18508/3/be/src/util/minidump.cc@84
PS3, Line 84:   constexpr char instance_msg[] = " on instance ";
Nit: Small language change I would like.
Minidump in thread [thread_id] $thread_name running query $query_id on instance 
$instance_id

A fragment instance is a piece of the query, so I would like to avoid saying 
"on". Something like:
Minidump in thread [thread_id] $thread_name running query $query_id, fragment 
instance $instance_id


http://gerrit.cloudera.org:8080/#/c/18508/3/be/src/util/minidump.cc@90
PS3, Line 90: sys_write(fd, thread_msg, sizeof(thread_msg) / 
sizeof(thread_msg[0]) - 1);
            :   sys_write(fd, "[", 1);
            :   sys_write(fd, thread_id_str, thread_id_len);
            :   sys_write(fd, "]", 1);
            :   sys_write(fd, thread_name, my_strlen(thread_name));
            :   sys_write(fd, query_msg, sizeof(query_msg) / 
sizeof(query_msg[0]) - 1);
            :   sys_write(fd, query_id_str, TUniqueIdBufferSize);
            :   sys_write(fd, instance_msg, sizeof(instance_msg) / 
sizeof(instance_msg[0]) - 1);
            :   sys_write(fd, instance_id_str, TUniqueIdBufferSize);
            :   sys_write(fd, "\n", 1);
Can we add a comment just before this with a one-liner showing the full message?
Minidump in thread [$thread_id] $thread_name running query $query_id etc etc



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iea2bdf10db29a0f8ccbe5e767b708781d42a9b8a
Gerrit-Change-Number: 18508
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Comment-Date: Thu, 12 May 2022 19:47:25 +0000
Gerrit-HasComments: Yes

Reply via email to