Public bug reported: Binary package hint: bootchart
Description: Ubuntu 8.04.1 Release: 8.04 bootchart: Installed: 0.9-0ubuntu7 Candidate: 0.9-0ubuntu7 Version table: *** 0.9-0ubuntu7 0 500 http://nl.archive.ubuntu.com hardy/main Packages 100 /var/lib/dpkg/status The bug: ----------- In /etc/init.d/stop-bootchart the line: /usr/bin/java -jar /usr/share/bootchart/bootchart.jar sometimes crashes with the following message: Parsing /var/log/bootchart.tgz Exception in thread "main" java.lang.NullPointerException at org.bootchart.parser.linux.ProcStatParser.parseLog(Unknown Source) at org.bootchart.Main.render(Unknown Source) at org.bootchart.Main.main(Unknown Source) Analysis: ----------- I have traced this back to bootchart.jar actually having problems parsing the log files in /var/log/bootchart.tgz where each time this occurs, one of the three files lacks a complete record. The last line of such a file allways contains an uptime entry and is not followed by the content of either /proc/stat, /proc/diskstats, proc/*/stat of that moment. It seems that the shell function "stop_bootchart()" in /etc/init.d/stop- bootchart sometimes has a timing issue, where it kills the bootchart logging right after the uptime is inserted in the log. On my Via C3 500MHz system, this situation seems to occur regularly, whereas on my workstation this happened only three or four times in the last couple of months. Proposed solution: ------------------------ I'd like to propose a patch for /usr/share/initramfs-tools/scripts/init-top/bootchart which basicly turns: sed -e "s/ [0-9].*//;s/\.//" < /proc/uptime cat /proc/stat into: sed -e "s/ [0-9].*//;s/\.//" < /proc/uptime | cat - /proc/stat With this change I haven't had any bootchart generation failures whatsoever. ** Affects: bootchart (Ubuntu) Importance: Undecided Status: New -- bootchart.jar crashes on generated bootchart.tgz https://bugs.launchpad.net/bugs/254954 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs