-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
"panic: runtime error: invalid memory address" in release 1.25.0 #12403
Comments
Can you reproduce this outisde the container?
memguard is a new dependency to support secret stores. Also was that the full log? I'd like to see what line in telegraf is calling into memguard causing the panic. Thanks |
telegraf --debug --config telegraf.conf --once
container systemd-nspawn service file
telegraf 1.25.0 works without problems on many other servers (no containers) Thanks |
I have filed an upstream issue awnumar/memguard#144 about the panic when running in systemd-nspawn. I was able to reproduce outside of telegraf with only an empty import. I do not know enough about systemd-nspawn containers to say if there is a setting or additional config option that would avoid this for now. It would help if you could subscribe to that issue in case they ask for any sort of testing. Thanks |
I also got a similar panic error for the conntrack plugin:
|
I noted in the upstream bug for memguard, adding I don't believe this should be classified as a workaround, but rather, a should be classified as a correct fix. IPC_LOCK controls locking of memory and huge page allocation. The capability is denied by default in most systemd packages. It is expected to have to enable this if an application requires I suspect that this will soon apply outside of systemd-nspawn containers, trailing into other container implementations (OCI compatible / docker / podman / etc...) as well as binaries running on strictly configured systems. (Very tightly configured apparmor / selinux setups.) Telegraf might run into issues with these systems unless it specifically requests the IPC_LOCK capability. |
thanks @eljef |
Hi Folks, Sorry for the delay, still catching up on notifications post-holiday. While I would love for the library to not panic, it sounds like the solution here is to add the I am going to put up a PR and update the docs with this note. |
Telegraf will now panic when launched in a systemd-nspawn. This is because of the memguard dependency. It requires the CAP_IPC_LOCK capability to correctly lock and secure memory. fixes: influxdata#12403
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.25, runs inside systemd-nspawn container Ubuntu 20.04
Docker
No response
Steps to reproduce
Expected behavior
Actual behavior
Additional info
No response
The text was updated successfully, but these errors were encountered: