Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 453866 - rrdcgi adds spurious '/var' to terminal pathname
Summary: rrdcgi adds spurious '/var' to terminal pathname
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rrdtool
Version: 8
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Chris Ricker
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-02 22:54 UTC by Need Real Name
Modified: 2008-09-11 17:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-09-11 17:02:38 UTC


Attachments (Terms of Use)

Description Need Real Name 2008-07-02 22:54:15 UTC
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

Comment 1 Need Real Name 2008-07-02 23:02:22 UTC
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!

Comment 2 Need Real Name 2008-07-02 23:26:45 UTC
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


Comment 3 Need Real Name 2008-07-14 06:13:24 UTC
IS THE MAINTAINER FOLLOWING THIS????

Comment 4 Chris Ricker 2008-07-22 13:14:29 UTC
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?

Comment 5 Need Real Name 2008-07-22 14:37:01 UTC
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

Comment 6 Need Real Name 2008-08-07 19:25:44 UTC
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

Comment 7 Need Real Name 2008-08-17 00:56:18 UTC
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.

Comment 8 Need Real Name 2008-09-04 16:33:40 UTC
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?

Comment 9 Jarod Wilson 2008-09-04 20:41:27 UTC
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

Comment 10 Jarod Wilson 2008-09-07 03:35:45 UTC
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).

Comment 11 Fedora Update System 2008-09-07 03:37:28 UTC
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

Comment 12 Fedora Update System 2008-09-07 03:37:31 UTC
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

Comment 13 Fedora Update System 2008-09-11 17:02:34 UTC
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.

Comment 14 Fedora Update System 2008-09-11 17:05:56 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.