pybootchartgui raises IndexError

Bug #1381177 reported by Max Brustkern
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
pybootchartgui (Ubuntu)
Fix Released
Critical
Barry Warsaw

Bug Description

The automated bootspeed testing runs a command like this:
bootchart --quiet --format=png --crop-after=gnome-panel,mutter,unity-panel-service --annotate=ureadahead,mountall,hostname,hwclock --annotate=Xorg --annotate=gnome-session --annotate-file=/var/lib/bootspeed-results/times --output=/var/lib/bootspeed-results/bootchart.png /var/lib/bootspeed-results/bootchart.tgz

It fails with this stderr:
    /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
      warnings.warn(str(e), _gtk.Warning)
    Traceback (most recent call last):
      File "/usr/bin/bootchart", line 23, in <module>
        sys.exit(main())
      File "/usr/lib/pymodules/python2.7/pybootchartgui/main.py", line 111, in main
        options.crop_after, options.annotate)
      File "/usr/lib/pymodules/python2.7/pybootchartgui/parsing.py", line 248, in parse
        state = parse_paths(writer, ParserState(), paths)
      File "/usr/lib/pymodules/python2.7/pybootchartgui/parsing.py", line 237, in parse_paths
        state = _do_parse(writer, state, name, tf.extractfile(name))
      File "/usr/lib/pymodules/python2.7/pybootchartgui/parsing.py", line 201, in _do_parse
        state.ps_stats = _parse_proc_ps_log(writer, file)
      File "/usr/lib/pymodules/python2.7/pybootchartgui/parsing.py", line 78, in _parse_proc_ps_log
        userCpu, sysCpu, stime= int(tokens[13+offset]), int(tokens[14+offset]), int(tokens[21+offset])
    IndexError: list index out of range
    /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
      warnings.warn(str(e), _gtk.Warning)
    Traceback (most recent call last):
      File "/usr/bin/bootchart", line 23, in <module>
        sys.exit(main())
      File "/usr/lib/pymodules/python2.7/pybootchartgui/main.py", line 111, in main
        options.crop_after, options.annotate)
      File "/usr/lib/pymodules/python2.7/pybootchartgui/parsing.py", line 248, in parse
        state = parse_paths(writer, ParserState(), paths)
      File "/usr/lib/pymodules/python2.7/pybootchartgui/parsing.py", line 237, in parse_paths
        state = _do_parse(writer, state, name, tf.extractfile(name))
      File "/usr/lib/pymodules/python2.7/pybootchartgui/parsing.py", line 201, in _do_parse
        state.ps_stats = _parse_proc_ps_log(writer, file)
      File "/usr/lib/pymodules/python2.7/pybootchartgui/parsing.py", line 78, in _parse_proc_ps_log
        userCpu, sysCpu, stime= int(tokens[13+offset]), int(tokens[14+offset]), int(tokens[21+offset])
    IndexError: list index out of range

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: bootchart 0.90.2-8ubuntu2
ProcVersionSignature: Ubuntu 3.16.0-22.29-generic 3.16.4
Uname: Linux 3.16.0-22-generic i686
ApportVersion: 2.14.7-0ubuntu6
Architecture: i386
Date: Tue Oct 14 18:34:38 2014
SourcePackage: bootchart
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Max Brustkern (nuclearbob) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :

This is blocking the QA boot tests, so I'm raising it to critical

Changed in bootchart (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in bootchart (Ubuntu):
status: New → Confirmed
Barry Warsaw (barry)
no longer affects: bootchart (Ubuntu)
Barry Warsaw (barry)
Changed in pybootchartgui (Ubuntu):
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Barry Warsaw (barry)
milestone: none → ubuntu-15.04
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pybootchartgui - 0+r141-0ubuntu4

---------------
pybootchartgui (0+r141-0ubuntu4) vivid; urgency=medium

  * d/patches/p1381177.patch: Check the length of the token to make sure
    it is non-empty before trying to index the last character. Avoids an
    IndexError. (LP: #1381177)
 -- Barry Warsaw <email address hidden> Mon, 03 Nov 2014 19:36:43 -0500

Changed in pybootchartgui (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Oliver Grawert (ogra) wrote :

unrelated to this bug, but why are you not using phablet-bootchart, which was developed with CI involvement to make sure to get you a proper bootchart (and make sure to not taint the images with test packages installed (of which some can add up to 2min to the boot)

using phablet-bootchart from a trusty server with devices attached against a mako device results in http://people.canonical.com/~ogra/ubuntu-phablet-vivid-8.png

seemingly pheblet-bootchart needs this fix landed which i will try to get into the phablet-tools PPA today https://code.launchpad.net/~ogra/phablet-tools/phablet-bootchart-fix/+merge/240564

summary: - bootchart raises IndexError
+ pybootchartgui raises IndexError
Revision history for this message
Barry Warsaw (barry) wrote : Re: [Bug 1381177] Re: bootchart raises IndexError

On Nov 04, 2014, at 12:18 PM, Oliver Grawert wrote:

>unrelated to this bug, but why are you not using phablet-bootchart,

This was just a quick fix for thomi and nuclearbob, so I can't answer your
question. ;)

Revision history for this message
Max Brustkern (nuclearbob) wrote :

We're not using phablet-bootchart here because this is desktop bootspeed testing. The phablet bootspeed testing is configured to use phablet-bootchart, and should work better once that fix lands.

Revision history for this message
Christopher Lee (veebers) wrote :

I tried this fixed package (admittedly using the .deb on my Utopic machine) on this file [1] using the command at the top of this bug I receive this error:[2]

[1] http://q-jenkins.ubuntu-ci:8080/view/bootspeed/job/bootspeed-utopic-desktop-amd64-acer-veriton-01/129/artifact/1/bootchart.tgz

[2] http://pastebin.ubuntu.com/8858066/

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.