[rtg] rtgplot 0.9 problems

Bryan Wann bwann-rtg at wann.net
Fri Apr 25 02:25:59 EDT 2008


Two questions on the rtgplot straight outta CVS.  This is on CentOS 5, 
MySQL 5.0.22.

1) What's this rownum query supposed to do?  rownum is not supported in 
MySQL, I don't know what the intent is or if it's needed.

Populating (populate).
   Query String: SELECT counter, UNIX_TIMESTAMP(dtime) FROM ifInOctets_47
   WHERE dtime>FROM_UNIXTIME(1208821115)
   AND dtime<=FROM_UNIXTIME(1208907515) AND id=25519 ORDER BY dtime
   No Data Points 288.
Populating (populate).  Query String: SELECT counter, dtime FROM 
ifInOctets_47 WHERE id=25519 AND rownum < 2 ORDER BY dtime DESC
MySQL error: Unknown column 'rownum' in 'where clause'
   No Data Points 288.
Calc rate (calculate_rate).
[row0=670454390][row1=1208821568][elapsed secs=300][rate=2234848.000 bps]
[...]


2) rtgplot dies after writing an image, looks like it's trying to write to 
a closed filehandle.  If I run from command line, the generated .png is 
fine, but rtgplot doesn't make a graceful exit.  If I call it as a CGI, 
the .png just has a straight line for the dataset and the same sort of 
errors are logged to Apache's error log.

Anyone seen this and know how to fix?

./rtgplot-0.9.cgi -c /etc/rtg/rtg.conf -o foo.png
   -d 1:ifInOctets_47:25519 -l 1:1::Traffic
   -p access:440:130::1208821115:1208907515 -vvv

RTGplot version 0.9.0.

[..lotsa row and plot info..]

Plotting from (480,113) to (483,110) [entry->x/y = 433/40] [lastx/y = 430/37]
Plotting from (483,110) to (486,112) [entry->x/y = 436/38] [lastx/y = 433/40]
Plotting from (486,112) to (489,111) [entry->x/y = 439/39] [lastx/y = 436/38]
Current time 1209102937 (x-pixel 1435) extends past plot end.
Drawing directional arrow (draw_arrow).
Plotting scale (plot_scale).
Plotting labels (plot_labels).
*** glibc detected *** ./rtgplot-0.9c.cgi: double free or corruption 
(!prev): 0x08e18f28 ***
======= Backtrace: =========
/lib/libc.so.6[0xbbbaa6]
/lib/libc.so.6(cfree+0x90)[0xbbefc0]
/usr/lib/mysql/libmysqlclient_r.so.15(my_no_flags_free+0x21)[0x4f32c1]
/usr/lib/mysql/libmysqlclient_r.so.15(vio_delete+0x30)[0x51c910]
/usr/lib/mysql/libmysqlclient_r.so.15(end_server+0x26)[0x5179f6]
/usr/lib/mysql/libmysqlclient_r.so.15(cli_advanced_command+0xd9)[0x51ad79]
/usr/lib/mysql/libmysqlclient_r.so.15(mysql_close+0x7a)[0x517a9a]
/usr/lib/mysql/libmysqlclient_r.so.15(mysql_close+0xfe)[0x517b1e]
/usr/lib/librtgmysql.so(__db_disconnect+0x33)[0x2ee2f3]
./rtgplot-0.9c.cgi[0x804e657]
/lib/libc.so.6(__libc_start_main+0xdc)[0xb6adec]
./rtgplot-0.9c.cgi[0x8049291]

strace:

write(2, "Plotting labels (plot_labels).\n", 31Plotting labels 
(plot_labels).) = 31
open("foo.png", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
   = 0xb7fa9000
brk(0x9e0c000)           = 0x9e0c000
brk(0x9e3c000)           = 0x9e3c000
brk(0x9e08000)           = 0x9e08000
write(5, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\1\376\0\0\0\322\4\3\0\0\1._\217"..., 
4029) = 4029
close(5)                                = 0
munmap(0xb7fa9000, 4096)                = 0
poll([{fd=4, events=POLLIN|POLLPRI}], 1, 0) = 0
write(4, "\1\0\0\0\1", 5)               = 5
shutdown(4, 2 /* send and receive */)   = 0
close(4)                                = 0
poll([{fd=165324624, events=POLLIN|POLLPRI, revents=POLLNVAL}], 1, 0) = 1
write(165324624, "\1\0\0\0\1", 5)       = -1 EBADF (Bad file descriptor)
open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = 4
writev(4, [{"*** glibc detected *** ", 23}, {"./rtgplot-0.9c.cgi", 18},
   {": ", 2}, {"double free or corruption (!prev"..., 33}, {": 0x", 4},
   {"09daaf28", 8}, {" ***\n", 5}], 7*** glibc detected ***
./rtgplot-0.9c.cgi: double free or corruption (!prev): 0x09daaf28 ***) = 93



Met vriendelijke groet/kind regards,
bryan


More information about the RTG mailing list