Skip to content

RESOLVED: free(): invalid pointer (segmentation fault with systemd plugin and jemalloc) #1517

Closed
@kenhys

Description

@kenhys

Describe the bug

There is a known issue that combination with systemd plugin and jemalloc causes a
crash bug.

There are some feedback from users.

Related issue:

Important

As a workaround, you can avoid a segmentation fault to disable jemalloc memory allocator by specifying empty LD_PRELOAD for each container.

env:
  ...
  LD_PRELOAD: ""

Caution

UPDATE: 2024 Sep 11
fluent-plugin-systemd 1.1.0 (systemd-journal 2.0.0) was shipped to fix this issue.
As v1.17.1-1.1 image bundles fluent-plugin-systemd 1.1.0 or later, please use newer image.

To Reproduce

See above mentioned issues and related bugs.
(Especially fluent/fluentd-docker-image#378 is the simplified to reproduce without k8s)

Expected behavior

Even though jemalloc is enabled, it does not cause a segmentation fault)

Your Environment

- all of v1.16.x or later

Your Configuration

See already mentioned issues.

Your Error Log

See already mentioned issues.

Additional context

To avoid this issue, jemalloc memory allocator will be disabled by default for v1.17.0-1.3 or later and v1.16.5-1.3 or later.

If you don't use systemd plugin at all, you can enable jemalloc memory allocator explicitly via env: parameter.

env:
  ...
  LD_PRELOAD="/usr/lib/libjemalloc.so.2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions