/usr/share/apport/apport:AttributeError:/usr/share/apport/apport@451:parse_arguments:print_usage:_print_message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
High
|
Brian Murray | ||
Xenial |
Fix Released
|
High
|
Brian Murray | ||
Bionic |
Fix Released
|
High
|
Brian Murray | ||
Focal |
Fix Released
|
High
|
Brian Murray |
Bug Description
Impact
------
apport is crashing for some users when a crash file is created about an executable which has been deleted.
Test Case
---------
While you won't get a Traceback (because there is a location for apport to print its usages message) with the following test case you will see apport usage printed:
$ PYTHONPATH=
usage: apport [-h] [-p PID] [-s SIGNAL_NUMBER] [-c CORE_ULIMIT] [-d DUMP_MODE] [-P [GLOBAL_PID]]
With the fixed version of apport you'll see no such usage message.
Regression Potential
-------
Because new code is being added its possible that the python syntax could be bad which would result in another crash, so careful review the code.
Original Description
-------
The Ubuntu Error Tracker has been receiving reports about a problem regarding apport. This problem was most recently seen with package version 2.20.11-
Traceback (most recent call last):
File "/usr/share/
options = parse_arguments()
File "/usr/share/
parser.
File "/usr/lib/
self.
File "/usr/lib/
file.
AttributeError: 'NoneType' object has no attribute 'write'
After working on https:/
it appears that print_usage is called and throwing an error because in this context (called with core_pattern) apport doesn't have an stdout or stderr. after looking at traces it seems the kernel is adding 'deleted' to the name of the process which cause argument parsing to fail.
The fix below from bdmurray seems to fix it.
https:/
There is report of this issue in Focal, Bionic and xenial
Related branches
description: | updated |
tags: | added: xenial |
tags: | added: test-1234 |
tags: | removed: test-1234 |
tags: | added: test-tag |
tags: | removed: test-tag |
tags: | added: fr-818 |
description: | updated |
Changed in apport (Ubuntu): | |
status: | New → Confirmed |
Changed in apport (Ubuntu Xenial): | |
status: | New → Triaged |
Changed in apport (Ubuntu Bionic): | |
status: | New → Triaged |
Changed in apport (Ubuntu Focal): | |
status: | New → Triaged |
Changed in apport (Ubuntu Xenial): | |
importance: | Undecided → High |
Changed in apport (Ubuntu Bionic): | |
importance: | Undecided → High |
Changed in apport (Ubuntu Focal): | |
importance: | Undecided → High |
Changed in apport (Ubuntu Focal): | |
assignee: | nobody → Brian Murray (brian-murray) |
Changed in apport (Ubuntu Bionic): | |
assignee: | nobody → Brian Murray (brian-murray) |
Changed in apport (Ubuntu Focal): | |
status: | Triaged → In Progress |
Changed in apport (Ubuntu Bionic): | |
status: | Triaged → In Progress |
Changed in apport (Ubuntu Xenial): | |
status: | Triaged → In Progress |
assignee: | nobody → Brian Murray (brian-murray) |
description: | updated |
My patch works by ensuring the apport can handle the number of arguments being passed such that print_usage() is never called so we won't Traceback trying to write to a non-existent file.