HomeAssistant cannot start due to memory allocation failure on aarch64

I am installing HomeAssistant on Debian 12 Bookworm testing, on Mac mini M1.
I am using standard docker installation.

When searching for this error it was mentioned before with QNAP. And I have the versions of docker and libseccomp2 above the requirement.

Any suggestions on how this could be fixed?

Here is the log:

<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
Fatal Python error: _PyRuntimeState_Init_impl: memory allocation failed
Python runtime state: unknown
[17:33:02] INFO: Home Assistant Core finish process exit code 1
[17:33:02] INFO: Home Assistant Core service shutdown
s6-rc: info: service legacy-services successfully started
s6-rc: info: service legacy-services: stopping
[17:33:03] INFO: Home Assistant Core finish process exit code 256
[17:33:03] INFO: Home Assistant Core finish process received signal 15
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
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_impl: memory allocation failed
Python runtime state: unknown
[17:33:32] INFO: Home Assistant Core finish process exit code 1
[17:33:32] INFO: Home Assistant Core service shutdown
s6-rc: info: service legacy-services successfully started
s6-rc: info: service legacy-services: stopping
[17:33:33] INFO: Home Assistant Core finish process exit code 256
[17:33:33] INFO: Home Assistant Core finish process received signal 15
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

So on a MAC Mini M1 (ARM64, AArch64), does it need rosetta to universally run apps for both intel/arm64?

What I’ve found is it is usually a mismatch between processor bit support 32/64 (kernel, OS and it’s dependencies/libraries, and the application(s) with databases. Make sure that everything in this case supports/uses the 64 bit operation.

Have you checked here: Linux - Home Assistant ?

Under Optimizations:

The Home Assistant Container is using an alternative memory allocation library jemalloc for better memory management and Python runtime speedup.

As jemalloc can cause issues on certain hardware, it can be disabled by passing the environment variable DISABLE_JEMALLOC with any value…

1 Like

It is running debian so there is no rosetta. It is essentially just an ARM Linux

Thanks this worked!