AttributeError exception in apport/REThread.py (line 39)

Bug #215929 reported by Daniel Hahler
2
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: apport

I've just started adept_notifier from the command line and triggered a Firefox crash.
This is the result:

$ adept_notifier
firefox-3
Exception in thread Thread-2 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
  File "/usr/lib/python2.5/site-packages/apport/REThread.py", line 39, in run
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'exc_info'
Unhandled exception in thread started by <bound method REThread.__bootstrap of <REThread(Thread-2, started)>>
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 87, in apport_excepthook
    sys.__excepthook__(exc_type, exc_obj, exc_tb)
AttributeError: 'NoneType' object has no attribute '__excepthook__'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 462, in __bootstrap
    self.__bootstrap_inner()
  File "/usr/lib/python2.5/threading.py", line 527, in __bootstrap_inner
    _active_limbo_lock.acquire()
AttributeError: 'NoneType' object has no attribute 'acquire'

It seems that "self" wasn't defined anymore in apport/REThread.py:
    def run(self):
        '''Run target function, identical to threading.Thread.run().'''

        if self.__target:
            try:
                self._retval = self.__target(*self.__args, **self.__kwargs)
            except:
                self._exception = sys.exc_info()

And the same applied then to "sys" in apport_excepthook:
    finally:
        # resume original processing to get the default behaviour.
        sys.__excepthook__(exc_type, exc_obj, exc_tb)

This is on Ubuntu Hardy, apport 0.107.

Revision history for this message
Daniel Hahler (blueyed) wrote :

More info:
apport-qt has been invoked, I said that I want to send the report, but while sending, I've canceled it (if I remember correctly).
I could not reproduce this, but have tried to address this in revision 1098 of the branch I'll attach.

Revision history for this message
Daniel Hahler (blueyed) wrote :
Martin Pitt (pitti)
Changed in apport:
assignee: nobody → pitti
importance: Undecided → High
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Merged to trunk, thanks!

Changed in apport:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 0.108

---------------
apport (0.108) hardy; urgency=low

  [ Martin Pitt ]
  * apport-{gtk,qt,cli}: Fix handling of file references added by package
    hooks. (LP: #205163)
  * backends/packaging_rpm.py: Fix dependency resolution of uname(*) in the
    RPM backend. Thanks to Patryk Zawadzki! (LP: #213018)
  * backends/packaging_rpm.py: Fix RPM platform parsing, thanks to Patryk
    Zawadzki! (LP: #213015)
  * po/de.po: Fix typo (missing space).
  * debian/apport.default: Disable Apport for the final Hardy release, since
    it is less useful in stable releases, and drains a lot of CPU and I/O
    power on crashes. Disabling it here instead of in update-notifier/adept is
    more discoverable and more centralized.

  [ Daniel Hahler ]
  * bin/apport-retrace: catch the same exceptions from Report.load() like
    ui.load_report() does (LP: #211899)
  * Fix uncaught exceptions in apport itself (LP: #215929):
    - apport/REThread.py: check if "sys" exists in the except block of
      REThread.run()
    - apport_python_hook.py: check if "sys" exists in the finally block of
      apport_excepthook
  * cli/apport-cli: Fix UnboundLocalError in ui_present_crash, which rendered
    apport-cli useless (for reporting crashes) (LP: #216151)

 -- Martin Pitt <email address hidden> Wed, 16 Apr 2008 12:24:32 +0200

Changed in apport:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.