impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zoltan Borok-Nagy (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3703: Store query context in thread-local variables
Date Thu, 07 Dec 2017 16:51:55 GMT
Hello Lars Volker, Philip Zeyliger, Tim Armstrong, Dan Hecht, 

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

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

Change subject: IMPALA-3703: Store query context in thread-local variables

IMPALA-3703: Store query context in thread-local variables

This commit introduces the ThreadDebugInfo class which can
hold information about the current thread that can be useful
in debug sessions. It needs to be allocated on the stack in
order to include it to minidumps.

Currently a ThreadDebugInfo object is created in
Thread::SuperviseThread. This object is available in all
the child stack frames through the global function

ThreadDebugInfo has members for the thread name and instance
id. These are fixed size char buffers. ThreadDebugInfo also
has a member called text, which is a char buffer that holds
lines of strings. New data can be appended to the buffer by
calling AddExtraInfo(line).

If you have a fully-fledged core file, you can locate the
ThreadDebugInfo for the current thread through the global
pointer impala::thread_debug_info.

In a core file that has been created from a minidump, we need
to select the stack frame that allocated the ThreadDebugInfo
object in order to inspect it. It is currently allocated in

We can use printf in gdb to print the members, e.g.:
printf "%s" thread_debug_info.text
printf "%s\n" thread_debug_info.instance_id

Currently the thread category, thread name, and instance id
is stored.

I created some tests in

Change-Id: I566f7f1db5117c498e86e0bd05b33bdcff624609
M be/src/common/CMakeLists.txt
A be/src/common/
A be/src/common/
A be/src/common/thread-debug-info.h
M be/src/exec/
M be/src/exec/
M be/src/runtime/
M be/src/runtime/
M be/src/util/
9 files changed, 305 insertions(+), 2 deletions(-)

  git pull ssh:// refs/changes/21/8621/5
To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I566f7f1db5117c498e86e0bd05b33bdcff624609
Gerrit-Change-Number: 8621
Gerrit-PatchSet: 5
Gerrit-Owner: Zoltan Borok-Nagy <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Lars Volker <>
Gerrit-Reviewer: Philip Zeyliger <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-Reviewer: Zoltan Borok-Nagy <>

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message