-
Notifications
You must be signed in to change notification settings - Fork 43
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
Segmentation fault on Ubuntu 22.04 #110
Comments
met the same issue on a k8s cluster and trying to use the error :
|
looks like related to ledbettj/systemd-journal#93 and also reported here: fluent/fluent-package-builder#369 |
Workaround suggested in fluent/fluent-package-builder#369 does remove the crashes. However, in my case (same as redliu312 in the previous message) systemd logs are not read with the workaround. Leaving the env variable untouched, fluentd crashes and upon restart, all the systemd logs are flushed and indexed. |
Currently, we need to avoid this problem by unsetting LD_PRELOAD in some environments. It is probably not a problem with this plugin, but it seems to be a problem with It's a problem to have a segmentation fault in the default state of some Fluentd distributions, so we need to consider possible solutions. |
There is a known bug that combination with jemalloc and fluent-plugin-systemd causes free(): invalid crash for a long time. The problematic code is identified but the root cause is not fixed yet. There is a workaround for this - disable jemalloc explicitly. LD_PRELOAD= stop to use jemalloc. If you want to use jemalloc, set it via env like this: containers: - name: fluentd image: fluent/fluentd-kubernetes-daemonset:v1-debian-forward env: - name: K8S_NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName - name: FLUENT_FORWARD_HOST value: "REMOTE_ENDPOINT" - name: FLUENT_FORWARD_PORT value: "18080" - name: LD_PRELOAD value: "/usr/lib/libjemalloc.so.2" Related issues: fluent/fluentd-docker-image#378 fluent/fluent-package-builder#369 fluent-plugins-nursery/fluent-plugin-systemd#110 ledbettj/systemd-journal#93 fluent#1478 Signed-off-by: Kentaro Hayashi <[email protected]>
There is a known bug that combination with jemalloc and fluent-plugin-systemd causes free(): invalid crash for a long time. The problematic code is identified but the root cause is not fixed yet. There is a workaround for this - disable jemalloc explicitly. LD_PRELOAD= stop to use jemalloc. If you want to use jemalloc, set it via env like this: containers: - name: fluentd image: fluent/fluentd-kubernetes-daemonset:v1-debian-forward env: - name: K8S_NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName - name: FLUENT_FORWARD_HOST value: "REMOTE_ENDPOINT" - name: FLUENT_FORWARD_PORT value: "18080" - name: LD_PRELOAD value: "/usr/lib/libjemalloc.so.2" Related issues: fluent/fluentd-docker-image#378 fluent/fluent-package-builder#369 fluent-plugins-nursery/fluent-plugin-systemd#110 ledbettj/systemd-journal#93 fluent#1478 Signed-off-by: Kentaro Hayashi <[email protected]>
There is a known bug that combination with jemalloc and fluent-plugin-systemd causes free(): invalid crash for a long time. The problematic code is identified but the root cause is not fixed yet. There is a workaround for this - disable jemalloc explicitly. LD_PRELOAD= stop to use jemalloc. If you want to use jemalloc, set it via env like this: containers: - name: fluentd image: fluent/fluentd-kubernetes-daemonset:v1-debian-forward env: - name: K8S_NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName - name: FLUENT_FORWARD_HOST value: "REMOTE_ENDPOINT" - name: FLUENT_FORWARD_PORT value: "18080" - name: LD_PRELOAD value: "/usr/lib/libjemalloc.so.2" Related issues: fluent/fluentd-docker-image#378 fluent/fluent-package-builder#369 fluent-plugins-nursery/fluent-plugin-systemd#110 ledbettj/systemd-journal#93 #1478 Signed-off-by: Kentaro Hayashi <[email protected]>
Hi, this issue is discussed over at ledbettj/systemd-journal#96 The problem is that the native library, The caller must call the corresponding free() implementation that was used for malloc() -- libc, tcmalloc, jemalloc, etc -- otherwise the process will likely crash. In Ruby/FFI land, I don't know any good way to determine which allocator was used by the native code. Trying to load the jemalloc library when the libC implementation is already in use will cause issues :( One option might be to provide a separate native library shim that just exposes a |
Hi friends, I've published a version 2.0.0 of systemd-journal gem which includes a native shim as described above to attempt to work around this allocator mismatch. Please give it a try and let me know if you run into any issues. |
It seems that this issue was fixed in systemd-journal 2.0.0, so we shipped fluent-plugin-systemd 1.1.0 which adopts systemd-journal 2.0.0 or later. Please use fluent-plugin-systemd 1.1.0. |
Works on 20.04 but on 22.04 fluentd silently fails.
I'm using latest fluentd
running fluentd manually with
I get
config
The text was updated successfully, but these errors were encountered: