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

<jemalloc>: Unsupported systeom page size on raspberry pi 5 with container image 2023.12.2 #105768

Closed
lethargosapatheia opened this issue Dec 14, 2023 · 14 comments

Comments

@lethargosapatheia
Copy link

lethargosapatheia commented Dec 14, 2023

The problem

Hi,

I've come across this error:

s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun home-assistant (no readiness notification)
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
Fatal Python error: _PyRuntimeState_Init: memory allocation failed
Python runtime state: unknown

When running Home Assistant 2023.12.2 on a Raspberry Pi 5 (4GB RAM). The error seems to be identical to this here: #34162, which has apparently been solved.

I'm running Raspberry Pi OS based on Debian 12 with docker version 20.10.24+dfsg1.

Linux raspberrypi 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux

This is how I'm starting the container:

version: '3'
services:
  homeassistant:
    image: ghcr.io/home-assistant/home-assistant:2023.12.2
    container_name: homeassistant
    restart: always
    volumes:
      - home-assistant-config:/config
    devices:
      - /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b83b51746245ed119f0fca8f0a86e0b4-if00-port0:/dev/zigbeeDongle
    environment:
      - TZ=Europe/London
    networks:
      - iot
volumes:
  home-assistant-config:
    name: "home-assistant-config"
networks:
  iot:
    driver: bridge

Any ideas are welcome.

What version of Home Assistant Core has the issue?

2023.12.2

What was the last working version of Home Assistant Core?

n/a

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@lbineau
Copy link

lbineau commented Dec 15, 2023

I've got the same issue, fresh Raspbian install following the official way to install HomeAssistant on RPi 5 with Docker.

@lethargosapatheia
Copy link
Author

Funnily enough it works if I install Ubuntu 23.10 (with raspi imager). But I do want to be able to use rasp pi os, as it's lighter.

@lbineau
Copy link

lbineau commented Dec 15, 2023

I've found the solution here https://www.home-assistant.io/installation/alternative#optimizations
Jemalloc is not available on raspbian it seems so it is possible to deactivate it when installing it with docker

@lethargosapatheia
Copy link
Author

lethargosapatheia commented Dec 15, 2023

I forgot to mention that I did come across this too after installing Ubuntu. I would like to have it enabled though, if it's supposed to preserve RAM memory. Even on podman (which runs fedora core os in the background) on Mac OS it works.

@lbineau
Copy link

lbineau commented Dec 15, 2023

Yeah I completely agree it would be better to have it working than deactivate the optimization functionality.
I hope someone will have the answer, please keep me posted if you find the solution :-)

@frenck
Copy link
Member

frenck commented Dec 15, 2023

Fixed in: home-assistant/docker-base#248

Workaround available by disabling optimizations as documented: https://www.home-assistant.io/installation/alternative#optimizations

../Frenck

@frenck frenck closed this as completed Dec 15, 2023
@kitopopo
Copy link

Dear friends,

Today i have installed hoome assistant docker version in a raspberry pi 5 8gb, the container restarts every 5 secons.
I found the alternative solution and have added in docker-compose.yaml: " DISABLE_JEMALLOC=true " ... under of environment. Now the container starts correctly and home assistant works correctly.
I can read in this post that it was in Fixed in: home-assistant/docker-base#248, maybe i must wait a new home assistan version 2023.4 in order to be able can use jemalloc?

Thanks in advanced.

Best regards

@lethargosapatheia
Copy link
Author

Fixed in: home-assistant/docker-base#248

Workaround available by disabling optimizations as documented: https://www.home-assistant.io/installation/alternative#optimizations

../Frenck

@frenck I'm not very clear here, but what image will this change be part of?

@kitopopo disabling jemalloc, yes, works, but the point is to profit from better memory management.

@kitopopo
Copy link

kitopopo commented Dec 22, 2023

Fixed in: home-assistant/docker-base#248

Workaround available by disabling optimizations as documented: https://www.home-assistant.io/installation/alternative#optimizations

../Frenck

@frenck I'm not very clear here, but what image will this change be part of?

@kitopopo disabling jemalloc, yes, works, but the point is to profit from better memory management.

Thanks for your answer. Yes, i have readed that is better use Jemalloc for memory management but i think that at the moment isn't possible. Maybe @frenck can solve the problem in new docker versions? Thanks in advanced.

@kitopopo
Copy link

kitopopo commented Jan 3, 2024

Dear @frenck @lethargosapatheia ,

I just tested the new version of home assistant 2024.1.0 and we still have the same problem, it is still necessary to disable jemalloc so that the container does not constantly restart. Should we reopen the issue since the problem is not resolved?

Thanks in advanced,

Best regards

@lethargosapatheia
Copy link
Author

lethargosapatheia commented Jan 3, 2024

I've no idea, I'm not clear at all about @frenck's reply. There is no information about the container images in the link related to the MR. So, yeah, I'm not sure why he closed the issue when it's clearly not solved.

@kitopopo
Copy link

Dear friend @lethargosapatheia, After upgrade yesterday home assistant core container to 2024.1.3 the jemalloc problem has not yet been solved, it is still necessary to disable jemalloc inside docker-compose.yaml. Due to we have no news from @frenck , and this issue is not reopened, I am going to proceed to open a new issue so that the problem is resolved since more than 1 month has passed and we do not have a solution for raspberry pi 5. Best regards

@frenck
Copy link
Member

frenck commented Jan 19, 2024

As per above: #105768 (comment)

Fixed in: home-assistant/docker-base#248

Workaround available by disabling optimizations as documented: https://www.home-assistant.io/installation/alternative#optimizations

It is expected to become generally available in the 2024.2 release.

and this issue is not reopened

This issue doesn't need to be re-opened, as the issue has been fixed.

resolved since more than 1 month has passed and we do not have a solution for raspberry pi 5

The Raspberry Pi 5 is not yet officially supported by the Home Assistant project. Please look at our blogs for more information and updates.

../Frenck

@kitopopo
Copy link

As per above: #105768 (comment)

Fixed in: home-assistant/docker-base#248

Workaround available by disabling optimizations as documented: https://www.home-assistant.io/installation/alternative#optimizations

It is expected to become generally available in the 2024.2 release.

and this issue is not reopened

This issue doesn't need to be re-opened, as the issue has been fixed.

resolved since more than 1 month has passed and we do not have a solution for raspberry pi 5

The Raspberry Pi 5 is not yet officially supported by the Home Assistant project. Please look at our blogs for more information and updates.

../Frenck

Dear friend, thanks for your answer. We will then wait for version 2024.2. thanks in advance, best regards

@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants