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.

** Changed in: apport (Ubuntu)
       Status: Confirmed => In Progress

** Changed in: apport (Ubuntu)
   Importance: Undecided => High

** Changed in: apport (Ubuntu)
     Assignee: (unassigned) => Brian Murray (brian-murray)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1899195

Title:
  
/usr/share/apport/apport:AttributeError:/usr/share/apport/apport@451:parse_arguments:print_usage:_print_message

Status in apport package in Ubuntu:
  In Progress

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-0ubuntu27.10, the problem page at
  https://errors.ubuntu.com/problem/290470c9cf5f278596966c386aac31e70a49988e
  contains more details, including versions of packages affected,
  stacktrace or traceback, and individual crash reports.

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

  After working on https://bugs.launchpad.net/apport/+bug/1732962, the error 
tracker started throwing the error above.
  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://paste.ubuntu.com/p/pVKNP9kWP4/

  There is report of this issue in Focal, Bionic and xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1899195/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to