Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 245331 - stabilise net-analyzer/rrdtool-1.2.28-r1 (rrdtool-1.2.28 breaks graphics generation in net-analyzer/cacti (at least versions 0.8.7b-r2 and 0.8.7b-r3))
Summary: stabilise net-analyzer/rrdtool-1.2.28-r1 (rrdtool-1.2.28 breaks graphics gene...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords: STABLEREQ
Depends on:
Blocks:
 
Reported: 2008-11-02 22:09 UTC by Thomas Beutin
Modified: 2008-11-29 15:24 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
example of a broken image (image-1.png,28.51 KB, image/png)
2008-11-02 22:11 UTC, Thomas Beutin
Details
example of a correct image (image-2.png,43.11 KB, image/png)
2008-11-02 22:13 UTC, Thomas Beutin
Details
rrdtool-1.2.28-revert-font-fix.patch (rrdtool-1.2.28-revert-font-fix.patch,1.27 KB, patch)
2008-11-04 14:59 UTC, Peter Volkov (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Beutin 2008-11-02 22:09:44 UTC
The package net-analyzer/rrdtool-1.2.28 breaks graphics generation in net-analyzer/cacti (at least for versions 0.8.7b-r2 and 0.8.7b-r3 and 0.8.7b [which is not longer in portage]). Downgrade to net-analyzer/rrdtool-1.2.27-r1 fixes the problem.



Reproducible: Always

Steps to Reproduce:
1. emerge =net-analyzer/rrdtool-1.2.27-r1 =net-analyzer/cacti-0.8.7b-r3
2. install and check it
3. emerge =net-analyzer/rrdtool-1.2.28
4. check it again (or see attached image-1.png)

Actual Results:  
broken graphics - see attached image-1.png

Expected Results:  
images like the attached image-2.png

Portage 2.1.4.5 (default/linux/amd64/2008.0/server, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3700+
Timestamp of tree: Sun, 02 Nov 2008 00:20:01 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg candy digest distlocks metadata-transfer notitles sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.manitu.net/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en de fr"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=180"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://mirror.manitu.net/gentoo-portage"
USE="X509 aalib accounting acl adns aim amd64 ansi apache2 authdaemond authfile automount bacula-console bash-completion bcmath berkdb bidi bind-mysql bzip2 calendar caps ccache cdb cgi chipcard chroot command-args courier cpudetection cpulimit cracklib crypt cscope css csv ctype cups curl curlwrappers customlog cvsgraph cyrus dba dbi dbm dbx devmap dhcp dlopen dnsdb ecc exif expat fam fastcgi ffmpeg flac flash flatfile fpx ftp gd gdbm geoip gif gmp graphviz gs gssapi gzip hardened hardenedphp hpn http iconv icq idea idled idn imagemagick imap imlib imlib2 inifile innodb ipalias ipv6 jabber jbig jpeg jpeg2k lcms ldap libwww lm_sensors lmtp logrotate logwatch mailbox maildir maildrop mailwrapper mbox mcal memlimit mgetty mhash milter mime mimencode ming mmap mmx mpeg mpi mpm-prefork mppe-mppc multilib mysql mysqli nagios-dns nagios-game nagios-ntp nagios-ping nagios-ssh ncurses netboot network nfs nis nls nntp nothreads nptl nptlonly oav odbc ogg oggvorbis openssh openssl pam pam_chroot pam_timestamp parse-clocks pcntl pcre pdf pdfkit pdflib perl php pic png posix postfix postgres procmail pwdb python qdbm quotas radius readline recode reiserfs rrdtool rss sample sasl screen sendfile sensord session sftp sftplogging shaper shared sharedext sharedmem simplexml slang slp smartcard smime smp sms smtp snmp snortsam soap sockets socks5 spamassassin spell sql sqlite sqlite3 sse ssl stream subversion svg sysfs syslog sysvipc tcpd theora tidy tiff tokenizer transparent-proxy truetype truetype-fonts type1-fonts unicode userlocales utf8 vhosts vim-syntax virtual-users virus-scan wddx withsamplescripts wmf xattr xfs xinetd xml xml2 xmlrpc xpm xsl xslt xvid yahoo yaz zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="access auth auth_basic authn_dbm dbd ident imagemap authn_dbd authn_file authn_default authz_groupfile auth_anon authz_dbm authz_owner authz_default authz_user auth_digest authz_host alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in deflate filter mime_magic cern_meta proxy_ajp proxy_balancer expires headers usertrack proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav_lock dav-fs vhost_alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so unique_id" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de fr" USERLAND="GNU" VIDEO_CARDS="vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Thomas Beutin 2008-11-02 22:11:15 UTC
Created attachment 170576 [details]
example of a broken image
Comment 2 Thomas Beutin 2008-11-02 22:13:06 UTC
Created attachment 170578 [details]
example of a correct image
Comment 3 Rainer Ruecker 2008-11-03 04:15:20 UTC
There is the following notice in the CHANGES for rrdtool-1.2.28:

       * src/rrd_graph.c, trunk/program/src/rrd_graph.c: fix for --font bug
         (font names wer not being picked up at all). Bug reported by
         Dmitry B. Bigunayk


Apparently "rrdtool graph" does not adhere to its own default font setting in this version and cacti relies on rrdtool generating the pictures with the default-font when there are no specific fonts configured in cacti. 

(More precise: librrd.so.2 is the component controlling the font stuff...)


The log of the compile for rrdtool shows 

-DRRD_DEFAULT_FONT=\"/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf\"

and this fontfile is installed in the correct place after emerging rrdtool.

Doing a "strace -e open" with one of the calls to "rrdtool graph" generated by cacti with the arguments 
"--font TITLE:8: --font AXIS:8: --font LEGEND:8: --font UNIT:8:"

shows 
 
open(""), O_RDONLY) = -1 ENOENT (No such file or directory)

in all places where the default, compiled-in fontfile should be opened.

Running "rrdtool graph" with

"--font TITLE:8 --font AXIS:8 --font LEGEND:8 --font UNIT:8"

generates graphs with the default-font.

(This should generate an error, see  src/rrd_graph.c lines 3511 - 3519:

...
if (strlen(optarg) > end){
   if (optarg[end] == ':'){
      sttrncpy(im->text_prop[propidx].font,optarg+end+1,255);
      im->text_prop[propidx].font[255] = '\0';
   } else {
      rrd_set_error("expected : after font size in '%s'",optarg);
     return;
   }
}

...)

Also, if fonts are explicitly specified in the cacti-settings (Console->Configuration->Settings->(Tab)Visual)
all is well and the graphs are generated with title and legend.
(If you turn on the graph debug-mode in cacti you can see that the --font-arguments to "rrdtool graph" are now specify the path to the font, eg:

--font TITLE:8:/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \
--font AXIS:8:/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \
--font LEGEND:8:/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \
--font UNIT:8:/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \

So this could be used as a workaround in cacti.
But it looks like a bug in upstream.

 
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2008-11-04 14:59:32 UTC
Created attachment 170717 [details, diff]
rrdtool-1.2.28-revert-font-fix.patch

Could you build rrdtool-1.2.28 with this patch applied and report if it works for you? This patch just reverts that font "fix" that was done in 1.2.28. thanks.
Comment 5 fleg 2008-11-04 17:46:28 UTC
(In reply to comment #4)
> Created an attachment (id=170717) [edit]
> rrdtool-1.2.28-revert-font-fix.patch
> 
> Could you build rrdtool-1.2.28 with this patch applied and report if it works
> for you? This patch just reverts that font "fix" that was done in 1.2.28.
> thanks.
> 

AMD64 - compiles fine, works fine.
Comment 6 Peter Volkov (RETIRED) gentoo-dev 2008-11-04 19:33:47 UTC
Thank you guys, for good report, good analysis and tests. :)

I've commited fix into rrdtool-1.2.28-r1. Please, install it and report any further issues you'll encounter (I hope there are none). I'm going to stabilize this version at the end of this week.
Comment 7 Thomas Beutin 2008-11-05 20:05:50 UTC
(In reply to comment #6)
> Thank you guys, for good report, good analysis and tests. :)
> 
> I've commited fix into rrdtool-1.2.28-r1. Please, install it and report any
> further issues you'll encounter (I hope there are none).
There are no issues with rrdtool-1.2.28-r1, it works the same way rrdtool-1.2.27-r1 did (no need to enter fonts in cacti as recommended by Rainer in comment #3).

Thanks a lot!
Comment 8 Peter Volkov (RETIRED) gentoo-dev 2008-11-06 13:06:05 UTC
Arch teams, this rather important regression in usability. Although it is fixed our stable package is still broken. Please, stabilize net-analyzer/rrdtool-1.2.28-r1 ASAP. Thanks.
Comment 9 Ferris McCormick (RETIRED) gentoo-dev 2008-11-06 15:20:08 UTC
Sparc stable (bypassing 30 day rule because of the nature of the problem).
Comment 10 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2008-11-06 15:43:06 UTC
amd64 stable
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-07 06:46:00 UTC
Stable for HPPA.
Comment 12 Peter Volkov (RETIRED) gentoo-dev 2008-11-08 08:03:44 UTC
Thomas, Rainer, fleg: could I ask you for another test? Please check if rrdtool-1.2.28-r2 works for you too. This revision has patch from upstream to fix this issue for real rather then revert broken commit.


arch teams, sorry for bugspam. Go with stabilization of 1.2.28-r1. Possibly I had to create separate bug report for stabilization but I was lazy... Also you could already stabilize and unCC yourself :P
Comment 13 nixnut (RETIRED) gentoo-dev 2008-11-08 13:58:15 UTC
ppc stable
Comment 14 Raúl Porcel (RETIRED) gentoo-dev 2008-11-08 16:10:34 UTC
alpha/ia64/x86 stable
Comment 15 Rainer Ruecker 2008-11-08 16:46:51 UTC
rrdtool-1.2.28-r2 works fine here, no problems with the generated graphs in cacti when using the default settings (that is: no font and fontsize configured in cacti, so the default-font from rrdtool is used)
Comment 16 Brent Baude (RETIRED) gentoo-dev 2008-11-26 15:52:04 UTC
ppc64 done
Comment 17 Peter Volkov (RETIRED) gentoo-dev 2008-11-29 15:24:39 UTC
All done, this bug is fixed. Thank you Rainer for tests. It means rrdtool-1.2.29 will have this bug fixed :)