Bug 1246539 - abrt misses a dependency on python-argparse
Summary: abrt misses a dependency on python-argparse
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: abrt
Version: 6.8
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jakub Filak
QA Contact: Martin Kyral
Lenka Špačková
URL:
Whiteboard:
: 1256107 1292909 (view as bug list)
Depends On:
Blocks: 1254457
TreeView+ depends on / blocked
 
Reported: 2015-07-24 14:13 UTC by James Boyle
Modified: 2019-08-15 04:58 UTC (History)
15 users (show)

Fixed In Version: abrt-2.0.8-36.el6
Doc Type: Bug Fix
Doc Text:
_abrt_ no longer missing a dependency on _python-argparse_ A previously missing dependency of the _abrt_ packages on the _python-argparse_ package resulting in errors like "ImportError: No module named argparse" has been fixed. This problem usually occurred if customers upgraded from an earlier version of Red Hat Enterprise Linux, or during a fresh installation if customers removed the _nfs-utils_ or _ipa-client_ packages.
Clone Of:
Environment:
Last Closed: 2016-05-11 00:38:06 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0920 normal SHIPPED_LIVE abrt bug fix and enhancement update 2016-05-10 22:53:00 UTC
Red Hat Knowledge Base (Solution) 1549053 None None None 2016-03-08 10:40:55 UTC

Description James Boyle 2015-07-24 14:13:24 UTC
Description of problem:
abrt-dump-oops produces a prodigious number of error emails because /usr/libexec/abrt-action-generate-machine-id crashes (see below).  This behavior began to occur follow automatic updates were applied through yum cron. 

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

How reproducible:
Always

Steps to Reproduce:
1. Allow abrtd to run and eventually launch abrt-dump-oops
2.
3.

Actual results:
abrt components repeatedly crash when processing the queue and a large number of email notifications are sent (see below).

Approximately 2100 emails were generated within 6 hours because abrt-dump-oops did not detect that it continued to fail to process the /var/spool/abrt queue.

Expected results:
/usr/libexec/abrt-action-generate-machine-id should run properly.


Additional info:
abrt_version:   2.0.8
cmdline:        /usr/bin/python /usr/libexec/abrt-action-generate-machine-id -o /var/spool/abrt/pyhook-2015-07-24-03:26:29-13226/machineid
executable:     /usr/libexec/abrt-action-generate-machine-id
hostname:       host
kernel:         2.6.32-504.30.3.el6.x86_64
last_occurrence: 1437722789
time:           Fri 24 Jul 2015 03:26:50 AM EDT
uid:            0

backtrace:
:abrt-action-generate-machine-id:24:<module>:ImportError: No module named argparse
:
:Traceback (most recent call last):
:  File "/usr/libexec/abrt-action-generate-machine-id", line 24, in <module>
:    from argparse import ArgumentParser
:ImportError: No module named argparse
:
:Local variables in innermost frame:
:__builtins__: <module '__builtin__' (built-in)>
:__file__: '/usr/libexec/abrt-action-generate-machine-id'
:__package__: None
:sys: <module 'sys' (built-in)>
:__name__: '__main__'
:__doc__: 'This module provides algorithms for generating Machine IDs.\n'

Comment 2 Jakub Filak 2015-07-27 14:36:44 UTC
Thank you for the report!

abrt-action-generate-machine-id crashes because abrt package misses a dependency on python-argparse. abrt-dump-oops triggers abrt-action-generate-machine-id, therefore I think that abrt-dump-oops runs continuously for some other reason.

Please install that package:
# yum install python-argparse

and run the following command:
# /usr/libexec/abrt-action-generate-machine-id

to verify that the crash is fixed.

Please attach the result of the following command as well:
# cat /var/log/messages | grep abrt

Comment 3 James Boyle 2015-07-28 01:45:23 UTC
Installing python-argparse fixes the error, but why was the dependency not installed in the first place?  

I can verify the /usr/libexec/abrt-action-generate-machine-id works and returns info from dmidecode.

grep abrt /var/log/messages is far too long to list entirely, but here is a sample:

Jul 23 08:43:33 host abrt: detected unhandled Python exception in '/usr/libexec/abrt-action-generate-machine-id'
Jul 23 08:43:33 host abrt-server[18907]: Saved Python crash dump of pid 18906 to /var/spool/abrt/pyhook-2015-07-23-08:43:33-18906
Jul 23 08:43:33 host abrtd: Directory 'pyhook-2015-07-23-08:43:33-18906' creation detected
Jul 23 08:43:33 host abrtd: Duplicate: core backtrace
Jul 23 08:43:33 host abrtd: DUP_OF_DIR: /var/spool/abrt/pyhook-2015-07-23-08:43:33-18906
Jul 23 08:43:33 host abrtd: Deleting problem directory pyhook-2015-07-23-08:43:22-18675 (dup of pyhook-2015-07-23-08:43:33-18906)
Jul 23 08:43:33 host abrtd: Sending an email...
Jul 23 08:43:33 host abrtd: Email was sent to: root@localhost
Jul 23 08:43:33 host abrtd: Duplicate: core backtrace
Jul 23 08:43:33 host abrtd: DUP_OF_DIR: /var/spool/abrt/pyhook-2015-07-23-03:59:32-5493
Jul 23 08:43:33 host abrtd: Deleting problem directory pyhook-2015-07-23-08:43:22-18687 (dup of pyhook-2015-07-23-03:59:32-5493)
Jul 23 08:43:33 host abrt: detected unhandled Python exception in '/usr/bin/abrt-action-notify'
Jul 23 08:43:34 host abrt-server[18918]: Saved Python crash dump of pid 18917 to /var/spool/abrt/pyhook-2015-07-23-08:43:34-18917
Jul 23 08:43:34 host abrtd: Directory 'pyhook-2015-07-23-08:43:34-18917' creation detected
Jul 23 08:43:34 host abrtd: Traceback (most recent call last):
Jul 23 08:43:34 host abrtd:   File "/usr/bin/abrt-action-notify", line 18, in <module>
Jul 23 08:43:34 host abrtd:     from argparse import ArgumentParser
Jul 23 08:43:34 host abrtd: ImportError: No module named argparse
Jul 23 08:43:44 host abrt: detected unhandled Python exception in '/usr/libexec/abrt-action-generate-machine-id'
Jul 23 08:43:44 host abrt-server[19154]: Saved Python crash dump of pid 19153 to /var/spool/abrt/pyhook-2015-07-23-08:43:44-19153
Jul 23 08:43:44 host abrtd: Directory 'pyhook-2015-07-23-08:43:44-19153' creation detected
Jul 23 08:43:44 host abrtd: Duplicate: core backtrace
Jul 23 08:43:44 host abrtd: DUP_OF_DIR: /var/spool/abrt/pyhook-2015-07-23-08:43:44-19153
Jul 23 08:43:44 host abrtd: Deleting problem directory pyhook-2015-07-23-08:43:33-18906 (dup of pyhook-2015-07-23-08:43:44-19153)
Jul 23 08:43:44 host abrtd: Sending an email...
Jul 23 08:43:44 host abrtd: Email was sent to: root@localhost
Jul 23 08:43:44 host abrtd: Duplicate: core backtrace
Jul 23 08:43:44 host abrtd: DUP_OF_DIR: /var/spool/abrt/pyhook-2015-07-23-03:59:32-5493
Jul 23 08:43:44 host abrtd: Deleting problem directory pyhook-2015-07-23-08:43:34-18917 (dup of pyhook-2015-07-23-03:59:32-5493)
Jul 23 08:43:44 host abrt: detected unhandled Python exception in '/usr/bin/abrt-action-notify'
Jul 23 08:43:45 host abrtd: Directory 'pyhook-2015-07-23-08:43:45-19165' creation detected
Jul 23 08:43:45 host abrt-server[19166]: Saved Python crash dump of pid 19165 to /var/spool/abrt/pyhook-2015-07-23-08:43:45-19165
Jul 23 08:43:45 host abrtd: Traceback (most recent call last):
Jul 23 08:43:45 host abrtd:   File "/usr/bin/abrt-action-notify", line 18, in <module>
Jul 23 08:43:45 host abrtd:     from argparse import ArgumentParser
Jul 23 08:43:45 host abrtd: ImportError: No module named argparse
Jul 23 08:43:56 host abrt: detected unhandled Python exception in '/usr/libexec/abrt-action-generate-machine-id'
Jul 23 08:43:56 host abrtd: Directory 'pyhook-2015-07-23-08:43:56-19384' creation detected
Jul 23 08:43:56 host abrt-server[19385]: Saved Python crash dump of pid 19384 to /var/spool/abrt/pyhook-2015-07-23-08:43:56-19384
Jul 23 08:43:56 host abrtd: Duplicate: core backtrace
Jul 23 08:43:56 host abrtd: DUP_OF_DIR: /var/spool/abrt/pyhook-2015-07-23-08:43:56-19384
Jul 23 08:43:56 host abrtd: Deleting problem directory pyhook-2015-07-23-08:43:44-19153 (dup of pyhook-2015-07-23-08:43:56-19384)
Jul 23 08:43:56 host abrtd: Sending an email...
Jul 23 08:43:56 host abrtd: Email was sent to: root@localhost
Jul 23 08:43:56 host abrtd: Duplicate: core backtrace
Jul 23 08:43:56 host abrtd: DUP_OF_DIR: /var/spool/abrt/pyhook-2015-07-23-03:59:32-5493
Jul 23 08:43:56 host abrtd: Deleting problem directory pyhook-2015-07-23-08:43:45-19165 (dup of pyhook-2015-07-23-03:59:32-5493)
Jul 23 08:43:56 host abrt: detected unhandled Python exception in '/usr/bin/abrt-action-notify'
Jul 23 08:43:56 host abrt-server[19397]: Saved Python crash dump of pid 19396 to /var/spool/abrt/pyhook-2015-07-23-08:43:56-19396
Jul 23 08:43:56 host abrtd: Directory 'pyhook-2015-07-23-08:43:56-19396' creation detected
Jul 23 08:43:56 host abrtd: Traceback (most recent call last):
Jul 23 08:43:56 host abrtd:   File "/usr/bin/abrt-action-notify", line 18, in <module>
Jul 23 08:43:56 host abrtd:     from argparse import ArgumentParser
Jul 23 08:43:56 host abrtd: ImportError: No module named argparse

