Bug 871506

Summary: abrt.pth causes python application failure
Product: [Fedora] Fedora Reporter: John Dennis <jdennis>
Component: abrtAssignee: Richard Marko <rmarko>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: abrt-devel-list, dmalcolm, dvlasenk, iprikryl, jberan, jfilak, jmoskovc, kklic, mmilata, mtoman, rmarko
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 11:45:40 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 John Dennis 2012-10-30 14:47:26 UTC
When abrt is installed it places abrt.pth in Python's site-packages directory. The abrt.pth causes abrt_exception_handler to be loaded into every Python application. Unfortunately importing abrt_exception_handler can have silent and unfortunate side effects. In the particular instance at hand it causes the rpm module to be loaded which in turn causes NSS based applications to fail. See bug #871485

Silently forcing applications to load modules they never asked to load is risky. This is not the first time I've seen Python failures due to abrt.pth, in fact I usually manually remove it but a recent upgrade restored it. Then I started to see difficult to diagnose failures for things which had previously been working.

If you're going to force applications to import, load and execute code they never asked for and are unaware of then it's imperative to assure that code is benign and will not cause failures when injected into an application.

I appreciate the value of abrt handling of Python failures but that needs to be weighed against the potential for system damage. It's pernicious because it's silent and system wide. If you can assure there are no side effects between anything abrt is executing and the application then it's quite useful. But such assurances are hard to make, hard to anticipate, and hard to control.

The current situation is causing Python applications using NSS to to fail. The immediate solution is to remove abrt.pth.

Comment 1 John Dennis 2012-10-30 14:50:13 UTC
Adding David Malcolm to the CC list for this bug because David is our Python maintainer and this is as much a Python issue as it is an abrt issue.

Comment 2 Richard Marko 2012-10-30 17:02:09 UTC
We've recently patched the hook to load rpm and inspect lazily. Both are now imported only when application throws unhandled exception. This should address both name clash issues and speed issues.

To test this you can use our nightly builds from http://repos.fedorapeople.org/repos/abrt/abrt/

Comment 3 Jiri Moskovcak 2012-12-20 11:45:40 UTC
Fixed since abrt-2.0.17.