[rrd-users] RRDTool, Solaris & threaded applications

Oleg Derevenetz oleg at vsi.ru
Sun Oct 23 10:45:09 MEST 2005


I just tried to run multithreaded Tcl application (Tcl 8.4.6, Thread 2.5.2)
on Solaris 9 with Tcl Rrd module from RRDTool 1.2.10, and it dumps core.
Backtrace shows that it fails inside getopt:

(gdb) bt
#0  _getopt_internal (argc=5, argv=0x45aa8f8, optstring=0xfdd533d8 "t:",
longopts=0xfdd79324, longind=0xfbcf9fdc,
    long_only=0) at getopt.c:599
#1  0xfdd42fe4 in rrd_update (argc=5, argv=0x45aa8f8) at rrd_update.c:175
#2  0xfe9c0e1c in Rrd_Update (clientData=0x0, interp=0x1d902c8, argc=5,
argv=0xfbcfa0c0) at tclrrd.c:148
#3  0xff2a6d9c in TclInvokeStringCommand () from /usr/local/lib/libtcl8.4.so

man -s 3c getopt says that getopt is not thread-safe:

MT-Level Unsafe

Also seems like librrd and librrd_th are both using getopt inside.

So, is there any way to use librrd in multithreaded applications under
Solaris ?

Oleg Derevenetz <oleg at vsi.ru> OOD3-RIPE
Phone: +7 (0732) 531789
Fax:   +7 (0732) 531415       http://www.vsi.ru
CenterTelecom Voronezh ISP    http://isp.vsi.ru

Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the rrd-users mailing list