xrmx / bootchart

merge of bootchart-collector and pybootchartgui
GNU General Public License v2.0
234 stars 88 forks source link

MemoryError while rendering #9

Closed xrmx closed 14 years ago

xrmx commented 14 years ago

This is bootchart2 0.12.3

The data has been collected on armel, both armel machine and my x86 desktop gave the same error while running pybootchargui.

python /usr/lib/python2.6/site-packages/pybootchartgui/main.py ~/src/moko/bootchart.tgz parsing '/home/rm/src/moko/bootchart.tgz' parsing 'header' parsing 'dmesg' parsing 'cmdline2.log' parsing 'paternity.log' parsing 'proc_cpuinfo.log' parsing 'proc_diskstats.log' parsing 'proc_stat.log' parsing 'taskstats.log' merged 0 logger processes pruned 805 process, 0 exploders, 137 threads, and 6 runs Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/pybootchartgui/main.py", line 161, in sys.exit(main()) File "/usr/lib/python2.6/site-packages/pybootchartgui/main.py", line 152, in main render() File "/usr/lib/python2.6/site-packages/pybootchartgui/main.py", line 143, in render batch.render(writer, res, options, filename) File "/usr/lib/python2.6/site-packages/pybootchartgui/batch.py", line 39, in render surface = make_surface (w, h) File "/usr/lib/python2.6/site-packages/pybootchartgui/batch.py", line 21, in "png": (lambda w, h: cairo.ImageSurface(cairo.FORMAT_ARGB32, w, h), \ MemoryError

xrmx commented 14 years ago

bootchart.tgz available here http://people.freedesktop.org/~rm/moko/bootchart.tgz

xrmx commented 14 years ago

these are the width and the height passed to make_surface in batch.py:render(), no wonder it explodes :) 1073728892 3708

xrmx commented 14 years ago

i've noticed that in dmesg i have a huge diff between 0 and when the clocks is available (21474536.485000) so this huge delta may introduce the huge graph. So maybe we can add a threshold, say 1 sec to see if the cloks if fscked. If the first non-zero timestamp is bigger than that we use a delta to the first non-zero timestamp instead of the timestamp itself?

xrmx commented 14 years ago

Fixed this in my tree here: http://github.com/xrmx/bootchart/commit/25f4312b517b43539975e225d11801ad3eb946a4

Found another divide by zero: http://github.com/xrmx/bootchart/commit/dbd7246339291084d4a002e1637b97bddad32deb

I'm not pushing them to your tree yet because the bootchart.png looks suspicious, another couple of eyes would be appreciated.

xrmx commented 14 years ago

This is now fixed in master, closing.