Skip to content

[#937] Capture output of DSE ALL DUMP ALL in %YDBPROCSTUCKEXEC output

K.S. Bhaskar requested to merge ksbhaskar/YDB:YDB937 into master

%YDBPROCSTUCKEXEC launches DSE ALL DUMP ALL in a JOB'd process to capture the file header output, since it can have important troubleshooting information. Since DSE startup can hang for up to 96 seconds/region, this is in a JOB'd process. The output of %YDBPROCSTUCKEXEC includes the stdout and stderr of the JOB'd process. Also, it logs its invocation and output file location in the syslog.

  • Move output from $ydb_log to $ydb_tmp since $ydb_log is documented as not used any more
  • Log message in syslog about this invocation of %YDBPROCSTUCKEXEC
  • Other responses to review comments
    • Change output file name
    • Don't check /proc/sys/kernel/yama/ptrace_scope since Yama is just one type of layered security
    • Improvements and corrections to comments
    • Remove race conditions if /proc//{cmdline,environ} disappear (e.g., if blocking process terminates while script is running)
  • Change local variable "tmp" to "retcode"
  • Minor formatting cleanup & minor typo correction
Edited by K.S. Bhaskar

Merge request reports