[collectd] no rrd files created on solaris (Bad file number)

Mathijs Möhlmann collectd at mmrc.nl
Wed Mar 16 10:35:07 CET 2011


I'm using collectd 4.10.2 on Solaris 10 (gcc 3.4.6). Sometimes when I
start with a clean rrd directory or add a host the .rrd file (rrdtools
plugin) don't get created and I get the following message:

collectd[2996]: [ID 702911 daemon.error] stat(/usr/local/var/lib/collectd/rrd/asterix/load/load.rrd) failed: Bad file number

Which is strange, since the truss shows that the systemcall stat64
returns with error code ENOENT. src/rrdtools.c line 874 thus fails and
the files never get created. I think errno.h cannot handle the
multithreaded case here.

After I rebuild the daemon with

#define _REENTRANT 1

in src/config.h everythings works fine.  I'm not sure how to get this
into the build system though. Can someone confirm that this is the
proper fix and help me to create a patch for the build system.

	Thanks,

	Mathijs

-- 
        In other words, I'm right. I'm always right, but sometimes I'm
        more right than other times. And dammit, when I say "files
        don't matter", I'm really really Right(tm).

                                        -- Linus Torvalds



More information about the collectd mailing list