harvest-vmcore: properly handle inaccessible dir error

Related to rhbz#1032511

rmarko: added missing newlines to sys.stderr.write calls

Signed-off-by: Jakub Filak <jfilak@redhat.com>
don't break the event run by failures of abrt-action-notify

Closes #789
Closes rhbz#1057710

rmarko: add newlines to sys.stderr.write calls

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Fix handling of Machine Check Exceptions.

Closes #764.

If non-fatal MCE is seen, abrt will detect it as an oops
and alert user in a usual manner. When user opens this
abrt problem for reporting, he will see that "comment"
field is pre-filled with a text.
What it says depends on whether mcelog tool is installed.
If mcelog is installed, the text will say that hardware errors
were detected, and will show the tail of either /var/log/mcelog
or syslog.
Otherwise the text will say that hardware errors
were detected, but they can't be usefully diagnosed,
and user is strongly advised to install mcelog tool.

If fatal MCE is encountered, kernel always panics,
(abrt has no chance of catching the oops),
kdump kicks in, and then after reboot abrt says that new vmcore
is found. When user generates backtrace, he will see oops text
which starts with
"Machine Check Exception: BANK nnn ..." and (hopefully)
is already explanatory enough.

(Yes, it's weird that kernel shows human-readable error messages
on fatal MCEs but doesn't do that for non-fatal ones.
This makes fetching MCE info significantly different...
I wish kernel would show human-readable MCEs in both cases,
we wouldn't need mcelog then... oh well.)

In order to generate meaningful hash for MCE's,
oops hashing was extended for oopses without backtraces.

Since MCEs, unlike regular oopses, don't contain kernel version,
additional magic is added to extract kernel version
in vmcore event handling.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

Related to rhbz#1032077

Signed-off-by: Jakub Filak <jfilak@redhat.com>
move MCE handling in event to abrt-action-check-oops-for-hw-error

Having a separate tool should help with internationalization

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

Related to rhbz#1032077

Signed-off-by: Jakub Filak <jfilak@redhat.com>
abrt-action-check-oops-for-hw-error: i18n, add error check on open()

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

Related to rhbz#1032077

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Add a manpage for abrt-action-check-oops-for-hw-error

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

Related to rhbz#1032077

Signed-off-by: Jakub Filak <jfilak@redhat.com>
oops post-create: do not fail the event if check-oops-for-hw-error exits nonzero

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

Related to rhbz#1032077

Signed-off-by: Jakub Filak <jfilak@redhat.com>
doc/MCE_readme.txt: new file - documentation about MCE handling

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

Related to rhbz#1032077

Signed-off-by: Jakub Filak <jfilak@redhat.com>
examples/mce2.test: an example of non-fatal MCE

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

Related to rhbz#1032077

Signed-off-by: Jakub Filak <jfilak@redhat.com>
MCE: cover cases where kernel version isn't detected on Fedora 20.

With this change, both fata and non-fatal MCEs are caught on default
Fedora 20 installation.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

Related to rhbz#1032077

Signed-off-by: Jakub Filak <jfilak@redhat.com>
MCE: make oops and vmcore MCEs a bit more similar

For oops-MCEs, change abrt-action-check-oops-for-hw-error
to write MCE description to "backtrace" instead of "comment"
element.

Extend abrt-action-check-oops-for-hw-error to be able to
detect vmcore MCEs: it will create "not-reportable" element
for them too, as it was doing it for oops-MCEs.

Add post-create processing to vmcore_event.conf which
runs abrt-action-check-oops-for-hw-error on vmcores.
Since that needs dmesg, dmesg extraction also moved
to this event from analyze_VMcore.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

Related to rhbz#1032077

Signed-off-by: Jakub Filak <jfilak@redhat.com>