Latest fix filling in 'N/A' for absent groups is working, apport-unpack is no longer throwing stacktrace when prcoessing the report. I still don't understand why primary groups are ignored, but the important thing is the reports are processable without errors now.
This might be a totally separate issue, but will it be possible to backport the 'N/A' fix to bionic? Reproduced by testing a user with a system group as their primary group (will have N/A in report), this is equivalent to the user being in no system groups (even though they are). Also a user which has an additional group which is a system group (will show that system group in report). # system group to test with sudo addgroup --system testgroup1 # create user with their primary group as the above system group (user doesn't have to be system user, just don't have to fill in gecos) sudo adduser --system --ingroup testgroup1 testuser1 # create user with additional group as system group, their primary group in this case is nogroup sudo adduser --system testuser2 sudo usermod -a -G testgroup1 testuser2 # run simple app as first user sudo -u testuser1 /usr/bin/sleep 60000 # kill and create crash report sudo pkill -SEGV -f '^/usr/bin/sleep 60000' report="/var/crash/_usr_bin_sleep.$(id -u testuser1).crash" # wait a bit while report is generated sleep 2 # check resulting crash report, should print UserGroups: N/A sudo grep -H 'UserGroups:' $report # try apport-unpack sudo apport-unpack $report /tmp/crash1 # reset and try with other user rm "$report" sudo -u testuser2 /usr/bin/sleep 60000 sudo pkill -SEGV -f '^/usr/bin/sleep 60000' report="/var/crash/_usr_bin_sleep.$(id -u testuser2).crash" sleep 2 # should print UserGroups: testgroup1 sudo grep -H 'UserGroups:' "$report" sudo apport-unpack $report /tmp/crash2 -- 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: Fix Committed 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