Comment 4 Jakub Filak 2015-07-28 05:39:04 UTC
(In reply to James Boyle from comment #3)
> Installing python-argparse fixes the error, but why was the dependency not
> installed in the first place?  
> 

Because I forgot to add "Requires: python-argparse" to abrt's spec file.

What type of installation did you chose? I installed RHEL-6.7 Workstation on my VM and python-argparse was pulled in as a dependency of nfs-utils and ipa-client.

/var/log/messages lines look ok. How did you find out that abrt-dump-oops runs continuously?

Comment 5 James Boyle 2015-07-28 13:43:25 UTC
(In reply to Jakub Filak from comment #4)
> (In reply to James Boyle from comment #3)

> Because I forgot to add "Requires: python-argparse" to abrt's spec file.
> 
Honestly - this makes me feel better!  I didn't want to have to consider other possibilities of why the package might not have been there (other admin, intrusion, etc.). :^)

> What type of installation did you chose? I installed RHEL-6.7 Workstation on
> my VM and python-argparse was pulled in as a dependency of nfs-utils and
> ipa-client.
> 

This was a server installation from RHEL 6.5 (or earlier) that has been patched to current along the way.  It aims to be FISMA compliant and in line with that, the general rule is to have the bare minimum installed that's required to get the job done.  (things like nfs are not installed at all on this system)

> /var/log/messages lines look ok. How did you find out that abrt-dump-oops
> runs continuously?

'ps auxwww |grep abrt' showed me that abrt-dump-oops is/was running.  Maybe it's supposed to be running all the time (looking at some other systems now, I'm sure it was supposed to be).  I could have stated my issue better as, given previous conditions, it seems like a race condition: [scan spool for crashes] -> [crash yourself trying to make the report] -> [email] -> [repeat] ...  Anyway, my biggest issue was that my inbox was flooded.

I appreciate your help!
Thank you,
--James

Comment 6 Kodiak Firesmith 2015-07-31 15:31:45 UTC
I also noticed the missing dep on a minimal server install in my infra as well - after seeing 9k traceback emails in root mail.  

I'll be filing a support ticket with Red Hat support services to see about getting a new version of this released asap.  In the mean time I'll add python-argparse to our server baseline via Puppet.

Comment 7 Jakub Filak 2015-08-03 06:51:30 UTC
(In reply to James Boyle from comment #5)
> 
> This was a server installation from RHEL 6.5 (or earlier)

So the issue has started appearing after you upgraded to RHEL-6.7

> > /var/log/messages lines look ok. How did you find out that abrt-dump-oops
> > runs continuously?
> 
> 'ps auxwww |grep abrt' showed me that abrt-dump-oops is/was running.  Maybe
> it's supposed to be running all the time (looking at some other systems now,
> I'm sure it was supposed to be).

Your assumptions is correct, abrt-dump-oops watches /var/log/messages for kernel stack traces and converts them to ABRT problem records.

Comment 9 Jakub Filak 2015-08-24 06:15:53 UTC
*** Bug 1256107 has been marked as a duplicate of this bug. ***

Comment 11 Jakub Filak 2015-12-08 11:16:08 UTC
Fixed in the rhel-6.8 staging branch.

Comment 14 Jakub Filak 2015-12-21 08:20:51 UTC
*** Bug 1292909 has been marked as a duplicate of this bug. ***

Comment 16 James Boyle 2016-02-26 19:01:12 UTC
It is important to note that users could have also experienced this issue from a fresh installation if they removed nfs-utils or ipa-client.  In some environments and compliance situations only the absolute bare minimum of installed software is allowed, so administrators will remove nfs-utils if the system is not expected to mount NFS volumes.

Comment 25 errata-xmlrpc 2016-05-11 00:38:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0920.html


Note You need to log in before you can comment on or make changes to this bug.