[collectd-changes] collectd, the system statistics collection daemon: Changes to 'master'
Florian Forster
octo at verplant.org
Mon May 21 07:23:17 CEST 2007
src/perl.c | 21 +++++++++++++++++++++
src/plugin.c | 7 ++++++-
2 files changed, 27 insertions(+), 1 deletion(-)
New commits:
commit 36031828bab8e5a9a3494d94e49c6b4882cb32f3
Author: Florian Forster <octo at huhu.verplant.org>
Date: Mon May 21 07:21:28 2007 +0200
plugin.c: Added a comment that explains why the order of the linked list and callback are important.
commit deb839e18f64fedaa8e789ee6bd8619de957ea65
Author: Sebastian Harl <sh at tokkee.org>
Date: Sun May 20 22:59:21 2007 +0200
plugin.c: Advance the llentry_t pointer before calling the shutdown callback.
> Important note: Unregistering the shutdown callback during shutdown is
> somewhat tricky. Doing that frees the llist_t entry in plugin.c:list_shutdown.
> This might cause a segfault in plugin_shutdown_all () when it tries to access
> the next pointer of that entry. If plugin_unregister_shutdown () is the last
> statement before the return from the shutdown callback this should be save in
> about 99% of all cases. Still there should be some better way to handle this.
This is an imho nice way to fix it.
Signed-off-by: Sebastian Harl <sh at tokkee.org>
commit 402f6df1e035c588f809eb4a85650c5ef3e4d082
Author: Sebastian Harl <sh at tokkee.org>
Date: Sun May 20 22:58:03 2007 +0200
perl plugin: Unregister all callbacks from collectd when shutting down.
If we do not unregister the callbacks there is still an entry point into the
plugin after Perl has been shut down and its memory has been freed. This will
cause segmentation faults if collectd tries to call any of the registered
callbacks, e.g. by some plugin calling plugin_log () during shutdown.
Important note: Unregistering the shutdown callback during shutdown is
somewhat tricky. Doing that frees the llist_t entry in plugin.c:list_shutdown.
This might cause a segfault in plugin_shutdown_all () when it tries to access
the next pointer of that entry. If plugin_unregister_shutdown () is the last
statement before the return from the shutdown callback this should be save in
about 99% of all cases. Still there should be some better way to handle this.
Signed-off-by: Sebastian Harl <sh at tokkee.org>
More information about the collectd-changes
mailing list