[ABRT PATCH 2/2] vmcore: provide all problem elements necessary for the reporting
Jakub Filak
jfilak at redhat.com
Wed Jun 5 11:51:59 UTC 2013
Closes #662
Signed-off-by: Jakub Filak <jfilak at redhat.com>
---
src/hooks/abrt-harvest-vmcore.in | 8 ++++++++
src/plugins/abrt-action-analyze-vmcore.in | 24 +-----------------------
src/plugins/vmcore_event.conf | 14 ++++++++++++--
3 files changed, 21 insertions(+), 25 deletions(-)
diff --git a/src/hooks/abrt-harvest-vmcore.in b/src/hooks/abrt-harvest-vmcore.in
index 59bad31..99022d9 100644
--- a/src/hooks/abrt-harvest-vmcore.in
+++ b/src/hooks/abrt-harvest-vmcore.in
@@ -62,11 +62,19 @@ for d in *; do
printf 'vmcore' >"$dst.new/type"
printf 'kernel' >"$dst.new/component"
printf '%s' "`date '+%s'`" >"$dst.new/time"
+ printf '%s' "`uname -i`" >"$dst.new/architecture"
+ cp "$dst.new/time" "$dst.new/last_occurrence"
printf '0' >"$dst.new/uid"
# TODO: need to generate *real* UUID,
# one which has a real chance of catching dups!
# This one generates different hashes even for similar cores:
printf '%s' "`sha1sum <"$dst.new/vmcore" | cut -d" " -f1`" >"$dst.new/uuid"
+ cp /etc/system-release "$dst.new/os_release" || {
+ cp /etc/redhat-release "$dst.new/os_release" || {
+ cp /etc/SuSE-release "$dst.new/os_release"
+ }
+ }
+ cp /etc/os-release "$dst.new/os_info"
chown -R 0:0 -- "$dst.new"
chmod -R u+rwX,go-rwxst -- "$dst.new"
diff --git a/src/plugins/abrt-action-analyze-vmcore.in b/src/plugins/abrt-action-analyze-vmcore.in
index c78ba03..9475137 100644
--- a/src/plugins/abrt-action-analyze-vmcore.in
+++ b/src/plugins/abrt-action-analyze-vmcore.in
@@ -129,29 +129,7 @@ if __name__ == "__main__":
out, err = crash.communicate(input="log")
log_file.close()
backtrace_file = open("backtrace", "w")
- dump_oops = Popen(["abrt-dump-oops", "-o", "kernel_log"], stdout=backtrace_file, bufsize=-1)
+ dump_oops = Popen(["abrt-dump-oops", "-u", ".", "kernel_log"], stdout=backtrace_file, bufsize=-1)
backtrace_file.close()
-
ret = dump_oops.wait()
- if ret != RETURN_OK:
- sys.exit(ret)
-
- ret = RETURN_FAILURE
- # Save kernel version in 'kernel' file (FILENAME_KERNEL)
- # The code below expects that abrt-dump-oops generates file in the following format:
- # <empty line>
- # Version: 3.8.5-201.fc18.x86_64
- # <oops data>
- # <EOF>
- with open("backtrace", "r") as backtrace_file:
- for line in backtrace_file:
- # Please excuse the magic constant 9 => len('Version: '). This construction is more readable for me.
- if line[:9] == "Version: ":
- with open("kernel", "w") as kernel_file:
- kernel_file.write(line[9:].rstrip())
- ret = RETURN_OK # set OK only if it was successfully written
- break # break the loop, we support only one oops per vmcore
- if ret != RETURN_OK:
- print _("Garbled abrt-dump-oops output format. Can't find kernel version.");
-
sys.exit(ret)
diff --git a/src/plugins/vmcore_event.conf b/src/plugins/vmcore_event.conf
index 0e15b7f..f6e260e 100644
--- a/src/plugins/vmcore_event.conf
+++ b/src/plugins/vmcore_event.conf
@@ -1,7 +1,9 @@
# analyze
EVENT=analyze_VMcore analyzer=vmcore
- abrt-action-analyze-vmcore
- abrt-action-generate-core-backtrace
+ abrt-action-analyze-vmcore &&
+ abrt-action-analyze-oops &&
+ abrt-action-generate-core-backtrace &&
+ abrt-action-save-kernel-data
# If you want behavior similar to one provided by kerneloops daemon
# distributed by kerneloops.org - that is, if you want
@@ -14,6 +16,14 @@ EVENT=analyze_VMcore analyzer=vmcore
EVENT=report_Kerneloops analyzer=vmcore
reporter-kerneloops
+EVENT=report_Bugzilla analyzer=vmcore
+ reporter-bugzilla -b \
+ -F /etc/libreport/plugins/bugzilla_format_kernel.conf
+
+# Send micro report
+EVENT=report_uReport analyzer=vmcore
+ /usr/libexec/abrt-action-ureport
+
EVENT=report-gui analyzer=vmcore
report-gtk -e analyze_VMcore -e report_uReport -e "collect_*" -e report_Bugzilla -e post_report -- "$DUMP_DIR"
--
1.8.1.4
More information about the Crash-catcher
mailing list