Bug 871506 - abrt.pth causes python application failure
Summary: abrt.pth causes python application failure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: abrt
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard Marko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-30 14:47 UTC by John Dennis
Modified: 2016-02-01 02:22 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-20 11:45:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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