diff --git a/satyr-0.14-vdso_mmap.patch b/satyr-0.14-vdso_mmap.patch new file mode 100644 index 0000000..b818f26 --- /dev/null +++ b/satyr-0.14-vdso_mmap.patch @@ -0,0 +1,26 @@ +commit 2543c337e633fefe55c123b2f375a47fda8a884d +Author: Martin Milata +Date: Wed Aug 13 17:54:44 2014 +0200 + + unwind: fix unwinding of VDSO frames on i386 + + May or may not be elfutils bug: + https://bugzilla.redhat.com/show_bug.cgi?id=1129756 + + Fixes #163. + + Signed-off-by: Martin Milata + +diff --git a/lib/core_unwind.c b/lib/core_unwind.c +index 4731402..53af092 100644 +--- a/lib/core_unwind.c ++++ b/lib/core_unwind.c +@@ -110,7 +110,7 @@ find_elf_core (Dwfl_Module *mod, void **userdata, const char *modname, + return -1; + + *file_name = realpath(executable_file, NULL); +- *elfp = elf_begin(fd, ELF_C_READ, NULL); ++ *elfp = elf_begin(fd, ELF_C_READ_MMAP, NULL); + if (*elfp == NULL) + { + warn("Unable to open executable '%s': %s", executable_file, diff --git a/satyr-0.14-vsyscall_file_name.patch b/satyr-0.14-vsyscall_file_name.patch new file mode 100644 index 0000000..796e6bd --- /dev/null +++ b/satyr-0.14-vsyscall_file_name.patch @@ -0,0 +1,62 @@ +commit bbf0399b0e80d8922df01cffb5a5ae921de61d98 +Author: Jakub Filak +Date: Fri May 16 13:50:22 2014 +0200 + + Fulfill missing values in core/frames + + File name of __kernel_vsyscall function frame cannot be resolved but we + known that the function comes from kernel. + + The frame often appears in backtraces of sleep. + + Signed-off-by: Jakub Filak + +diff --git a/lib/abrt.c b/lib/abrt.c +index 39bc45d..ed33800 100644 +--- a/lib/abrt.c ++++ b/lib/abrt.c +@@ -24,6 +24,8 @@ + #include "operating_system.h" + #include "core/unwind.h" + #include "core/stacktrace.h" ++#include "core/thread.h" ++#include "core/frame.h" + #include "core/fingerprint.h" + #include "python/stacktrace.h" + #include "koops/stacktrace.h" +@@ -62,6 +64,26 @@ sr_abrt_print_report_from_dir(const char *directory, + return true; + } + ++static void ++fulfill_missing_values(struct sr_core_stacktrace *core_stacktrace) ++{ ++ struct sr_core_thread *thread = core_stacktrace->threads; ++ while (thread) ++ { ++ struct sr_core_frame *frame = thread->frames; ++ while (frame) ++ { ++ if (!frame->file_name && frame->function_name ++ && strcmp("__kernel_vsyscall", frame->function_name) == 0) ++ { ++ frame->file_name = sr_strdup("kernel"); ++ } ++ frame = frame->next; ++ } ++ thread = thread->next; ++ } ++} ++ + static bool + create_core_stacktrace(const char *directory, const char *gdb_output, + bool hash_fingerprints, char **error_message) +@@ -87,6 +109,8 @@ create_core_stacktrace(const char *directory, const char *gdb_output, + if (!core_stacktrace) + return false; + ++ fulfill_missing_values(core_stacktrace); ++ + #if 0 + sr_core_fingerprint_generate(core_stacktrace, + error_message); diff --git a/satyr.spec b/satyr.spec index 3c03590..33523d4 100644 --- a/satyr.spec +++ b/satyr.spec @@ -19,7 +19,7 @@ Name: satyr Version: 0.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tools to create anonymous, machine-friendly problem reports Group: System Environment/Libraries License: GPLv2+ @@ -39,6 +39,8 @@ BuildRequires: python-sphinx %endif Patch0: satyr-0.14-wformat.patch +Patch1: satyr-0.14-vdso_mmap.patch +Patch2: satyr-0.14-vsyscall_file_name.patch %description Satyr is a library that can be used to create and process microreports. @@ -68,6 +70,8 @@ Python bindings for %{name}. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build %configure \ @@ -110,6 +114,9 @@ make check %endif %changelog +* Wed Aug 13 2014 Martin Milata 0.14-2 +- Fix unwinding of stacktraces containing VDSO frame + * Tue Jun 10 2014 Martin Milata 0.14-1 - New upstream version - Ported to elfutils-0.158 unwinder API