-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
FreeBSD: couldn't get uname: cannot allocate memory #2809
Comments
Same here |
I suppose this comes from here: node_exporter/collector/uname_bsd.go Line 28 in 7dd2f0d
Can create a minimal program using unix.Uname() to reproduce this? Might be a golang issue. Also, have you tried the current master version? |
Happening also on latest pfSense OSS v2.7.2 (based on FreeBSD 14) |
Please anyone try to reproduce this by running the following:
|
Yes, this reproduces the exact same input described above:
|
I have tested, by building the above with the entirety of mib = []_C_int{CTL_KERN, KERN_VERSION}
n = unsafe.Sizeof(uname.Version)
if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
return err
} to be the cause. Your minimal repro code snippet works if I leave everything but this section commented out, and continues to fail to alloc if I leave this chunk in. I have never written Go, so I'm not sure if I'll be able to fix this but wanted to drop this here in case anyone else lands here. Edit https://man.freebsd.org/cgi/man.cgi?sysctl(3) This is because the |
@seeplusplus Great job debugging and thanks for opening the golang issue! |
The fix for the issue in sys/unix was merged to master this morning. It seems like there are some other issues in this repo preventing successful builds on FreeBSD though. I started taking a look a those over the weekend. |
Host operating system: output of
uname -a
node_exporter version: output of
node_exporter --version
node_exporter command line flags
node_exporter log output
Are you running node_exporter in Docker?
No
What did you do that produced an error?
Run
node_exporter
.What did you expect to see?
node_uname_info
metric.What did you see instead?
The text was updated successfully, but these errors were encountered: