Comment 0 for bug 1281086

Revision history for this message
Daniel Hahler (blueyed) wrote : Apport might crash when clearing environment (via os.environ.clear() with empty environ key)

% ubuntu-bug apport
Traceback (most recent call last):
  File "/usr/share/apport/apport-gtk", line 590, in <module>
    app.run_argv()
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 654, in run_argv
    return self.run_report_bug()
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 456, in run_report_bug
    self.collect_info(symptom_script)
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 1031, in collect_info
    os.environ.clear()
  File "/usr/lib/python3.3/collections/abc.py", line 553, in clear
    self.popitem()
  File "/usr/lib/python3.3/collections/abc.py", line 546, in popitem
    del self[key]
  File "/usr/lib/python3.3/os.py", line 687, in __delitem__
    self.unsetenv(encodedkey)
OSError: [Errno 22] Invalid argument

Looking at the output of `os.environ`, there is a odd entry (key '').

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: apport 2.12.5-0ubuntu2.2
ProcVersionSignature: Ubuntu 3.11.0-15.25-generic 3.11.10
Uname: Linux 3.11.0-15-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
CrashReports:
 640:1000:114:120104180:2014-02-13 00:58:41.677010970 +0100:2014-02-13 00:57:20.989009053 +0100:/var/crash/_opt_firefox_firefox.1000.crash
 640:1000:114:63870076:2014-02-13 00:00:35.972928127 +0100:2014-02-12 23:59:49.260927017 +0100:/var/crash/_usr_lib_firefox_firefox.1000.crash
 640:1000:114:14175879:2014-02-09 10:23:03.104148831 +0100:2014-02-09 10:22:57.576148699 +0100:/var/crash/_usr_bin_nautilus.1000.crash
Date: Mon Feb 17 13:41:48 2014
InstallationDate: Installed on 2012-05-28 (629 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: apport
UpgradeStatus: Upgraded to saucy on 2013-10-08 (131 days ago)
modified.conffile..etc.default.apport: [modified]
mtime.conffile..etc.default.apport: 2014-02-13T00:58:07.609010