Subject: rrdtool dumps core
To: NetBSD/pkgsrc users <pkgsrc-users@NetBSD.org>
From: Martti Kuparinen <martti.kuparinen@iki.fi>
List: pkgsrc-users
Date: 10/20/2007 12:46:36
Hi,
I'm using rrdtool-1.2.23nb1 on several NetBSD servers (i386 3.1.1 and amd64
4.0_RCx) and on all servers I see weird crashes (=core dump) when generating
the "last 12 months" image if the time is 03:00 - 04:55.
During other times (05:00-24:00-02:55) I have no problems at all. Also I have
no problems generating the "last 24 hours"/"last 7 days"/"last 4 weeks" images
even if the time is between 03:00 and 04:55.
I'm living in Finland so my time zone is currently +3 hrs.
I put these in /etc/mk.conf
INSTALL_UNSTRIPPED=YES
CFLAGS+= -g -static
CXXFLAGS+= -g -static
LDFLAGS+= -g -static
and these in pkgsrc/databases/rrdtool/Makefile
CONFIGURE_ARGS+= --enable-debug
CFLAGS+= -static
and built a debug version. However, I couldn't make any sense from the gdb...
# gdb /usr/pkg/bin/rrdtool /var/log/rrdtool.core
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64--netbsd"...
Core was generated by `rrdtool'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/pkg/lib/libfreetype.so.6...done.
Loaded symbols for /usr/pkg/lib/libfreetype.so.6
Reading symbols from /usr/pkg/lib/libpng12.so.0...done.
Loaded symbols for /usr/pkg/lib/libpng12.so.0
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/pkg/lib/libart_lgpl_2.so.2...done.
Loaded symbols for /usr/pkg/lib/libart_lgpl_2.so.2
Reading symbols from /usr/lib/libm.so.0...done.
Loaded symbols for /usr/lib/libm.so.0
Reading symbols from /usr/lib/libc.so.12...done.
Loaded symbols for /usr/lib/libc.so.12
Reading symbols from /usr/libexec/ld.elf_so...done.
Loaded symbols for /usr/libexec/ld.elf_so
#0 0x00007f7ffd1ce232 in memcpy () from /usr/lib/libc.so.12
(gdb) list
336 if (!(linebuf = realloc(linebuf, bufsize))) {
337 perror("fgetslong: realloc");
338 exit(1);
339 }
340 }
341 return *aLinePtr = linebuf[0] ? linebuf : 0;
342 }
343
344 int main(int argc, char *argv[])
345 {
(gdb) p linebuf
No symbol "linebuf" in current context.
(gdb) p bufsize
No symbol "bufsize" in current context.
(gdb)
(gdb) bt
#0 0x00007f7ffd1ce232 in memcpy () from /usr/lib/libc.so.12
(gdb)
Anyone else having this kind of problems with rrdtool?
Martti