/usr/share/apport/apport:AttributeError:/usr/share/apport/apport@424:parse_arguments:print_usage:_print_message

Bug #1884150 reported by errors.ubuntu.com bug bridge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
New
Undecided
Unassigned

Bug 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-0ubuntu33, the problem page at https://errors.ubuntu.com/problem/c423b68efab8e4531186d40a742be0b9811da8f9 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Revision history for this message
Brian Murray (brian-murray) wrote :

Traceback (most recent call last):
  File "/usr/share/apport/apport", line 424, in <module>
    options = parse_arguments()
  File "/usr/share/apport/apport", line 369, in parse_arguments
    parser.print_usage()
  File "/usr/lib/python3.7/argparse.py", line 2484, in print_usage
    self._print_message(self.format_usage(), file)
  File "/usr/lib/python3.7/argparse.py", line 2495, in _print_message
    file.write(message)
AttributeError: 'NoneType' object has no attribute 'write'

The traceback happens when trying to print the usage for the apport command. However, the real issue is why is apport not being called correctly. Looking at a few of the crash reports we can see a pattern similar to the following:

PythonArgs
['/usr/share/apport/apport', '14750', '11', '0', '1', '14750', '!opt!VBoxGuestAdditions-6.1.4!bin!VBoxClient', '(deleted)']

The "(deleted)" bit is likely coming from the %E part of the core pattern. From man core.

       Since kernel 5.3.0, the pipe template is split on spaces into an
       argument list before the template parameters are expanded. In
       earlier kernels, the template parameters are expanded first and the
       resulting string is split on spaces into an argument list. This
       means that in earlier kernels executable names added by the %e and %E
       template parameters could get split into multiple arguments. So the
       core dump handler needs to put the executable names as the last
       argument and ensure it joins all parts of the executable name using
       spaces. Executable names with multiple spaces in them are not
       correctly represented in earlier kernels, meaning that the core dump
       handler needs to use mechanisms to find the executable name.

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.