Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statsd port inuse #1133

Closed

Conversation

michaelsalmon
Copy link
Contributor

This patch primarily fixes the error that is sent if getaddrinfo returns both the IPv4 & IPv6 wildcard address. If a bind has been successful then the error is downgraded to an info. The only case that I can think of where this will occur is just multiple wildcards.

It also removes the call to getnameinfo if debug is not enabled and does not add AI_ADDRCONFIG to hints if there won't be any DNS lookup.

dago and others added 30 commits May 13, 2015 16:39
/proc/pid/status instead of counter the number of files in
/proc/pid/task/*.
if it doesn't start with "Vm" and it doesn't start "Threads".
collectd.service superseded by systemd.collectd.service
…llback.

Should reading the number of threads from /prod/$pid/status fail, use the
number provided by /prod/$pid/stat as a fallback. If that fails, too, use 1.

As discussed with @manuelluis in collectd#1033.
octo and others added 27 commits June 28, 2015 15:00
Also fixes an off-by-one error in counter_diff() and adds a unit test for
the function.
Passing in "value" as a derive_t and returning the rate as a value_t is
just inconvenient and wrong. Instead, pass "value" as a value_t and return
the rate in a gauge_t. While at it, move the state pointer to the end of
the argument list.
Hopefully fixes "Uninitialized argument value" warning.
The previous implementation broke when off1 / off2 were outside of "string"
but within "buflen". It also had problems if the replacement string was
too long. This new implementation truncates the buffer as expected and
is properly tested.
This fix is likely incomplete: the printf() line is probably executed way
too often now.
Also fixes a shadowed local variable warning.
Apparently defining this in the source files confuses Solaris' libc.
Thanks to @dago for looking into this.

Hopefully fixes: collectd#978
This broke the build under Solaris, once again *sigh*.

collectd-tg.c: In function ‘dtime’:
collectd-tg.c:108:12: error: ‘NAN’ undeclared (first use in this function)
     return NAN;
            ^
There's a signed / unsigned conversion in that function ...
... aaaaand it's fully rewritten. Oops.
serial.c:87:28: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
                len = strlen (fields[0]) - 1;
                    ~ ~~~~~~~~~~~~~~~~~~~^~~
serial.c:96:10: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
                        len = strlen (fields[i]);
                            ~ ^~~~~~~~~~~~~~~~~~
Document the use of "Linux abstract namespace sockets" and use sendto(2)
instead of sendmsg(2) to avoid having to initialize struct msghdr
and struct iovec. Removes the non-portable bzero() calls.
* The tests for common and meta_data logged "not ok" but didn't signal
  failure because OK1() didn't include a return(-1) line. Adding this line
  caused some restructuring of the utils_vl_lookup test, because it used
  that macro in non-int functions.
* Fix DBLEQ() to work correctly with an expected NaN. Previously, the
  if condition would fall through to the "expect != actual" part, which
  is true for "NaN != NaN".
* Let the mock cdtime() return a non-zero value, as the (invalid) zero
  value is used in parse_values() to detect whether the time has been
  parsed already. This lead to the "N:..." tests failing.
* Correct the expected behavior of meta_data_add_*() when keys already
  exist: they're replaced rather than causing an error.
@mfournier
Copy link

@michaelsalmon thanks for your patch !

It looks like something went wrong with the pull-request though: Commits 112 Files changed 93

Could you please rebase your patchset against the collectd-5.4 branch, and resubmit against this branch please ? Thanks !

@michaelsalmon
Copy link
Contributor Author

I have created a new pull request that only changes 1 file this time.

@mfournier mfournier closed this Aug 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.