Bug reporting can fail if invalid characters are in Xorg.0.log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xdiagnose (Ubuntu) |
Fix Released
|
High
|
Bryce Harrington |
Bug Description
In raring we're using a new xorglog.py parser to extract info from the Xorg.0.log file.
However, parsing of this file will fail if it includes invalid data characters, and that failure will crash ubuntu-bug. It is uncommon for there to be invalid characters in Xorg.0.log, but it can happen sometimes via funky EDIDs for example.
The problem is not with the apport hook, but with python itself; this can be reproduced independently of apport:
$ python
Python 2.7.3 (default, Jan 6 2013, 12:15:04)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> buf = open('/
>>> len(buf)
26205
>>> ubuf = buf.decode('utf8')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
return codecs.
UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 10154: invalid start byte
>>> buf[10140:10180]
'tel(0): XX31G\x80B133XW1\n[ 27.376] (II)'
>>>
Also:
$ iconv -f UTF-8 /var/log/Xorg.0.log -o /dev/null
iconv: illegal input sequence at position 10154
The apport hook will need to catch this error, and bypass use of parsed log data if this happens.
This bug was fixed in the package xdiagnose - 3.4
---------------
xdiagnose (3.4) raring; urgency=low
* bin/xrotate: Add new script to manually rotate screen and input. source_ xorg.py: Gracefully skip Xorg.0.log parsing if the apport- gpu-error- intel.py: Gracefully skip DMI parsing if applet. py: Fix bug where a stray =1 gets added to CMDLINE_ LINUX_DEFAULT.
Designed for the Nexus 7 tablet; will need extended to support other
devices.
* bin/xedid: Add new script for viewing and installing EDID files into
firmware.
+ Fixes situation where EDID is unavailable, corrupted, or invalid
(LP: #575985)
+ Fixes situation where KVM corrupts the EDID the monitor provides.
(LP: #992346)
* bin/xpci: Fix two string issues so xpci will run.
(LP: #1098390)
* apport/
parsing fails.
(LP: #1098395)
* apport/
the parsing fails.
(LP: #1062042)
* xdiagnose/
GRUB_
(LP: #954123)
* tests: Add sample Xorg.*.log files rather than using the on-disk one
-- Bryce Harrington <email address hidden> Wed, 09 Jan 2013 18:17:24 -0800