Bug 625445 - python hook doesn't report unhandled exceptions for scripts run without full length path
python hook doesn't report unhandled exceptions for scripts run without full ...
Product: Fedora
Classification: Fedora
Component: abrt (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Denys Vlasenko
Fedora Extras Quality Assurance
Depends On:
Blocks: ABRTF17
  Show dependency treegraph
Reported: 2010-08-19 09:27 EDT by Roman Rakus
Modified: 2014-01-12 19:12 EST (History)
8 users (show)

See Also:
Fixed In Version: abrt-2.0.7-2.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-12-16 14:53:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Roman Rakus 2010-08-19 09:27:28 EDT
Description of problem:
python hook only process exception from scripts run with full path (starting with `'' character)

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

How reproducible:

Steps to Reproduce:
1. set ProcessUnpackaged = yes in abrt.conf and restart abrt daemon
2. echo "raise IOError" > test.py && python test.py
3. echo "raise IOError" > test.py && python $PWD/test.py
Actual results:
In the step 2 abrt will not catch exception
In the step 3 abrt will catch exception

Expected results:
Should catch exception in both cases

Additional info:
Looked in the source code;
        if sys.argv[0][0] != "/":
            # Relative path - can't reliably determine package
            # this script belongs to - abort dumping
            # TODO: check abrt.conf and abort only if
            # ProcessUnpackaged = no?
            raise Exception

I guess it should be erased. Tried it and it works.
Comment 1 Roman Rakus 2010-08-19 09:36:16 EDT
(In reply to comment #0)
> Description of problem:
> python hook only process exception from scripts run with full path (starting
> with `'' character)
starting with `/' character...
Comment 2 Denys Vlasenko 2011-07-19 04:43:33 EDT
What would be the point in reporting a bug against a script from unknown package?

And in your example:

echo "raise IOError" > test.py && python test.py

the script isn't from any package at all. Consider the case when someone develops Python software. Do you think it would be appreciated when every crash during development will cause abrt to pop up?
Comment 3 Roman Rakus 2011-07-20 07:51:20 EDT
My point wasn't to report a bug, but to catch an exception. I found it useful.
Anyway, if you are asking for point - what is the point of `ProcessUnpackaged' in abrt.conf?
Comment 4 Denys Vlasenko 2011-07-22 11:04:59 EDT
We discussed this on mtg and decided to make it work for ProcessUnpackaged=no setting
Comment 5 Roman Rakus 2011-07-22 11:13:49 EDT
Just to be sure - with ProcessUnpackaged=no abrt will catch exceptions for my unpackaged python script run with not absolute path?
And with ProcessUnpackaged=yes abrt will catch only exceptions for my unpackaged python script run with absolute path?
Comment 6 Denys Vlasenko 2011-10-20 16:37:56 EDT
Fixed in git:

commit 57963a02011b2b6f220158936311db6704237b57
Author: Denys Vlasenko <dvlasenk@redhat.com>
Date:   Thu Oct 20 22:34:55 2011 +0200

    python: allow saving of crashes in non-abspath scripts. Closes rhbz#625445.

    The behavior is off by default. It can be enabled by
    setting RequireAbsolutePath to "no" in /etc/abrt/plugins/python.conf.
Comment 7 Fedora Update System 2011-12-10 06:05:52 EST
abrt-2.0.7-2.fc16 has been submitted as an update for Fedora 16.
Comment 8 Fedora Update System 2011-12-11 16:57:22 EST
Package abrt-2.0.7-2.fc16, libreport-2.0.8-3.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing abrt-2.0.7-2.fc16 libreport-2.0.8-3.fc16'
as soon as you are able to, then reboot.
Please go to the following url:
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2011-12-16 14:53:29 EST
abrt-2.0.7-2.fc16, libreport-2.0.8-3.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

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