I'm developping an app in C which is calling rrd_update and rrd_create directly (linking with librrd). So far things are working, but there is a problem if I mix calls to rrd_create and rrd_update. The rrd_update call generates a segfault and my app is dead :-(.
Searching through the mailing list yields a hit (http://www.ee.ethz.ch/~slist/rrd-developers/msg00481.html) with somebody having the same problem back in 2001. Unfortunately there is no follow-up. My problem seems to be the same: The way rrdtool uses getopt is not clean. In my app I already had to resort to my own commandline routine as using getopt myself and then calling rrd_update got a segfault too. Unfortunately this workaround does not help if separate rrdtool routines can not work within the same program. Here my backtrace: (gdb) bt #0 0x4016f8ec in _getopt_internal () from /lib/libc.so.6 #1 0x401708f3 in getopt_long () from /lib/libc.so.6 #2 0x4003212b in rrd_update () from /usr/lib/librrd.so.0 #3 0x080494b6 in rrd_update_data (rrd_name=0x804a0a3 "cpu", rrd_data=0xbffff730 "1049186901:0.0:4") at rrdmon.c:209 #4 0x08049646 in rrd_stats () at rrdmon.c:236 #5 0x08049981 in main (argc=2, argv=0xbffffbbc) at rrdmon.c:314 #6 0x400c09c4 in __libc_start_main () from /lib/libc.so.6 Any ideas ? Markus -- Markus Baertschi Phone: ++41 (21) 807 1677 Bas du Rossé 14b Fax : ++41 (21) 807 1678 CH-1163, Etoy Email: [EMAIL PROTECTED] Switzerland Homepage: www.markus.org -- Markus Baertschi Phone: ++41 (21) 807 1677 Bas du Rossé 14b Fax : ++41 (21) 807 1678 CH-1163, Etoy Email: [EMAIL PROTECTED] Switzerland Homepage: www.markus.org -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-developers WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
