You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2022/06/26 06:13:00 UTC

[jira] [Updated] (IMPALA-11275) Dump thread debug information when crashing/generating a minidump

     [ https://issues.apache.org/jira/browse/IMPALA-11275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Quanlong Huang updated IMPALA-11275:
------------------------------------
    Epic Link: IMPALA-6698

> Dump thread debug information when crashing/generating a minidump
> -----------------------------------------------------------------
>
>                 Key: IMPALA-11275
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11275
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>    Affects Versions: Impala 4.1.0
>            Reporter: Joe McDonnell
>            Assignee: Michael Smith
>            Priority: Major
>             Fix For: Impala 4.2.0
>
>
> When Impala crashes and generates a minidump, it is useful to know what query the thread was executing when it crashed. There is already some information stored on the stack in the ThreadDebugInfo, but stack resolution does not always work (e.g. if in codegen code). It would be useful to dump the thread information to stdout/stderr when generating the minidump. This could accompany the "Wrote minidump to..." message generated here:
> {noformat}
> static bool DumpCallback(const google_breakpad::MinidumpDescriptor& descriptor,
>     void* context, bool succeeded) {
>   // See if a file was written successfully.
>   if (succeeded) {
>     // Write message to stdout/stderr, which will usually be captured in the INFO/ERROR
>     // log.
>     const char msg[] = "Wrote minidump to ";
>     const int msg_len = sizeof(msg) / sizeof(msg[0]) - 1;
>     const char* path = descriptor.path();
>     // We use breakpad's reimplementation of strlen to avoid calling into libc.
>     const int path_len = my_strlen(path);
>     // We use the linux syscall support methods from chromium here as per the
>     // recommendation of the breakpad docs to avoid calling into other shared libraries.
>     sys_write(STDOUT_FILENO, msg, msg_len);
>     sys_write(STDOUT_FILENO, path, path_len);
>     sys_write(STDOUT_FILENO, "\n", 1);
>     sys_write(STDERR_FILENO, msg, msg_len);
>     sys_write(STDERR_FILENO, path, path_len);
>     sys_write(STDERR_FILENO, "\n", 1);
>   }
>   // Return the value received in the call as described in the minidump documentation. If
>   // this values is true, then no other handlers will be called. Breakpad will still crash
>   // the process.
>   return succeeded;
> }
> {noformat}
> [https://github.com/apache/impala/blob/master/be/src/util/minidump.cc#L73]
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org