Comment 0 for bug 368004

Revision history for this message
Martin Olsson (mnemo) wrote : apport-collect crashes when ran under certain locales

As part of the Ubuntu triage process I ask a lot of people to run "apport-collect bug_no". However, it seems that for a significant number of people this script crashes when they run it:

For example within the last hour, the happen for two persons already:
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/367694
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/367824

get fences failed: -1
param: 6, val: 0
Uploading additional information to Launchpad bug...
   short text data...
   attachment: Dependencies.txt...
   attachment: LsHal.gz...
Traceback (most recent call last):
  File "/usr/bin/apport-collect", line 173, in <module>
    upload(report, bug)
  File "/usr/bin/apport-collect", line 97, in upload
    filename=part.get_filename(), is_patch=False)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/resource.py", line 337, in __call__
    args[key] = simplejson.dumps(value, cls=DatetimeJSONEncoder)
  File "/var/lib/python-support/python2.6/simplejson/__init__.py", line 243, in dumps
    **kw).encode(obj)
  File "/var/lib/python-support/python2.6/simplejson/encoder.py", line 360, in encode
    return encode_basestring_ascii(o)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 1: unexpected code byte

And also this one:
Collecting apport information for source package xorg...
hook /usr/share/apport/package-hooks//source_xorg.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport/report.py", line 570, in add_hooks_info
    symb['add_info'](self)
  File "/usr/share/apport/package-hooks//source_xorg.py", line 104, in add_info
    report['fglrx-loaded'] = matches
  File "/usr/lib/python2.6/dist-packages/problem_report.py", line 479, in __setitem__
    assert k.replace('.', '').isalnum()
AssertionError
Uploading additional information to Launchpad bug...
   short text data...
   attachment: Dependencies.txt...
   attachment: LsHal.txt...
   attachment: LsMod.txt...
   attachment: LsPci.txt...
   attachment: XorgConf.txt...
   attachment: XorgLog.txt...
Traceback (most recent call last):
  File "/usr/bin/apport-collect", line 173, in <module>
    upload(report, bug)
  File "/usr/bin/apport-collect", line 97, in upload
    filename=part.get_filename(), is_patch=False)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/resource.py", line 337, in __call__
    args[key] = simplejson.dumps(value, cls=DatetimeJSONEncoder)
  File "/var/lib/python-support/python2.6/simplejson/__init__.py", line 243, in dumps
    **kw).encode(obj)
  File "/var/lib/python-support/python2.6/simplejson/encoder.py", line 360, in encode
    return encode_basestring_ascii(o)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x81 in position 12396: unexpected code byte