[collectd] plugin not unloaded if init function fails

Pavel pavel2000 at ngs.ru
Wed Oct 24 18:30:17 CEST 2018


Hi, Oleg.

Unfortunately, I found '/* FIXME: Unload _all_ functions 
*/' comment in
file 'src/daemon/plugin.c' at function 
'plugin_init_all()'.

As fast solution, you may to call 
'plugin_unregister_write()' yourself.

Regards,
Pavel.

On Wed, 24 Oct 2018 18:15:42 +0200 Oleg Rosowiecki 
<orosowiecki at gmail.com> wrote:

> I've been testing a simple write plugin that captures values from a
> specific read plugin and stores them in a predefined location on the file
> system.
> 
> The init function of my plugin failed and returned 1 to indicate failure.
> The log indicates that collectd noticed this:
> 
> collectd[2704]: Initialization of plugin 'writefile' failed with status 1.
> Plugin will be unloaded.
> collectd[2704]: plugin_unregister_read: No such read function: writefile
> 
> The intention is to unload the plugin but this doesn't seem to be
> happening. collectd keeps calling my write callback forever. Could anyone
> explain why? I've tested this on version 5.6.0.
> 
> The only suspicious line in the log is about plugin_unregister_read. I've
> never registered a read callback for this plugin.
> 
> Thanks in advance for your help,
> Oleg




More information about the collectd mailing list