Merge branch 'collectd-5.4' into collectd-5.5
md: fix deprecation warning with latest glibc
md.c: In function ‘md_process’:
md.c:120:3: warning: ‘__makedev_from_sys_types’ is deprecated:
In the GNU C Library, `makedev' is defined by <sys/sysmacros.h>.
For historical compatibility, it is currently defined by
<sys/types.h> as well, but we plan to remove this soon.
To use `makedev', include <sys/sysmacros.h> directly.
If you did not intend to use a system-defined macro `makedev',
you should #undef it after including <sys/types.h>.
[-Wdeprecated-declarations]
if (st.st_rdev != makedev (MD_MAJOR, minor))
^~
In file included from /usr/include/features.h:397:0,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from ./daemon/collectd.h:34,
from md.c:22:
md.c: In function ‘md_process’:
md.c:120:3: warning: ‘__makedev_from_sys_types’ is deprecated:
In the GNU C Library, `makedev' is defined by <sys/sysmacros.h>.
For historical compatibility, it is currently defined by
<sys/types.h> as well, but we plan to remove this soon.
To use `makedev', include <sys/sysmacros.h> directly.
If you did not intend to use a system-defined macro `makedev',
you should #undef it after including <sys/types.h>.
[-Wdeprecated-declarations]
if (st.st_rdev != makedev (MD_MAJOR, minor))
^~
In file included from /usr/include/features.h:397:0,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from ./daemon/collectd.h:34,
from md.c:22:
Fix conceptual buglet in default_callback
The 'DERIVE' path in default_callback() increments the 'counter' field of
value instead of the 'derive' field. Since those fields have the same
type and offset within the value union this will still work fine, but
AFAICT it's conceptually incorrect. This corrects it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Florian Forster <octo@collectd.org>
The 'DERIVE' path in default_callback() increments the 'counter' field of
value instead of the 'derive' field. Since those fields have the same
type and offset within the value union this will still work fine, but
AFAICT it's conceptually incorrect. This corrects it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_db_query.c: Correctly handle return value of strjoin().
It returns the number of bytes, not zero, on success. This fixes a
bug introduced in 496ca2b758344bc6372ab0adf98ad8050f69b25a.
It returns the number of bytes, not zero, on success. This fixes a
bug introduced in 496ca2b758344bc6372ab0adf98ad8050f69b25a.
Merge branch 'collectd-5.4' into collectd-5.5
src/utils_db_query.c: Check return status of strjoin().
Fixes: #4
Fixes: #4
libcollectdclient: Don't print anything to STDOUT by default.
Even with --enable-debug. This behavior is now controlled by the
"COLLECTD_TRACE" environment variable.
Fixes: #105
Even with --enable-debug. This behavior is now controlled by the
"COLLECTD_TRACE" environment variable.
Fixes: #105
ping plugin: Let start_thread() return gracefully when thread is already running.
Signaling an error caused the init function to signal an error, causing
the read callback to be unregistered on systems where init is called
more than once.
Fixes: #869
Signaling an error caused the init function to signal an error, causing
the read callback to be unregistered on systems where init is called
more than once.
Fixes: #869
Merge branch 'collectd-5.4' into collectd-5.5
Merge pull request #1846 from tokkee/collectd-5.4
python plugin: Fix conversion of value-lists from Python to C.
python plugin: Fix conversion of value-lists from Python to C.
python plugin: Fix conversion of value-lists from Python to C.
This affects data-sets with more than one data-source of different types.
Previously, the type of the first data-source would have been used to convert
all values.
This affects data-sets with more than one data-source of different types.
Previously, the type of the first data-source would have been used to convert
all values.
src/plugin.c: Stop write threads before calling shutdown callbacks.
Issue: #1110
Issue: #1110
network plugin: Don't abort() if gcrypt initialization failed.
Instead, report an error and let plugin initialization fail.
Instead, report an error and let plugin initialization fail.
Merge branch 'collectd-5.4' into collectd-5.5
Conflicts:
ChangeLog
contrib/redhat/collectd.spec
version-gen.sh
Conflicts:
ChangeLog
contrib/redhat/collectd.spec
version-gen.sh
metadata: add comment about metadata functions use and threads safety
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Bump spec file to 5.4.3
Bump version to 5.4.3; Update ChangeLog.
network plugin: Fix error message for GCRYCTL_INIT_SECMEM failure.
ChangeLog: Add note about #1665.
Bump version to 5.5.2; Update ChangeLog.
Merge branch 'collectd-5.4' into collectd-5.5
network plugin, libcollectdclient: Check return value of gcry_control().
Fixes: #1665
Fixes: #1665
Merge branch 'collectd-5.4' into collectd-5.5
network plugin: Fix heap overflow in parse_packet().
Emilien Gaspar has identified a heap overflow in parse_packet(), the
function used by the network plugin to parse incoming network packets.
This is a vulnerability in collectd, though the scope is not clear at
this point. At the very least specially crafted network packets can be
used to crash the daemon. We can't rule out a potential remote code
execution though.
Fixes: CVE-2016-6254
Emilien Gaspar has identified a heap overflow in parse_packet(), the
function used by the network plugin to parse incoming network packets.
This is a vulnerability in collectd, though the scope is not clear at
this point. At the very least specially crafted network packets can be
used to crash the daemon. We can't rule out a potential remote code
execution though.
Fixes: CVE-2016-6254
Merge branch 'collectd-5.4' into collectd-5.5
src/*.pod: fix minor warnings spotted by podchecker
collectd.conf.pod: fix minor typos in ntpd plugin section
Merge branch 'collectd-5.4' into collectd-5.5
Bug#1059 : Remove any white spaces in ethstats stat names (affects VMXNet3 interface)
Merge branch 'collectd-5.4' into collectd-5.5
Merged branch 'collectd-4.10' into collectd-5.4.
perl plugin: Be more consistent about capitalization.
perl plugin: Removed commented code
perl plugin: Added call_pv_locked() wrapper to handle thread locking flags.
perl plugin: Switched to PTHREAD_MUTEX_RECURSIVE locking
perl plugin: Fixes for #1706
* Fix coredump due to destroying interpreter on threads running perl.
* Fix deadlock when perl_log() is called from perl_init()
* Fix coredump due to destroying interpreter on threads running perl.
* Fix deadlock when perl_log() is called from perl_init()
perl plugin: lock base thread interpreter in perl_init() too.
Avoid race conditions with c_ithread_create() called from threads of already-initialized plugins.
Fix for https://github.com/collectd/collectd/issues/1706.
Avoid race conditions with c_ithread_create() called from threads of already-initialized plugins.
Fix for https://github.com/collectd/collectd/issues/1706.
plugin_mock.c: Declare "kc".
This hopefully fixes "make check" on Solaris, which currently fails
with:
CC common_test.o
CCLD test_common
Undefined first referenced
symbol in file
kc ./.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_common
collect2: error: ld returned 1 exit status
(cherry picked from commit 4fb43017b4b585256627b9503ce0a5cf08ecdefe)
This hopefully fixes "make check" on Solaris, which currently fails
with:
CC common_test.o
CCLD test_common
Undefined first referenced
symbol in file
kc ./.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_common
collect2: error: ld returned 1 exit status
(cherry picked from commit 4fb43017b4b585256627b9503ce0a5cf08ecdefe)
Makefile.am: Link tests with required libraries, too.
"make check" fails on Solaris because libraries are missing:
CCLD test_common
Undefined first referenced
symbol in file
kc ./.libs/libcommon.a(common.o)
kstat_data_lookup ./.libs/libcommon.a(common.o)
kstat_lookup ./.libs/libcommon.a(common.o)
kstat_read ./.libs/libcommon.a(common.o)
getaddrinfo ./.libs/libcommon.a(common.o)
freeaddrinfo ./.libs/libcommon.a(common.o)
gai_strerror ./.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_common
collect2: error: ld returned 1 exit status
(cherry picked from commit 6213557b1d5c79a60e9c4322263836ca6066aa0e)
"make check" fails on Solaris because libraries are missing:
CCLD test_common
Undefined first referenced
symbol in file
kc ./.libs/libcommon.a(common.o)
kstat_data_lookup ./.libs/libcommon.a(common.o)
kstat_lookup ./.libs/libcommon.a(common.o)
kstat_read ./.libs/libcommon.a(common.o)
getaddrinfo ./.libs/libcommon.a(common.o)
freeaddrinfo ./.libs/libcommon.a(common.o)
gai_strerror ./.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_common
collect2: error: ld returned 1 exit status
(cherry picked from commit 6213557b1d5c79a60e9c4322263836ca6066aa0e)
build: add libavltree, libcommon & libheap dependencies
Otherwise it can break on very parallel builds since collectd link time
arrives before one or more of these were built.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
(cherry picked from commit 780e6a76021a240e95007a04b723d827120afa95)
Otherwise it can break on very parallel builds since collectd link time
arrives before one or more of these were built.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
(cherry picked from commit 780e6a76021a240e95007a04b723d827120afa95)
Link libcommon.la with $(COMMON_LIBS).
This hopefully fixes link errors on Solaris:
CCLD test_utils_vl_lookup
Undefined first referenced
symbol in file
kstat_data_lookup daemon/.libs/libcommon.a(common.o)
kstat_lookup daemon/.libs/libcommon.a(common.o)
kstat_read daemon/.libs/libcommon.a(common.o)
getaddrinfo daemon/.libs/libcommon.a(common.o)
freeaddrinfo daemon/.libs/libcommon.a(common.o)
gai_strerror daemon/.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_utils_vl_lookup
collect2: error: ld returned 1 exit status
(cherry picked from commit fe2eee98f4b1cf8c5a5df6ed6cd03d8487c695be)
Conflicts:
src/daemon/Makefile.am
This hopefully fixes link errors on Solaris:
CCLD test_utils_vl_lookup
Undefined first referenced
symbol in file
kstat_data_lookup daemon/.libs/libcommon.a(common.o)
kstat_lookup daemon/.libs/libcommon.a(common.o)
kstat_read daemon/.libs/libcommon.a(common.o)
getaddrinfo daemon/.libs/libcommon.a(common.o)
freeaddrinfo daemon/.libs/libcommon.a(common.o)
gai_strerror daemon/.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_utils_vl_lookup
collect2: error: ld returned 1 exit status
(cherry picked from commit fe2eee98f4b1cf8c5a5df6ed6cd03d8487c695be)
Conflicts:
src/daemon/Makefile.am
Merge branch 'collectd-5.4' into collectd-5.5
Merge pull request #1726 from rubenk/udev
Udev
Udev
processes: re-add <sys/user.h> inclusion
cf #1725
cf #1725
Stop hardcoding libudev
Add missing udev flags to Makefile.am
Merge branch 'collectd-5.4' into collectd-5.5
processes: MAXCOMLEN is not exposed on Solaris
MAXCOMLEN in <sys/user.h> is only exposed to kernel
code. I think it's safe to assume that it isn't going
to change, so just hardcode it.
MAXCOMLEN in <sys/user.h> is only exposed to kernel
code. I think it's safe to assume that it isn't going
to change, so just hardcode it.
Merge pull request #1724 from rpv-tomsk/smart-plugin-udev-dep
Fix for #1688 The SMART plugin does not build/load, v.5.5.0
Fix for #1688 The SMART plugin does not build/load, v.5.5.0
smart plugin: Check for libudev presence
collectd.conf.in: remove extraneous pound sign
Merge branch 'collectd-5.4' into collectd-5.5
utils_cache.c: fix FORMAT_VL failed ERROR messages
kill correct pid on fdopen failure
Merge branch 'collectd-5.4' into collectd-5.5
Conflicts:
src/Makefile.am
Conflicts:
src/Makefile.am
rrdtool plugin: fix thread-safety detection
librrd 1.6.0 is now threadsafe and librrd_th is gone.
Since there doesn't seem to be a way to detect that librrd
is threadsafe, use pkg-config to check for 1.6.0 or newer instead.
The logic is now as follows:
Check for librrd >= 1.6.0 with pkg-config
If not found, look for rrd_update_r in librrd_th.
If not found, look for rrd_update in librrd and assume librrd is not
thread safe.
(cherry picked from commit ef43260cd901847220c2a9de400579ff903ca13e)
Conflicts:
src/Makefile.am
librrd 1.6.0 is now threadsafe and librrd_th is gone.
Since there doesn't seem to be a way to detect that librrd
is threadsafe, use pkg-config to check for 1.6.0 or newer instead.
The logic is now as follows:
Check for librrd >= 1.6.0 with pkg-config
If not found, look for rrd_update_r in librrd_th.
If not found, look for rrd_update in librrd and assume librrd is not
thread safe.
(cherry picked from commit ef43260cd901847220c2a9de400579ff903ca13e)
Conflicts:
src/Makefile.am
rrdtool check: stop linking in libm
(cherry picked from commit 32c0ce39f786c56e9d13f3615253a7ae55b578e6)
(cherry picked from commit 32c0ce39f786c56e9d13f3615253a7ae55b578e6)
rrdtool check: no need to save CPPFLAGS
There's no need to save CPPFLAGS when we're just
checking a library.
(cherry picked from commit f7e09269879b74e61324de9178503221b2df9136)
There's no need to save CPPFLAGS when we're just
checking a library.
(cherry picked from commit f7e09269879b74e61324de9178503221b2df9136)
rrdtool check: no need to save LDFLAGS
There's no need to save LDFLAGS when we're just
checking a header.
(cherry picked from commit 38068ecc7922ace29bb6af3f8ee5568c3fe96c08)
There's no need to save LDFLAGS when we're just
checking a header.
(cherry picked from commit 38068ecc7922ace29bb6af3f8ee5568c3fe96c08)
statsd plugin: Fix deadlock on plugin shutdown (Issue #1703)
More missing kstat usages
Add missing kstat definitions
Take out explicit definitions as they are already checked via enable_standards in configure.ac.
Fixes: #978
Fixes: #978
collectd-tg: Move _POSIX_C_SOURCE and friends to the Makefile.
Apparently defining this in the source files confuses Solaris' libc.
Thanks to @dago for looking into this.
Hopefully fixes: #978
Apparently defining this in the source files confuses Solaris' libc.
Thanks to @dago for looking into this.
Hopefully fixes: #978
processes: remove initialisation of unexisting variables
Partial revert of 1f0156c, which broke the build on Solaris and OpenBSD.
The context-switch reporting code is only part of master at the moment.
Fixes: #1674
Partial revert of 1f0156c, which broke the build on Solaris and OpenBSD.
The context-switch reporting code is only part of master at the moment.
Fixes: #1674
Merge pull request #1546 from mfournier/processname_length_1284
processes: warn about process names above OS limit
processes: warn about process names above OS limit
fix potential curl plugin curl_slist_append memory leak
make sure that we dont leak memory if curl_slist_append returns null
make sure that we dont leak memory if curl_slist_append returns null
Merge branch 'collectd-5.4' into collectd-5.5
Fix process plugin memory leak [solaris]
Merge pull request #1627 from rubenk/remove-old-filter-syntax-from-manpage
Remove broken filter syntax from collectd.conf(5)
Remove broken filter syntax from collectd.conf(5)
Bump version to latest 5.5.1 #1536
(cherry picked from commit 238419ac27bcd991cebd021d25706b78d7edd182)
(cherry picked from commit 238419ac27bcd991cebd021d25706b78d7edd182)
Merge branch 'collectd-5.4' into collectd-5.5
configure.ac: break long line and sort
This will make future merges easier.
This will make future merges easier.
Merge branch 'collectd-5.4' into collectd-5.5
Fix building with xfsprogs 4.5.0
xfsprogs 4.5.0 started to use off64_t in its headers,
which is hidden behind _GNU_SOURCE
Fixes #1637
xfsprogs 4.5.0 started to use off64_t in its headers,
which is hidden behind _GNU_SOURCE
Fixes #1637
Remove broken filter syntax from collectd.conf(5)
fb67910d documented the new syntax.
The old syntax does no longer work, remove it.
fb67910d documented the new syntax.
The old syntax does no longer work, remove it.
Fix conflict markers
Merge branch 'collectd-5.4' into collectd-5.5
Fix indentation in previous commit
Merge pull request #1620 from skinowski/write_http_mem_leak_II
write_http: in cleanup handler free http headers
write_http: in cleanup handler free http headers
write_http: in cleanup handler free http headers
slist of http headers require cleanup to avoid
memory leak. See libcurl example:
https://curl.haxx.se/libcurl/c/httpcustomheader.html
slist of http headers require cleanup to avoid
memory leak. See libcurl example:
https://curl.haxx.se/libcurl/c/httpcustomheader.html
Merge branch 'collectd-5.4' into collectd-5.5
Fix build on Solaris 10 i386 part 2
utils_latency.c needs the same fix as applied in a41f312
(cherry picked from commit e7f7ecc1cac73841cdebd7e0462af4989532a107)
utils_latency.c needs the same fix as applied in a41f312
(cherry picked from commit e7f7ecc1cac73841cdebd7e0462af4989532a107)
Fix build on Solaris 10 i386
AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS in src/config.h,
so we need this header first before including system headers.
Thanks to @dago for the report.
Fixes:
CC collectd-utils_random.o
In file included from collectd.h:31:0,
from utils_random.c:29:
../../src/config.h:1646:0: error: "_FILE_OFFSET_BITS" redefined
[-Werror]
#define _FILE_OFFSET_BITS 64
^
In file included from
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/pthread.h:20:0,
from utils_random.c:27:
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:196:0:
note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
cc1: all warnings being treated as errors
(cherry picked from commit a41f312a8d48a989dfba00a8b43532c60f67caba)
AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS in src/config.h,
so we need this header first before including system headers.
Thanks to @dago for the report.
Fixes:
CC collectd-utils_random.o
In file included from collectd.h:31:0,
from utils_random.c:29:
../../src/config.h:1646:0: error: "_FILE_OFFSET_BITS" redefined
[-Werror]
#define _FILE_OFFSET_BITS 64
^
In file included from
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/pthread.h:20:0,
from utils_random.c:27:
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:196:0:
note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
cc1: all warnings being treated as errors
(cherry picked from commit a41f312a8d48a989dfba00a8b43532c60f67caba)
Merge branch 'collectd-5.4' into collectd-5.5
RPM specfile: fix xmms plugin build condition
Merge branch 'collectd-5.4' into collectd-5.5
RPM specfile: update changelog
RPM specfile: enable xmms plugin on EL7
Merge branch 'collectd-5.4' into collectd-5.5
RPM specfile: re-enable memcachec plugin on EL7
cf https://bugzilla.redhat.com/show_bug.cgi?id=1116949
cf https://bugzilla.redhat.com/show_bug.cgi?id=1116949
RPM specfile: enable modbus plugin on EL7
Merge pull request #1617 from michaelsalmon/putval-time-exec-pod
added definition of N to collectd-exec
added definition of N to collectd-exec
added definition of N to collectd-exec
Merge branch 'collectd-5.4' into collectd-5.5
Merge pull request #1575 from rubenk/dragonflybsd-utils-mount
Fix build on DragonFlyBSD
Fix build on DragonFlyBSD
Merge pull request #1580 from rubenk/freebsd-zfs-arc
zfs_arc: 'stolen' was removed after FreeBSD 10.2
zfs_arc: 'stolen' was removed after FreeBSD 10.2