Bug 1027786

Summary: abrt-action-install-debuginfo-to-abrt-cache bogus exit code
Product: Red Hat Enterprise Linux 6 Reporter: Denys Vlasenko <dvlasenk>
Component: abrtAssignee: abrt <abrt-devel-list>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: mkyral, msuchy
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-24 11:24:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Denys Vlasenko 2013-11-07 12:10:01 UTC
While testing MCE injection, got this vmcore porcessing failure:

--- Running analyze_VMcore ---
Installing kernel debuginfo(s)
Coredump references 0 debuginfo files, 1 of them are not installed
Setting up yum repositories
Looking for needed packages in repositories
Can't find packages for 1 debuginfo files
All debuginfo files are available
Generating backtrace
abrt-dump-oops: Found oopses: 0


There may be more than one problem here. First one is this clearly broken
behavior of debuginfo installer:

# /usr/libexec/abrt-action-install-debuginfo-to-abrt-cache --size_mb=4096 --exact=/usr/lib/debug/lib/modules/2.6.32-430.el6.i686/vmlinux
Coredump references 0 debuginfo files, 1 of them are not installed
Setting up yum repositories
Looking for needed packages in repositories
Can't find packages for 1 debuginfo files
All debuginfo files are available
[root@guinea ~]# /usr/libexec/abrt-action-install-debuginfo-to-abrt-cache --size_mb=4096 --exact=/usr/lib/debug/lib/modules/2.6.32-430.el6.i686/vmlinux; echo $?
Coredump references 0 debuginfo files, 1 of them are not installed
Setting up yum repositories
Looking for needed packages in repositories
Can't find packages for 1 debuginfo files
All debuginfo files are available
0

# ls /usr/lib/debug/lib/modules/2.6.32-430.el6.i686/vmlinux
ls: cannot access /usr/lib/debug/lib/modules/2.6.32-430.el6.i686/vmlinux: No such file or directory

Debuginfo was NOT installed. Exit code is wrong as well.

Comment 1 Denys Vlasenko 2013-11-07 12:12:31 UTC
Without double-pasted mess:

# /usr/libexec/abrt-action-install-debuginfo-to-abrt-cache --size_mb=4096 --exact=/usr/lib/debug/lib/modules/2.6.32-430.el6.i686/vmlinux; echo $?
Coredump references 0 debuginfo files, 1 of them are not installed
Setting up yum repositories
Looking for needed packages in repositories
Can't find packages for 1 debuginfo files
All debuginfo files are available
0

Comment 2 Denys Vlasenko 2013-11-07 12:17:43 UTC
Since debuginfo installer lied to us, abrt-action-analyze-vmcore thinks that everything is fine, and runs "crash -s vmcore <path-to-missing-debuginfo", storing result in "kernel_log" element... which ends up as:

kernel_log
=====
crash: /var/cache/abrt-di/usr/lib/debug/lib/modules/2.6.32-430.el6.i686/vmlinux: No such file or directory

Usage:

  crash [OPTION]... NAMELIST MEMORY-IMAGE  (dumpfile form)
  crash [OPTION]... [NAMELIST]             (live system form)

Enter "crash -h" for details.
=====

abrt-action-analyze-vmcore does not check "crash -s" exit code (this is a second bug).

Then abrt-dump-oops "Found oopses: 0" in kernel_log. Not really a surprise...

Comment 4 RHEL Program Management 2013-11-10 12:55:15 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 Denys Vlasenko 2013-11-11 15:34:44 UTC
Upstream already has a bit different code, so the fix below may be unnucessary, but on RHEL6.5 machine the folloving hack in vmcore_event.conf works around the problem:

EVENT=analyze_VMcore analyzer=vmcore
        # hack
        if test -f vmcore-dmesg.txt; then
            exec abrt-dump-oops -o vmcore-dmesg.txt >backtrace
        fi
        # end hack
        abrt-action-analyze-vmcore

It uses the fact that kdump in RHEL6 already saves dmesg output as a separate file.

Comment 6 Miroslav Suchý 2017-11-24 11:24:25 UTC
This is an artificial issue. It rarely can happen. The upstream code is different now. It does not make sense to me fixing this.