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

Bug #1427600 reported by Iain Lane on 2015-03-03
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Low
Unassigned
Xenial
Low
Unassigned

Bug Description

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: Bug
DistroRelease: 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: all
SourcePackage: apport
UpgradeStatus: Upgraded to vivid on 2013-05-07 (665 days ago)

Iain Lane (laney) wrote :

I get this, too, with a .crash file from qemu that for some reason seems to be truncated after the USerGroups section !?

Attaching the .crash file causing this issue.

[apport-bug also has issues with this file.]

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apport (Ubuntu):
status: New → Confirmed

nazgul@rivendell:~$ dpkg -la apport
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name Version Architektur Beschreibung
+++-=========================================-=========================-=========================-========================================================================================
ii apport 2.17.1-0ubuntu2 all automatically generate crash reports for debugging

Changed in apport (Ubuntu):
importance: Undecided → High
Stefan Bader (smb) wrote :

I run into the same while debugging some crash of a daemon in Xenial. Installation is a server install. I cannot say whether the unpack fully completes. Fortunately the core file gets extracted at least.

Ubuntu 15.10, apport 2.19.1-0ubuntu5. Trying to unpack to a non-existing directory. Get

     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])

    $ grep UserGroups /var/crash/_usr_bin_hhvm.33.crash | cat -A
    UserGroups: $
    $

Brian Murray (brian-murray) wrote :

This happens when a crash file is corrupt and does not have any data for a given key. What type of behavior would you expect or prefer in this case?

https://bazaar.launchpad.net/~apport-hackers/apport/trunk/view/head:/problem_report.py#L208

See the raised ValueError for how this occurs.

Changed in apport (Ubuntu Xenial):
status: Confirmed → Incomplete
importance: High → Low
Iain Lane (laney) wrote :

Umm, don't know, probably print a warning instead of the traceback. Not sure about the exit status - I guess a non zero one is a good idea?

Launchpad Janitor (janitor) wrote :

[Expired for apport (Ubuntu) because there has been no activity for 60 days.]

Changed in apport (Ubuntu):
status: Incomplete → Expired
Launchpad Janitor (janitor) wrote :

[Expired for apport (Ubuntu Xenial) because there has been no activity for 60 days.]

Changed in apport (Ubuntu Xenial):
status: Incomplete → Expired
Changed in apport (Ubuntu):
status: Expired → Triaged
Changed in apport (Ubuntu Xenial):
status: Expired → Triaged

To my way of thinking, an exception is for something the programmer did not foresee. Since this is now a known failure mode of Apport, I would expect - in an ideal world in which there was enough time to work on all known bugs - a clean exit with a clear error message.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers