An alternative fix for report.py would be if there are no UserGroups DO
NOT add the UserGroups field at all. Adding it with an empty string or
whitespace is the problem. If it's not present at all apport-unpack will
not throw the error.

-- 
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/1427600

Title:
  apport-unpack: ValueError: ['UserGroups'] has no binary content

Status in apport package in Ubuntu:
  Fix Released
Status in apport source package in Xenial:
  Triaged
Status in apport source package in Focal:
  In Progress
Status in apport source package in Groovy:
  Fix Released

Bug description:
  [Impact]
  apport-unpack crashes when trying to unpack a crash

  [Test Case]
  On a system running 20.04 LTS:
  1) create an additional user who is only a member of their own group e.g.
  bdmurray@clean-focal-amd64:~$ id crashy
  uid=1001(crashy) gid=1001(crashy) groups=1001(crashy)
  2) Launch a process as that user
  3) kill -11 that process
  4) Confirm there is a crash file in /var/crash for that process
  5) Run apport-unpack on that .crash file

  With the version of apport from -proposed you will not get another
  crash file when unpacking the crash file.

  [Regression Potential]
  We are just setting UserGroups to ' ' as opposed to having it be completely 
empty so there isn't any chance for regression. 

  When running apport-unpack to get at a core dump

  laney@raleigh> sudo apport-unpack 
_usr_lib_x86_64-linux-gnu_urfkill_urfkilld.0.crash ~/temp/zozoz
  [sudo] password for laney:
  Traceback (most recent call last):
    File "/usr/bin/apport-unpack", line 73, in <module>
      pr.extract_keys(f, bin_keys, dir)
    File "/usr/lib/python3/dist-packages/problem_report.py", line 253, in 
extract_keys
      [item for item, element in b64_block.items() if element is False])
  ValueError: ['UserGroups'] has no binary content
  laney@raleigh> apport-cli --version
  2.16.2

  It's not terrible, because most files are unpacked (those which sort
  before UserGroups, I guess).

  ProblemType: BugDistroRelease: Ubuntu 15.04
  Package: apport 2.16.2-0ubuntu1
  ProcVersionSignature: Ubuntu 3.19.0-7.7-generic 3.19.0
  Uname: Linux 3.19.0-7-generic x86_64
  ApportLog:

  ApportVersion: 2.16.2-0ubuntu1
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Tue Mar  3 10:09:26 2015
  InstallationDate: Installed on 2012-10-07 (876 days ago)
  InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Beta amd64 (20121007)
  PackageArchitecture: allSourcePackage: apport
  UpgradeStatus: Upgraded to vivid on 2013-05-07 (665 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1427600/+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