jokkedk/webgrind

Call graph generation error

azilber opened this issue · 6 comments

Getting:

Unable to generate /mnt/html/webgrind/cachegrind-31997.NNNNNNNN.1482852448_340688.out-10.webgrind.svg via python: /usr/bin/python and dot: /usr/bin/dot. Please update config.php.

Both python and dot exist.

Using php 5.2.10

Same error when switching to png output:

/mnt/html/webgrind/cachegrind.out-0.webgrind.png

Unable to generate /mnt/html/webgrind/cachegrind.out-0.webgrind.png via python: /usr/bin/python and dot: /usr/bin/dot. Please update config.php.

More info:

/usr/bin/dot -V

dot - Graphviz version 2.12 (Fri Jan 10 10:42:59 UTC 2014)

/usr/bin/python -V

Python 2.4.3

Can you supply the file that fails to generate a call graph?

mavik commented

Maybe it is problem GraphViz within Apache: http://www.graphviz.org/content/FaqApache

No response, assuming resolved. Please re-open if not.

I am seeing the same issue. I pulled out the shell_exec command and tried it on its own...

pphan@dev-prp:~$ /usr/bin/python /var/www/webgrind/vendor/jokkedk/webgrind/library/gprof2dot.py -n 10 -f callgrind '/tmp/cachegrind.out.14087' > /tmp/gprof.tmp
Traceback (most recent call last):
  File "/var/www/webgrind/vendor/jokkedk/webgrind/library/gprof2dot.py", line 3185, in <module>
    main()
  File "/var/www/webgrind/vendor/jokkedk/webgrind/library/gprof2dot.py", line 3149, in main
    profile = parser.parse()
  File "/var/www/webgrind/vendor/jokkedk/webgrind/library/gprof2dot.py", line 1569, in parse
    self.profile.integrate(TOTAL_TIME_RATIO, TIME_RATIO)
  File "/var/www/webgrind/vendor/jokkedk/webgrind/library/gprof2dot.py", line 478, in integrate
    self._integrate_function(function, outevent, inevent)
  File "/var/www/webgrind/vendor/jokkedk/webgrind/library/gprof2dot.py", line 483, in _integrate_function
    return self._integrate_cycle(function.cycle, outevent, inevent)
  File "/var/www/webgrind/vendor/jokkedk/webgrind/library/gprof2dot.py", line 538, in _integrate_cycle
    assert abs(call_ratio*total - partial) <= 0.001*call_ratio*total
AssertionError

This is a known issue from the upstream library gprof2dot, that does not have a current plan for a fix. (If you think your case is different, please report on jrfonseca/gprof2dot.)