Just to be sure. satyr should always find a crash thread.
Related to rhbz#997076
Signed-off-by: Jakub Filak <jfilak(a)redhat.com>
---
src/daemon/abrt-handle-event.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/daemon/abrt-handle-event.c b/src/daemon/abrt-handle-event.c
index 73e53f7..ff1232e 100644
--- a/src/daemon/abrt-handle-event.c
+++ b/src/daemon/abrt-handle-event.c
@@ -33,6 +33,8 @@ static struct sr_stacktrace *corebt = NULL;
static char *analyzer = NULL;
static char *crash_dump_dup_name = NULL;
+static void dup_corebt_fini(void);
+
static char* load_backtrace(const struct dump_dir *dd)
{
const char *filename = FILENAME_BACKTRACE;
@@ -48,6 +50,15 @@ static char* load_backtrace(const struct dump_dir *dd)
static int core_backtrace_is_duplicate(struct sr_stacktrace *bt1,
const char *bt2_text)
{
+ struct sr_thread *thread1 = sr_stacktrace_find_crash_thread(bt1);
+
+ if (thread1 == NULL)
+ {
+ VERB1 log("New stacktrace has no crash thread, disabling core stacktrace
deduplicate");
+ dup_corebt_fini();
+ return 0;
+ }
+
int result;
char *error_message;
struct sr_stacktrace *bt2 =
sr_stacktrace_parse(sr_abrt_type_from_analyzer(analyzer),
@@ -59,9 +70,15 @@ static int core_backtrace_is_duplicate(struct sr_stacktrace *bt1,
return 0;
}
- struct sr_thread *thread1 = sr_stacktrace_find_crash_thread(bt1);
struct sr_thread *thread2 = sr_stacktrace_find_crash_thread(bt2);
+ if (thread2 == NULL)
+ {
+ VERB1 log("Failed to get crash thread, considering it not duplicate");
+ result = 0;
+ goto end;
+ }
+
int length2 = sr_thread_frame_count(thread2);
if (length2 <= 0)
--
1.8.3.1
Show replies by date
The previous version of satyr was generating core_bactkraces without
crash thread marker.
Related to rhbz#997076
Signed-off-by: Jakub Filak <jfilak(a)redhat.com>
---
abrt.spec.in | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/abrt.spec.in b/abrt.spec.in
index 5f646e5..cb73644 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -414,6 +414,23 @@ getent group abrt >/dev/null || groupadd -f -g %{abrt_gid_uid}
--system abrt
getent passwd abrt >/dev/null || useradd --system -g abrt -u %{abrt_gid_uid} -d
/etc/abrt -s /sbin/nologin abrt
exit 0
+%pre addon-ccpp
+# Regenerate core_bactraces because of missing crash threads
+if [ "$1" -eq 2 ]
+then
+ if [ -x /usr/bin/abrt-action-generate-core-backtrace ]
+ then
+ for DD in `find "/var/tmp/abrt" -maxdepth 1 -type d`
+ do
+ if test -f "$DD/analyzer" && grep -q "^CCpp$"
"$DD/analyzer"
+ then
+ /usr/bin/abrt-action-generate-core-backtrace -d "$DD" --
>/dev/null 2>&1
+ fi
+ done
+ fi
+fi
+exit 0
+
%post
# $1 == 1 if install; 2 if upgrade
%systemd_post abrtd.service
--
1.8.3.1
Just to be sure. satyr should always find a crash thread.
Related to rhbz#997076
Signed-off-by: Jakub Filak <jfilak(a)redhat.com>
---
src/daemon/abrt-handle-event.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/daemon/abrt-handle-event.c b/src/daemon/abrt-handle-event.c
index 73e53f7..ff1232e 100644
--- a/src/daemon/abrt-handle-event.c
+++ b/src/daemon/abrt-handle-event.c
@@ -33,6 +33,8 @@ static struct sr_stacktrace *corebt = NULL;
static char *analyzer = NULL;
static char *crash_dump_dup_name = NULL;
+static void dup_corebt_fini(void);
+
static char* load_backtrace(const struct dump_dir *dd)
{
const char *filename = FILENAME_BACKTRACE;
@@ -48,6 +50,15 @@ static char* load_backtrace(const struct dump_dir *dd)
static int core_backtrace_is_duplicate(struct sr_stacktrace *bt1,
const char *bt2_text)
{
+ struct sr_thread *thread1 = sr_stacktrace_find_crash_thread(bt1);
+
+ if (thread1 == NULL)
+ {
+ VERB1 log("New stacktrace has no crash thread, disabling core stacktrace
deduplicate");
+ dup_corebt_fini();
+ return 0;
+ }
+
int result;
char *error_message;
struct sr_stacktrace *bt2 =
sr_stacktrace_parse(sr_abrt_type_from_analyzer(analyzer),
@@ -59,9 +70,15 @@ static int core_backtrace_is_duplicate(struct sr_stacktrace *bt1,
return 0;
}
- struct sr_thread *thread1 = sr_stacktrace_find_crash_thread(bt1);
struct sr_thread *thread2 = sr_stacktrace_find_crash_thread(bt2);
+ if (thread2 == NULL)
+ {
+ VERB1 log("Failed to get crash thread, considering it not duplicate");
+ result = 0;
+ goto end;
+ }
+
int length2 = sr_thread_frame_count(thread2);
if (length2 <= 0)
--
1.8.3.1
The previous version of satyr was generating core_bactkraces without
crash thread marker.
Related to rhbz#997076
Signed-off-by: Jakub Filak <jfilak(a)redhat.com>
---
abrt.spec.in | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/abrt.spec.in b/abrt.spec.in
index 66b9b20..4e5ec02 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -516,6 +516,16 @@ service abrtd condrestart >/dev/null 2>&1 || :
%posttrans addon-ccpp
service abrt-ccpp condrestart >/dev/null 2>&1 || :
+# Regenerate core_bactraces because of missing crash threads
+abrtdir=$(grep "DumpLocation" /etc/abrt/abrt.conf | cut -d'=' -f2 | tr
-d ' ')
+if test -d "$abrtdir"; then
+ for DD in `find "$abrtdir" -maxdepth 1 -type d`
+ do
+ if test -f "$DD/analyzer" && grep -q "^CCpp$"
"$DD/analyzer"; then
+ /usr/bin/abrt-action-generate-core-backtrace -d "$DD" --
>/dev/null 2>&1
+ fi
+ done
+fi
%posttrans addon-kerneloops
service abrt-oops condrestart >/dev/null 2>&1 || :
--
1.8.3.1