Ticket #270 (closed defect: for support check mailinglist)

Opened 20 months ago

Last modified 11 months ago

OOPS: Cairo has issues it can't even die: out of memory

Reported by: human Owned by: oetiker
Priority: major Milestone:
Component: rrd_graph Version: 1.4.4
Keywords: rrdgraph OOPS cairo Cc: kabe@…

Description

rrdgraph chokes on some CPU graph generated by munin saying "OOPS: Cairo has issues it can't even die: out of memory"

I've drilled down to the Cairo function gfx_close_path() in rrd_graph.c:graph_paint(), starting to allocate memory to death. Eventually the 2GB limit per process is reached and the memory allocation returns error. (Tester may need "ulimit -v 2097152" to simulate 2GB cap on other OS)

Since this seems to be Cairo issue, rrdtool may not be able to do much. Perhaps should check to not feed bogus data?

The attached sample data seems to have unusual extreme spikes perhaps due to DERIVE data collection.

OS: CentOS 5.4

Other packages: cairo-1.2.4-5.el5 pango-1.14.9-6.el5.centos rrdtool-1.4.99910062100 (SVN snapshot)

Attachments

oops.tar.gz Download (76.6 KB) - added by human 20 months ago.
sample RRD and script
oops-dump.tar.bz2 Download (111.4 KB) - added by human 20 months ago.
rrddump of the sample RRDs

Change History

Changed 20 months ago by human

sample RRD and script

Changed 20 months ago by human

rrddump of the sample RRDs

comment:1 Changed 20 months ago by oetiker

  • Status changed from new to closed
  • Resolution set to worksforme

well I just tried and here it works without any problem. My guess is that the solution lies in using a bit more recent versions of pango/cairo. Here I have pango 1.24.1 and cairo 1.8.6 ...

cheers tobi

comment:2 follow-up: ↓ 3 Changed 12 months ago by human

  • Status changed from closed to reopened
  • Version changed from 1.4.3 to 1.4.4
  • Resolution worksforme deleted

I think I tracked down the issue. The error message "OOPS: Cairo has issues it can't even die: out of memory" appears in my case only when the two following conditions are true:

  • imgformat is any of SVG|EPS|PDF
  • rrdgraph tries to write into a file where it doesn't have write permissions

tell me if you can reproduce this behaviour

comment:3 in reply to: ↑ 2 Changed 12 months ago by human

kabe#: Replying to human:

appears in my case only when the two following conditions are true:

  • imgformat is any of SVG|EPS|PDF
  • rrdgraph tries to write into a file where it doesn't have write permissions

Above does emit OOPS, but it seems to tickle a different bug (in Cairo?),since

  • the above instantly issues OOPS, but
  • the original ticket issues OOPS after eating up 2GB process limit

The ticket status seems to be still WORKSFORME. Thanks anyway for pinning it down.

comment:4 Changed 11 months ago by oetiker

  • Status changed from reopened to closed
  • Resolution set to worksforme

If the output file is not writeable you get:

OOPS: Cairo has issues it can't even die: error while writing to output stream

which seems appropriate to me ...

also if you old versions of cairo/pango on your system, there are bound to be problems with the more fancy output variants (lots got fixed there in recent times) you may want to use the rrdbuild document for guidance on how to compile the stuff yourself.

comment:5 Changed 11 months ago by human

  • Status changed from closed to reopened
  • Resolution worksforme deleted

That happens ONLY with RRDtool 1.4.4 and 1.4.5 over CentOS 5.5 x86_64.

The error ONLY happens if you try to execute the command "rrdtool graph" using --imgformat SVG (or --imgformat PDF).

The important thing here is that recent linux distributions like Fedora, Ubuntu and even MacOS X (which have a more recent version of cairo library) don't experience that problem. That only happens on CentOS, at least for me and the person who opened that bug.

Any workaround ?

Upgrading pango/cairo could solve the problem ? If yes, can anyone guide me on how to do that on CentOS 5.5, without break something else ?

comment:6 Changed 11 months ago by oetiker

  • Status changed from reopened to closed
  • Resolution set to for support check mailinglist

on the rrdtool website you find instructions for compiling a current version of cairo/pango ... also, for support please use the mailinglist.

Note: See TracTickets for help on using tickets.

NOTE: The content of this website is accessible with any browser. The graphical design though relies completely on CSS2 styles. If you see this text, this means that your browser does not support CSS2. Consider upgrading to a standard conformant browser like Mozilla Firefox or Opera but also Apple's Safari or KDE's Konqueror for example. It may also be that you are looking at a mirror page which did not copy the CSS for this page. Or if some pictu res are missing, then the mirror may not have picked up the contents of the inc directory.