Description of problem: After upgrading rrdtool to rrdtool-1.3.0-1.fc8.i386.rpm, I started getting apache server errors every time I tried to look at a graph generated using rrdcgi. In particular, sensord.cgi started generating errors of form: [error] [client 127.0.0.1] File does not exist: /var/www/html/sensord/pix/var, referer: http://127.0.0.1:8145/sensord/sensord.cgi Where the relevant line in the sensord.cgi file is: <RRD::GRAPH /var/www/html/sensord/pix/daily-temperature.png --imginfo '<IMG SRC=/sensord/pix/%s WIDTH=%lu HEIGHT=%lu>' ... ... For some reason, rrdcgi is adding on the meaningless terminal path "/var" at the END of the pathname. This occurs also if I use the relative path: <RRD::GRAPH /var/www/html/sensord/pix/daily-temperature.png --imginfo '<IMG SRC=pix/%s WIDTH=%lu HEIGHT=%lu>' Additional info: In the future, please also coordinate upgrades with other packages that have librrd as a dependency. This last upgrade caused conflicts with lm_sensors which depended on an /usr/lib/librrd.so.4
Just to clarify, the error message makes it seem like I had given the SRC as: <IMG SRC=/sensord/pix/var/%s WIDTH=%lu HEIGHT=%lu>' But there is no extra 'var' in my cgi file so I do not know where it is coming from!
OK. Did some more troubleshooting. Actually, SRC=/sensord/pix/%s is looking for /var/www/html/sensord/var/www/html/sensord/pix. In fact, if you do: <IMG SRC=/..any path../%s it ends up looking for: /var/www/html/..any path../var/www/html/sensord/%s And if you do: <IMG SRC=...any path.../%s It ends up looking for: /var/www/html/sensord/..any path../var/www/html/sensord/%s So basically, it is adding an extra terminal /var/www/html/sensord to all paths! The following clipped cgi script should be sufficient to demonstrate the problem: #!/usr/bin/rrdcgi <HTML> <BODY> <RRD::GRAPH /var/www/html/sensord/pix/daily-temperature.png --imginfo '<IMG SRC=/sensord/%s WIDTH=%lu HEIGHT=%lu>'> </BODY> </HTML> which gives the error: [error] [client 127.0.0.1] File does not exist: /var/www/html/sensord/var, referer: http://127.0.0.1:8145/sensord/sensord2.cgi
IS THE MAINTAINER FOLLOWING THIS????
Do #!/usr/bin/rrdcgi <HTML> <BODY> <RRD::GRAPH /sensord/pix/daily-temperature.png --imginfo '<IMG SRC=%s WIDTH=%lu HEIGHT=%lu>'> </BODY> </HTML> instead -- does that work for you?
This works partly -- in that it works as long as there is only ONE <RRD::GRAPH> stanza or as long as you don't have any data lines. If I use the following minimalist example of an <RRD::GRAPH> stanza with data: <RRD::GRAPH /sensord/pix/daily-rpm.png --imginfo '<IMG SRC=%s WIDTH=%lu HEIGHT=%lu>' DEF:fan2=/var/log/sensors.rrd:fan2:AVERAGE LINE2:fan2#200854:"Power Fan"> Then it works when I use it alone but as soon as I add second <RRD::GRAPH> stanza, I get the following error: "The server encountered an internal error or misconfiguration and was unable to complete your request." The http error_log give a LONG error message listing: [Tue Jul 22 10:08:19 2008] [error] [client 127.0.0.1] b7fce000-b7fd3000 r--s 00\ 000000 08:07 1733695 /var/cache/fontconfig/33315028185e8b9ecf55d3c7f93d9205-\ x86.cache-2 [Tue Jul 22 10:08:19 2008] [error] [client 127.0.0.1] b7fd3000-b7fdb000 r--s 00\ 000000 08:07 1733693 /var/cache/fontconfig/e19de935dec46bbf3ed114ee4965548a-\ x86.cache-2 [Tue Jul 22 10:08:19 2008] [error] [client 127.0.0.1] b7fdb000-b7fe1000 rw-p b7\ fdb000 00:00 0 [Tue Jul 22 10:08:19 2008] [error] [client 127.0.0.1] b7fe5000-b7fe7000 r--s 00\ 000000 08:07 1733694 /var/cache/fontconfig/e3ead4b767b8819993a6fa3ae306afa9-\ x86.cache-2 [Tue Jul 22 10:08:19 2008] [error] [client 127.0.0.1] b7fe7000-b7fea000 r--s 00\ 000000 08:07 1734327 /var/cache/fontconfig/d04038e664b0033ae700a78c51f179d3-\ x86.cache-2 [Tue Jul 22 10:08:19 2008] [error] [client 127.0.0.1] b7fea000-b7fef000 r--s 00\ 000000 08:07 [Tue Jul 22 10:08:19 2008] [error] [client 127.0.0.1] 1734321 /var/cache/fon\ tconfig/beeeeb3dfe132a8a0633a017c99ce0c0-x86.cache-2 [Tue Jul 22 10:08:19 2008] [error] [client 127.0.0.1] b7fef000-b7ff6000 r--s 00\ 000000 08:07 1014731 /usr/lib/gconv/gconv-modules.cache [Tue Jul 22 10:08:19 2008] [error] [client 127.0.0.1] bf8e0000-bf8f5000 rw-p bf\ feb000 00:00 0 [stack] [Tue Jul 22 10:08:19 2008] [error] [client 127.0.0.1] Premature end of script h\ eaders: crap.cgi [Tue Jul 22 10:11:38 2008] [error] [client 127.0.0.1] *** glibc detected *** /u\ sr/bin/rrdcgi: double free or corruption (out): 0x088c5b48 *** ..... Not sure what is going on here in that one stanza works, but two doesn't. Note that this error DOESN'T occur in the old version. Also, more fundamentally it's not clear to me why we are changing the file referencing paradigm that breaks earlier cgi scripts. In particular, this also breaks the 'sensord -g' functionality which still generates cgi scripts with the older referencing standard. So, I'm still left with the following two issues: 1. rrdcgi doesn't work with more than one stanza 2. even if that issue is fixed, the new version still breaks backward compatibility and in particular, breaks the lm_sensors-sensord package Finally, has any else tried to use the rrdcgi functionality and got it working in a similar situation? Thanks
I really think this is BROKEN and needs to be fixed - rrd cgi scripts are basically useless for me now. Has anyone tried to troubleshoot or reproduce yet? Thanks
IS ANYBODY FOLLOWING THIS THREAD? As reported 45 days ago, the latest update to rrd BROKE the use of cgi scripts which seems to be a pretty fatal flaw. Please either: 1. Fix the bug 2. Revert to previous working version 3. Explain why this is not a bug and why it doesn't need to be addressed Thanks! BTW my guess is that the problem is a simple config error where the basenames for the cgi directories is set wrong.
IS ANYBODY HOME? It has been more than 2 months and nobody seems to have paid any serious atention to this bug which makes rrdcgi UNUSABLE. This is a clear example of where a new version broke old functionality without any clearly stated benefits. Is the maintainer paying any attention? Where is QA?
Two suggestions: 1) try the 1.3.1 build in updates-testing, perhaps its been fixed upstream 2) if its not fixed in 1.3.1, open a bug in upstream's trac, tobi generally does a fair job of fixing things quickly, once he's aware of them
Looks like the just-released rrdtool 1.3.2 contains the fix for this bug. I've built it for rawhide, f9 and f8, will push it into updates shortly (also fixes a potential data corrupter).
rrdtool-1.3.2-1.fc9 has been submitted as an update for Fedora 9. http://admin.fedoraproject.org/updates/rrdtool-1.3.2-1.fc9
rrdtool-1.3.2-1.fc8 has been submitted as an update for Fedora 8. http://admin.fedoraproject.org/updates/rrdtool-1.3.2-1.fc8
rrdtool-1.3.2-1.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.
rrdtool-1.3.2-1.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.