[Automatic Bug Reporting Tool - ABRT] #878: abrtd doesn't update problem's occurence counter
by fedora-badges
#878: abrtd doesn't update problem's occurence counter
--------------------+------------------------------
Reporter: jfilak | Owner: crash-catcher@…
Type: defect | Status: new
Priority: major | Milestone:
Component: abrt | Version:
Keywords: | Blocked By:
Blocking: |
--------------------+------------------------------
This commit f8e673981bdd93b24ffe6251f4069b86aeb24f1a accidently breakes
counter updating.
File src/daemon/abrtd.c
{{{
...
if (WIFSIGNALED(status))
{
log("'post-create' on '%s' killed by signal %d",
- dump_dir_name, WTERMSIG(status));
- return MW_ERROR;
+ state->dirname, WTERMSIG(status));
}
/* else: it is WIFEXITED(status) */
- if (!dup_of_dir)
+ else if (!state->dup_of_dir)
{
log("'post-create' on '%s' exited with %d",
- dump_dir_name, WEXITSTATUS(status));
- return MW_ERROR;
+ state->dirname, WEXITSTATUS(status));
}
- dump_dir_name = dup_of_dir;
+ goto delete_bad_dir;
}
...
}}}
--
Ticket URL: <https://fedorahosted.org/abrt/ticket/878>
Automatic Bug Reporting Tool - ABRT <http://fedorahoted.org/abrt/>
Automatic bug reporting tool
11 years, 6 months
[PATCH] improve xorg post-create
by Denys Vlasenko
This is intended to close https://fedorahosted.org/abrt/ticket/838
diff -x '*.po' -d -urpN abrt.1/abrt.spec.in abrt.2/abrt.spec.in
--- abrt.1/abrt.spec.in 2012-11-19 14:14:45.000000000 +0100
+++ abrt.2/abrt.spec.in 2012-11-22 14:09:43.174549825 +0100
@@ -468,8 +468,10 @@ gtk-update-icon-cache %{_datadir}/icons/
%{_bindir}/abrt-handle-upload
%{_bindir}/abrt-action-save-package-data
%{_bindir}/abrt-watch-log
+%{_bindir}/abrt-action-analyze-xorg
%config(noreplace) %{_sysconfdir}/%{name}/abrt.conf
%config(noreplace) %{_sysconfdir}/%{name}/abrt-action-save-package-data.conf
+%config(noreplace) %{_sysconfdir}/%{name}/xorg.conf
%config(noreplace) %{_sysconfdir}/%{name}/gpg_keys
%config(noreplace) %{_sysconfdir}/libreport/events.d/abrt_event.conf
%config(noreplace) %{_sysconfdir}/libreport/events.d/smart_event.conf
diff -x '*.po' -d -urpN abrt.1/src/plugins/abrt-action-analyze-xorg abrt.2/src/plugins/abrt-action-analyze-xorg
--- abrt.1/src/plugins/abrt-action-analyze-xorg 1970-01-01 01:00:00.000000000 +0100
+++ abrt.2/src/plugins/abrt-action-analyze-xorg 2012-11-22 14:04:40.237666201 +0100
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+test "`cat analyzer`" = "xorg" ||
+{
+ echo "Current directory is not an Xorg problem directory"
+ exit 1
+}
+
+test -f backtrace ||
+{
+ echo "File 'backtrace' not found in current directory"
+ exit 1
+}
+
+# Blacklist known binary-only modules:
+test -f /etc/abrt/xorg.conf &&
+{
+ # Find "BlacklistedXorgModules = mod, mod..." directive and split it on commas
+ { cat /etc/abrt/xorg.conf; echo; } \
+ | sed -n 's/^BlacklistedXorgModules[ \t]*=//p' \
+ | sed 's/,/\n/g' \
+ | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' \
+ | while read bad_mod; do
+ grep -F -e "/$bad_mod" backtrace || continue
+ echo "Module '$bad_mod' was loaded - not saving the crash" >not_reportable
+ exit 2
+ done
+ # here we have $? = 1, not 0! ("read bad_mod" failed)
+}
+test $? = 2 && exit 0
+
+# Generate duplicate detection hashes.
+# To err on the "flag it as a dup" side is way better than the opposite.
+# To this end:
+# - sanitize whitespace
+# - remove N: prefix
+# - remove path: we don't care whether it's /usr/lib64/foo or /lib/foo
+# - remove VERSION from so.VERSION
+# - drop main() invocation
+# - replace all hex constants with string "0xZ".
+# - drop adjacent duplicate lines
+sed \
+ -e 's/[ \t][ \t]*/ /g' -e 's/ *$//' \
+ -e 's/^[0-9][0-9]*: //' \
+ -e 's@^/[^ ]*/@@' \
+ -e 's/\.so\.[0-9][0-9]*/.so/' \
+ -e '/libc_start_main/d' \
+ -e 's/0x[0-9a-fA-F][0-9a-fA-F]*/0xZ/g' \
+ backtrace \
+| uniq \
+| sha1sum | sed 's/[ \t].*//' >uuid
+test -f uuid && cp uuid duphash
diff -x '*.po' -d -urpN abrt.1/src/plugins/Makefile.am abrt.2/src/plugins/Makefile.am
--- abrt.1/src/plugins/Makefile.am 2012-10-02 16:02:16.000000000 +0200
+++ abrt.2/src/plugins/Makefile.am 2012-11-22 13:54:25.539442960 +0100
@@ -4,6 +4,7 @@ bin_SCRIPTS = \
abrt-action-install-debuginfo \
abrt-action-analyze-core \
abrt-action-analyze-vmcore \
+ abrt-action-analyze-xorg \
abrt-action-list-dsos \
abrt-action-perform-ccpp-analysis \
abrt-action-save-kernel-data
@@ -81,6 +82,10 @@ EXTRA_DIST = \
https-utils.h \
post_report.xml.in
+confdir = $(CONF_DIR)
+dist_conf_DATA = \
+ xorg.conf
+
abrt_watch_log_SOURCES = \
abrt-watch-log.c
abrt_watch_log_CPPFLAGS = \
diff -x '*.po' -d -urpN abrt.1/src/plugins/xorg.conf abrt.2/src/plugins/xorg.conf
--- abrt.1/src/plugins/xorg.conf 1970-01-01 01:00:00.000000000 +0100
+++ abrt.2/src/plugins/xorg.conf 2012-11-22 14:08:15.867304681 +0100
@@ -0,0 +1 @@
+BlacklistedXorgModules = nvidia_drv.so, fglrx_drv.so
diff -x '*.po' -d -urpN abrt.1/src/plugins/xorg_event.conf abrt.2/src/plugins/xorg_event.conf
--- abrt.1/src/plugins/xorg_event.conf 2012-11-14 12:09:22.000000000 +0100
+++ abrt.2/src/plugins/xorg_event.conf 2012-11-22 13:42:04.822610955 +0100
@@ -1,32 +1,8 @@
EVENT=post-create analyzer=xorg
- # Blacklist known binary-only modules:
- grep /nvidia_drv.so backtrace &&
- { echo "nvidia_drv.so was loaded - not saving the crash"; exit 1; }
- grep /fglrx_drv.so backtrace &&
- { echo "fglrx_drv.so was loaded - not saving the crash"; exit 1; }
- #
+ # Blacklist known binary-only modules.
# Generate duplicate detection hashes.
- # To err on a "flag it as a dup" side is way better than the opposite.
- # To this end:
- # - sanitize whitespace
- # - remove N: prefix
- # - remove path: we don't care whether it's /usr/lib64/foo or /lib/foo
- # - remove VERSION from so.VERSION
- # - drop main() invocation
- # - replace all hex constants with string "0xZ".
- # - drop adjacent duplicate lines
- sed \
- -e 's/[ \t][ \t]*/ /g' -e 's/ *$//' \
- -e 's/^[0-9][0-9]*: //' \
- -e 's@^/[^ ]*/@@' \
- -e 's/\.so\.[0-9][0-9]*/.so/' \
- -e '/libc_start_main/d' \
- -e 's/0x[0-9a-fA-F][0-9a-fA-F]*/0xZ/g' \
- backtrace \
- | uniq \
- | sha1sum | sed 's/[ \t].*//' >uuid
- test -f uuid && cp uuid duphash
- #
+ abrt-action-analyze-xorg
+
# Get versions of binaries listed in Xorg backtrace
cat backtrace | cut -f2 -d" " | xargs rpm -qf | sort -u >> backtrace_binaries_versions
#
11 years, 6 months
[ABRT PATCH] abrt-dbus: immediately return an error if not-existing problem is requested
by Jakub Filak
- closes trac#877
Signed-off-by: Jakub Filak <jfilak(a)redhat.com>
---
src/dbus/abrt-dbus.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/dbus/abrt-dbus.c b/src/dbus/abrt-dbus.c
index 797bfec..472ed4f 100644
--- a/src/dbus/abrt-dbus.c
+++ b/src/dbus/abrt-dbus.c
@@ -492,6 +492,13 @@ static void handle_method_call(GDBusConnection *connection,
return;
}
+ if (errno == ENOENT)
+ {
+ VERB1 log("Requested directory does not exist '%s'", problem_dir);
+ return_InvalidProblemDir_error(invocation, problem_dir);
+ return;
+ }
+
if (polkit_check_authorization_dname(caller, "org.freedesktop.problems.getall") != PolkitYes)
{
VERB1 log("not authorized");
@@ -565,6 +572,13 @@ static void handle_method_call(GDBusConnection *connection,
if (!dir_accessible_by_uid(problem_dir, caller_uid))
{
+ if (errno == ENOENT)
+ {
+ VERB1 log("Requested directory does not exist '%s'", problem_dir);
+ return_InvalidProblemDir_error(invocation, problem_dir);
+ return;
+ }
+
if (polkit_check_authorization_dname(caller, "org.freedesktop.problems.getall") != PolkitYes)
{
VERB1 log("not authorized");
@@ -646,6 +660,12 @@ static void handle_method_call(GDBusConnection *connection,
const char *dir_name = (const char*)l->data;
if (!dir_accessible_by_uid(dir_name, caller_uid))
{
+ if (errno == ENOENT)
+ {
+ VERB1 log("Requested directory does not exist '%s'", dir_name);
+ continue;
+ }
+
if (polkit_check_authorization_dname(caller, "org.freedesktop.problems.getall") != PolkitYes)
{ // if user didn't provide correct credentials, just move to the next dir
continue;
--
1.7.11.7
11 years, 6 months
[Automatic Bug Reporting Tool - ABRT] #876: rerun post-create event for crashes occured during shut down
by fedora-badges
#876: rerun post-create event for crashes occured during shut down
--------------------+------------------------------
Reporter: jfilak | Owner: crash-catcher@…
Type: defect | Status: new
Priority: major | Milestone:
Component: daemon | Version:
Keywords: | Blocked By:
Blocking: |
--------------------+------------------------------
Users complain about unreportable crashes. It turns out that a lot of
crashes miss data which should be created in post-create event.
Suggestions:
- .complete jurnal in dump directory
- global jurnal
- .not-complete crash element
- directory for detected crashes
--
Ticket URL: <https://fedorahosted.org/abrt/ticket/876>
Automatic Bug Reporting Tool - ABRT <http://fedorahoted.org/abrt/>
Automatic bug reporting tool
11 years, 6 months