Comment 16 for bug 1427600

Revision history for this message
Nicholas Schell (nschell) wrote :

Unfortunately the fix you added by inserting an empty space string ' ' for the UserGroups field does not resolve the bug at all. This is because when reading the report in (problem_report.py) all fields which are empty get ignored, and a field which is all whitespace counts as empty. Prior to the fix the report already contained the UserGroups field, it just didn't have an empty space after it. So nothing really changed.

This is the new stacktrace when running apport-unpack with a crash report generated with the fixed report.py

Traceback (most recent call last):
  File "/usr/bin/apport-unpack", line 77, in <module>
    pr.extract_keys(f, bin_keys, dir)
  File "/usr/lib/python3/dist-packages/problem_report.py", line 269, in extract_keys
    raise ValueError('%s has no binary content' %
ValueError: ['UserGroups'] has no binary content

The UserGroups field can't be empty. For example if I add a group in the UserGroups field, apport-unpack runs without errors. This is my current fix to not deal with the constant stacktrace from apport-unpack.

sed -i -E 's/(UserGroups:)/\1 nogroup/' /var/crash/_crashfile