[collectd] exec plugin bug

Thorsten von Eicken tve at voneicken.com
Thu Mar 19 19:02:58 CET 2009


I've been having trouble with exec plugins since upgrading past 4.3.x 
and finally got to the bottom of it. If you close stderr in the exec 
plugin then collectd silently gives up on the plugin. The plugin process 
remains there but no data is read by collectd. I closed stderr in the 
plugin by redirecting it to a file for troubleshooting, so it wasn't an 
entirely stupid move... Would be great to either fix it or add a note to 
the docs.
What seems to happen is in exec_read_one it gets a 0 from read on the 
stderr fd and says "aha, EOF, break out of the loop". Then it waits for 
the child I believe, but the child is happy cranking along forever (at 
some point it gets blocked on writing to stdout since collectd is not 
reading).
Thorsten



More information about the collectd mailing list