Todd Lipcon has submitted this change and it was merged. ( )

Change subject: KUDU-2297 (part 4): periodically dump stacks to diagnostics log

KUDU-2297 (part 4): periodically dump stacks to diagnostics log

This modifies the diagnostics log to periodically dump stack traces.
This is slightly complicated by the fact that symbolized stack traces
can be relatively large. So, we separate the logging of symbols and
stack traces. When an address first appears in a log file, it is logged
as part of a symbol line. Later logs of the same address do not need
to re-log the symbol.

With this, a typical stack trace dump of an idle tserver is about 4KB
pre-compression, and a 'symbols' dump is about 6KB. So logging stacks
reasonably often should not use much disk space or IO.

Currently this is enabled on the same interval as the metrics log, but
only if a new experimental flag --diagnostics-log-stack-traces is
enabled. I'm planning to move it to a different flag in a later commit,
but wanted to keep this one simple and incremental.

Change-Id: Ic32abf2c48ac6a5f3c384e58838b34671bcaf147
Tested-by: Todd Lipcon <>
Reviewed-by: Mike Percy <>
M src/kudu/server/
M src/kudu/server/diagnostics_log.h
M src/kudu/util/
M src/kudu/util/debug-util.h
M src/kudu/util/
M src/kudu/util/
M src/kudu/util/rolling_log.h
7 files changed, 235 insertions(+), 41 deletions(-)

  Todd Lipcon: Verified
  Mike Percy: Looks good to me, approved

To view, visit
To unsubscribe, visit

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic32abf2c48ac6a5f3c384e58838b34671bcaf147
Gerrit-Change-Number: 9330
Gerrit-PatchSet: 10
Gerrit-Owner: Todd Lipcon <>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <>
Gerrit-Reviewer: Will Berkeley <>

Reply via email to