Python crashes are not limited to < 3 per day

Bug #603503 reported by Sebastien Bacher on 2010-07-09
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Medium
Martin Pitt

Bug Description

Binary package hint: apport

Using the current maverick version, new crash files for Python crashes don't have a CrashCount.

Sebastien Bacher (seb128) wrote :

example:

run gconf-editor, send it a sig11

$ grep CrashCount /var/crash/_usr_bin_gconf-editor.1000.crash
$

run gconf-editor, send it a sig11

$ grep CrashCount /var/crash/_usr_bin_gconf-editor.1000.crash
CrashCounter: 1

run gconf-editor, send it a sig11

$ grep CrashCount /var/crash/_usr_bin_gconf-editor.1000.crash
CrashCounter: 1

summary: - doesn't increment the CrashCount over 1
+ doesn't increment the CrashCounter over 1

the testsuite errors

======================================================================
ERROR: run_crash().
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport/ui.py", line 1893, in test_run_crash
    r.write(open(report_file, 'w'))
  File "/usr/lib/python2.6/dist-packages/problem_report.py", line 307, in write
    f = open(v[0]) # file name
IOError: [Errno 2] No such file or directory: '/tmp/tmpmMWul9/core'

======================================================================
ERROR: run_crash() anonymization.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport/ui.py", line 2265, in test_run_crash_anonymity
    r.write(open(report_file, 'w'))
  File "/usr/lib/python2.6/dist-packages/problem_report.py", line 307, in write
    f = open(v[0]) # file name
IOError: [Errno 2] No such file or directory: '/tmp/tmp_pmnVI/core'

======================================================================
ERROR: run_crash() on reports with subsequently uninstalled packages
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport/ui.py", line 2138, in test_run_crash_uninstalled
    r.write(open(report_file, 'w'))
  File "/usr/lib/python2.6/dist-packages/problem_report.py", line 307, in write
    f = open(v[0]) # file name
IOError: [Errno 2] No such file or directory: '/tmp/tmpXSV8vz/core'

======================================================================
FAIL: run_report_bug() for a pid of an unpackaged program.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport/ui.py", line 1805, in test_run_report_bug_unpackaged_pid
    self.assertRaises(SystemExit, self.ui.run_argv)
AssertionError: SystemExit not raised

----------------------------------------------------------------------
Ran 44 tests in 24.381s

FAILED (failures=1, errors=3)

Sebastien Bacher (seb128) wrote :

log has:

apport (pid 11127) Fri Jul 9 11:18:29 2010: executable: /usr/bin/gconf-editor (command line "gconf-editor")
apport (pid 11127) Fri Jul 9 11:18:29 2010: this executable already crashed 2 times, ignoring

but apport still displays the "do you want to report a bug"

I can replicate at least the first three test suite failures on a clean maverick install.

CrashCounter isn't supposed to go beyond 1, further crashes are entirely ignored. The bug is that the GUI pops up for them.

summary: - doesn't increment the CrashCounter over 1
+ pops up for repeated crashes
Changed in apport (Ubuntu):
status: New → Confirmed
Martin Pitt (pitti) wrote :

I can't reproduce the actual problem, though. I crashed gconf-editor three times, the first two times it created/updated a .crash report and logged it, and the third time apport.log said "already crashed 2 times" and the report is not touched at all.

Can you please clean up /var/crash and /var/log/apport.log, run the test again, and get me the output of "stat /var/crash/_usr_bin_gconf-editor.1000.crash" after each crash? Afterwards, please attach /var/log/apport.log.

Changed in apport (Ubuntu):
status: Confirmed → Incomplete
Martin Pitt (pitti) wrote :

I tested with update-notifier --debug now, and it's only popping up the first two times. The third time there is no output, no launch of the crash dialog, and no change at all in the stat values of the .crash.

Changed in apport (Ubuntu):
importance: Undecided → Low
Sebastien Bacher (seb128) wrote :

bah, I can't get the issue now after cleaning the crash dir and the apport log, closing the bug

Changed in apport (Ubuntu):
status: Incomplete → Invalid
Martin Pitt (pitti) wrote :

For the record, test suite failures were due to maverick's ptrace protection. Fixed in trunk.

Sebastien Bacher (seb128) wrote :

the issue is with python exceptions, not segfaults crashes

Changed in apport (Ubuntu):
status: Invalid → New
Martin Pitt (pitti) on 2010-07-09
summary: - pops up for repeated crashes
+ pops up for repeated Python crashes
Martin Pitt (pitti) on 2010-07-13
summary: - pops up for repeated Python crashes
+ Python crashes are not limited to < 3 per day
Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Low → Medium
status: New → Triaged
description: updated
Martin Pitt (pitti) on 2010-07-30
Changed in apport (Ubuntu):
status: Triaged → In Progress
Martin Pitt (pitti) on 2010-08-10
Changed in apport (Ubuntu):
status: In Progress → Triaged
Martin Pitt (pitti) wrote :

Fixed in trunk.

Changed in apport (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.25-0ubuntu1

---------------
apport (1.25-0ubuntu1) precise; urgency=low

  * New upstream release:
    - Add new response "Examine locally" to presenting the report details,
      which runs apport-retrace in the chosen mode in a terminal. This should
      be made available for crash reports if apport-retrace and a Terminal
      application are installed; add an abstrace UI method for this.
      (LP: #75901)
    - apport-gtk: Add "Examine locally..." button, and implement
      ui_run_terminal().
    - apport-cli: Add "Examine locally..." responses, and implement
      ui_run_terminal().
    - apport-cli: Greatly speed up displaying large reports. This also changes
      the format to avoid indenting each line with a space, and visually set
      apart the keys in a better way.
    - apport_python_hook.py: Move tests out of this file into test/python, to
      avoid having to parse the unit tests at each Python startup.
    - test/python: Also make tests work if Python hook is not installed in
      system's sitecustomize.py.
    - packaging.py: Add get_modified_conffiles() API, and implement it in
      packaging-apt-dpkg.py.
    - hookutils.py: Add attach_conffiles().
    - hookutils.py: Add attach_upstart_overrides().
    - launchpad.py: Remove "Ubuntu" in bug response, replace with "this
      software". (LP: #883234)
    - apport-kde: Rearrange order of imports to get intended error message if
      PyKDE is not installed.
    - packaging-apt-dpkg.py: Ignore hardening-wrapper diversions, to make
      gcc_ice_hook work if hardening-wrapper is installed.
    - apport_python_hook: Respect $APPORT_REPORT_DIR.
    - apport_python_hook: Limit successive crashes per program and user to 3
      per day, just like signal crashes. (LP: #603503)
    - packaging-apt-dpkg.py: Skip online tests when there is no default route.
    - ui.py: Fix test suite to not fail if system has some obsolete or
      non-distro packages.
 -- Martin Pitt <email address hidden> Wed, 02 Nov 2011 20:45:08 -0400

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

Other bug subscribers