[systemd-devel] [PATCH] coredump: display libdw fail string on stack trace fail

Umut Tezduyar Lindskog umut.tezduyar at axis.com
Tue Jul 8 07:16:14 PDT 2014


- systemd[1]: hello.service: main process exited, code= \
  dumped, status=3/QUIT
- systemd-coredump[2541]: Failed to generate stack trac \
  e: Unwinding not supported for this architecture
- systemd-coredump[2541]: Process 1024 (hello) of user  \
  154 dumped core.
---
 src/journal/coredump.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/journal/coredump.c b/src/journal/coredump.c
index 59c6d4b..061e1dd 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -692,6 +692,8 @@ int main(int argc, char* argv[]) {
                 r = coredump_make_stack_trace(coredump_fd, exe, &stacktrace);
                 if (r >= 0)
                         core_message = strjoin("MESSAGE=Process ", info[INFO_PID], " (", comm, ") of user ", info[INFO_UID], " dumped core.\n\n", stacktrace, NULL);
+                else if (r == -EINVAL)
+                        log_warning("Failed to generate stack trace: %s", dwfl_errmsg(dwfl_errno()));
                 else
                         log_warning("Failed to generate stack trace: %s", strerror(-r));
         }
-- 
1.7.10.4



More information about the systemd-devel mailing list