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

Docker Raspberry -> jemalloc - Unsupported system page size #9730

Open
dk588 opened this issue Dec 16, 2024 · 7 comments
Open

Docker Raspberry -> jemalloc - Unsupported system page size #9730

dk588 opened this issue Dec 16, 2024 · 7 comments

Comments

@dk588
Copy link

dk588 commented Dec 16, 2024

Bug Report

Describe the bug
I'm trying to start fluent-bit on a raspberry pi5 on docker.
I tried multiple configurations and I'm always ending with the error message below:

<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
Error in GnuTLS initialization: ASN1 parser: Element was not found.
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
[2024/12/16 08:44:22] [error] [/src/fluent-bit/src/config_format/flb_config_format.c:107 errno=12] Cannot allocate memory

I found the same closed issue on fluentd github, but it didn't help: jemalloc: Unsupported system page size #4328
My best hope is to find a way to disable the jemalloc library as my fluentd-bit instance will no be overloaded.

To Reproduce
I tried as per the documentation:

docker run -ti cr.fluentbit.io/fluent/fluent-bit

I also tried to build my own image with the same result. I play with the jemalloc library and LD_PRELOAD variable env without more success. I'm a bit lost now:

FROM debian:bookworm

USER root
RUN apt-get update \
    && apt-get install -y gpg curl ca-certificates libjemalloc2

RUN curl https://packages.fluentbit.io/fluentbit.key | gpg --dearmor > /usr/share/keyrings/fluentbit-keyring.gpg \
   && echo "deb [signed-by=/usr/share/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/debian/bookworm bookworm main" | tee -a /etc/apt/sources.list

RUN apt-get update \
 && apt-get install -y fluent-bit

ENV LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2

ENTRYPOINT ["/opt/fluent-bit/bin/fluent-bit"]
CMD ["-c", "/etc/fluent-bit/fluent-bit.conf"]

Your Environment

  • Version used: cr.fluentbit.io/fluent/fluent-bit
  • Environment name and version: docker v27.4.0 build bde2b89
  • Server type and version: Raspberry pi5
  • Operating System and version: Raspberry os (debian 12 Bookworm)
  • Filters and plugins: none
@patrick-stephens
Copy link
Contributor

The container image is compiled for a particular kernel configuration - your kernel configuration does not match so you need to compile a container image that matches. It's the same as the Oracle Linux ARM64 page size mismatch with the rest of other RHEL-compatible kernels.
Ultimately we could try to maintain a configuration for every possible OS that people want to use but do not have the resources to do that. You could submit a PR to build a compatible image to help future folks.

@dk588
Copy link
Author

dk588 commented Dec 16, 2024

Thank you for your answer. Building a compatible image is what I'm trying to achieve.
Just to clarify: I have tried to create my own container image based on Debian Bookworm, using the Debian apt repository. I follow this installation guide debian installation. It says it's compatible with aarch64 architecture.
So shouldn't it work with my system?
the result of uname -a

Linux pi5 6.6.62+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1 (2024-11-25) aarch64 GNU/Linux

@patrick-stephens
Copy link
Contributor

Do the Raspbian packages (not containers) work?

@dk588
Copy link
Author

dk588 commented Dec 16, 2024

I only found raspbian packages for 10 and 11 : https://packages.fluentbit.io/raspbian/
For the moment there's no release for 12 (bookworm).
I though with a debian 12 docker image, the debian package may also work. But I may be incorrect.

@patrick-stephens
Copy link
Contributor

OK, it may be better to update packages for the new Raspbian version then. It just needs someone to contribute the relevant build config here: https://github.com/fluent/fluent-bit/blob/master/packaging/distros/raspbian/Dockerfile

I think that would be a better solution for most folks than making another custom container image just for it.

@dk588
Copy link
Author

dk588 commented Dec 16, 2024

Thanks. I believe I understand the problem a bit better.
I'm not sure the build with the dockerfile you provide would work on my case as it compiles from an image for armv8 only.
I cannot even start the base image on my pi5:

docker run -it balenalib/rpi-raspbian:bookworm sh
/bin/bash: error while loading shared libraries: libtinfo.so.6: ELF load command address/offset not page-aligned

What I will try is make the build on a debian image directly on my pi5.
I'll keep you updated if it works.
Kind regards

@patrick-stephens
Copy link
Contributor

Sure, you can use any base image ultimately - this was the requirement for raspbian previously but if your target is different then it will need a different base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants