Bug 1256107

Summary: abrt package is missing dependency on python-argparse
Product: Red Hat Enterprise Linux 6 Reporter: joshua.jordan
Component: abrtAssignee: abrt <abrt-devel-list>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.7CC: jfilak
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-24 06:15:53 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:
Embargoed:

Description joshua.jordan 2015-08-24 01:17:58 UTC
Description of problem:
If abrt is called when the python-argparse package is not installed, it will throw an exception:

Traceback (most recent call last):
  File "/usr/bin/abrt-action-notify", line 18, in <module>
    from argparse import ArgumentParser
ImportError: No module named argparse

causing another abrt call. This can result in thousands of emails. If the system has a package that has a listed dependency for python-argparse (or installed directly) then this issue doesn't occur.

Version-Release number of selected component (if applicable):
abrt-2.0.8-34

How reproducible:
always

Steps to Reproduce:
1. Have a default RHEL6 system that does not have python-argparse installed
2. Cause a segfault or other event that abrt cares about
3. Note that abrt: detected unhandled Python exception in '/usr/libexec/abrt-action-generate-machine-id' appears in the log
4. Note that abrt: detected unhandled Python exception in '/usr/bin/abrt-action-notify' appears in the log
5. Emails are sent notifying the admin of the problem of steps 3 and 4 which causes more emails.

Actual results:
abrt crashes with an exception while trying to notify the admin of an error

Expected results:
abrt notifies the admin of an error but does not crash itself

Additional info:
-- Dependencies of abrt --
# repoquery --plugins -R abrt
/bin/bash
/bin/sh
/usr/bin/python
abrt-libs = 2.0.8-34.el6
abrt-python = 2.0.8-34.el6
config(abrt) = 2.0.8-34.el6
dbus-python
libabrt.so.0()(64bit)
libabrt_dbus.so.0()(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libdbus-1.so.3()(64bit)
libglib-2.0.so.0()(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libreport >= 2.0.9-23
libreport-plugin-mailx
libreport-plugin-ureport
libreport.so.0()(64bit)
librpm.so.1()(64bit)
librpmio.so.1()(64bit)
librt.so.1()(64bit)
libsatyr.so.3()(64bit)
python-dmidecode
rtld(GNU_HASH)
satyr >= 0.11
shadow-utils

Note that python-argparse is not listed as a dependency, however is needed for /usr/libexec/abrt-action-generate-machine-id, /usr/bin/abrt-action-notify etc. scripts provided by the abrt package.

-- Dependencies of a package that needs python-argparse --
# repoquery --plugins -R nfs-utils
/bin/bash
/bin/sh
/sbin/chkconfig
/sbin/nologin
/usr/bin/env
/usr/bin/python
config(nfs-utils) = 1:1.2.3-64.el6
fileutils
gawk
grep
keyutils >= 1.4-4
libblkid
libblkid.so.1()(64bit)
libblkid.so.1(BLKID_1.0)(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libcap
libcap.so.2()(64bit)
libcom_err.so.2()(64bit)
libdl.so.2()(64bit)
libdl.so.2(GLIBC_2.2.5)(64bit)
libdl.so.2(GLIBC_2.3.3)(64bit)
libevent
libevent-1.4.so.2()(64bit)
libgssglue
libgssglue.so.1()(64bit)
libgssglue.so.1(libgssapi_CITI_2)(64bit)
libk5crypto.so.3()(64bit)
libkeyutils.so.1()(64bit)
libkeyutils.so.1(KEYUTILS_0.3)(64bit)
libkeyutils.so.1(KEYUTILS_1.0)(64bit)
libkrb5.so.3()(64bit)
libkrb5.so.3(krb5_3_MIT)(64bit)
libnfsidmap.so.0()(64bit)
libtirpc
libtirpc.so.1()(64bit)
libwrap.so.0()(64bit)
modutils >= 2.4.26-9
nfs-utils-lib >= 1.1.0-3
python-argparse
rpcbind
rtld(GNU_HASH)
sed
sh-utils
shadow-utils >= 4.0.3-25
textutils

Note that python-argparse *is* listed as a dependency so is installed if needed.

Demonstrated dependency:

# /usr/bin/abrt-action-notify -v
Traceback (most recent call last):
  File "/usr/bin/abrt-action-notify", line 18, in <module>
    from argparse import ArgumentParser
ImportError: No module named argparse
# yum install -y python-argparse
# /usr/bin/abrt-action-notify -v
usage: abrt-action-notify [-h] -d PROBLEM_DIR [-v] [-a]
                          [-e AUTOREPORTING_EVENT]
abrt-action-notify: error: argument -d/--problem-dir is required

After installing python-argparse abrt-action-notify executes as expected.

Comment 2 Jakub Filak 2015-08-24 06:15:53 UTC
Thank you for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 1246539 ***